|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.sessions.Project
public class Project
Purpose: Maintain all of the EclipseLink configuration information for a system.
Responsibilities:
DatabaseLogin
,
Serialized FormField Summary | |
---|---|
protected java.util.Map |
aliasDescriptors
Cache the EJBQL descriptor aliases. |
protected Login |
datasourceLogin
|
protected java.lang.Class |
defaultIdentityMapClass
Default value for ClassDescriptor.identityMapClass |
protected int |
defaultIdentityMapSize
Default value for ClassDescriptor.identityMapSize |
protected boolean |
defaultIsIsolated
Default value for ClassDescriptor.isIsolated |
protected java.util.Vector |
defaultReadOnlyClasses
Holds the default set of read-only classes that apply to each UnitOfWork. |
protected boolean |
defaultTemporalMutable
Define the default setting for configuring if dates and calendars are mutable. |
protected java.util.Map |
descriptors
|
protected boolean |
hasGenericHistorySupport
Cache if any descriptor has history. |
protected boolean |
hasIsolatedClasses
Cache if any descriptor is isolated. |
protected boolean |
hasMappingsPostCalculateChangesOnDeleted
Indicates whether there is at least one descriptor that has at least on mapping that require a call on deleted objects to update change sets. |
protected boolean |
hasProxyIndirection
Cache if any descriptor is using ProxyIndirection. |
protected org.eclipse.persistence.internal.helper.ConcurrentFixedCache |
jpqlParseCache
PERF: Provide an JPQL parse cache to optimize dynamic JPQL. |
protected java.lang.String |
name
|
protected java.util.Vector |
orderedDescriptors
|
protected java.util.Map |
sqlResultSetMappings
This a collection of 'maps' that allow users to map custom SQL to query results |
Constructor Summary | |
---|---|
Project()
PUBLIC: Create a new project. |
|
Project(DatabaseLogin login)
PUBLIC: Create a new project that will connect through JDBC using the login information. |
|
Project(Login login)
PUBLIC: Create a new project that will connect through the login information. |
Method Summary | |
---|---|
void |
addAlias(java.lang.String alias,
ClassDescriptor descriptor)
PUBLIC: Add an alias for the descriptor. |
void |
addDefaultReadOnlyClass(java.lang.Class readOnlyClass)
PUBLIC: Add the read-only class which apply to each UnitOfWork created by default. |
void |
addDescriptor(ClassDescriptor descriptor)
PUBLIC: Add the descriptor to the project. |
void |
addDescriptor(ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
INTERNAL: Used by the BuilderInterface when reading a Project from INI files. |
void |
addDescriptors(java.util.Collection descriptors,
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
INTERNAL: Add the descriptors to the session. |
void |
addDescriptors(Project project,
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
PUBLIC: Merge the descriptors from another project into this one. |
void |
addSQLResultSetMapping(SQLResultSetMapping sqlResultSetMapping)
PUBLIC: Add a named SQLResultSetMapping to this project. |
void |
applyLogin()
INTERNAL: Default apply login implementation. |
void |
assumeExistenceForDoesExist()
PUBLIC: Switch all descriptors to assume existence for non-null primary keys. |
void |
checkCacheForDoesExist()
PUBLIC: Switch all descriptors to check the cache for existence. |
void |
checkDatabaseForDoesExist()
PUBLIC: Switch all descriptors to check the database for existence. |
java.lang.Object |
clone()
INTERNAL: Clones the descriptor |
void |
conformAllDescriptors()
PUBLIC: Set all this project's descriptors to conform all read queries within the context of the unit of work. |
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this project to actual class-based settings. |
DatabaseSession |
createDatabaseSession()
PUBLIC: Factory method to create session. |
Server |
createServerSession()
PUBLIC: Factory method to create a server session. |
Server |
createServerSession(ConnectionPolicy defaultConnectionPolicy)
PUBLIC: Factory method to create a server session. |
Server |
createServerSession(int min,
int max)
PUBLIC: Factory method to create a server session. |
java.util.Map |
getAliasDescriptors()
INTERNAL: Returns the alias descriptors hashtable. |
ClassDescriptor |
getClassDescriptor(java.lang.Class theClass)
PUBLIC: Return the descriptor specified for the class. |
Login |
getDatasourceLogin()
PUBLIC: Return the login, the login holds any database connection information given. |
java.lang.Class |
getDefaultIdentityMapClass()
PUBLIC: Return default value for descriptor cache type. |
int |
getDefaultIdentityMapSize()
PUBLIC: Return default value descriptor cache size. |
boolean |
getDefaultIsIsolated()
PUBLIC: Return default value for whether descriptor should use isolated cache. |
java.util.Vector |
getDefaultReadOnlyClasses()
PUBLIC: Returns the default set of read-only classes. |
boolean |
getDefaultTemporalMutable()
PUBLIC: Return the default setting for configuring if dates and calendars are mutable. |
ClassDescriptor |
getDescriptor(java.lang.Class theClass)
PUBLIC: Return the descriptor specified for the class. |
ClassDescriptor |
getDescriptorForAlias(java.lang.String alias)
PUBLIC: Return the descriptor for the alias |
java.util.Map |
getDescriptors()
PUBLIC: Return the descriptors. |
org.eclipse.persistence.internal.helper.ConcurrentFixedCache |
getJPQLParseCache()
INTERNAL: Return the JPQL parse cache. |
int |
getJPQLParseCacheMaxSize()
ADVANCED: Return the JPQL parse cache max size. |
DatabaseLogin |
getLogin()
OBSOLETE: Return the login, the login holds any database connection information given. |
java.lang.String |
getName()
PUBLIC: get the name of the project. |
java.util.Vector |
getOrderedDescriptors()
INTERNAL: Return the descriptors in the order added. |
SQLResultSetMapping |
getSQLResultSetMapping(java.lang.String sqlResultSetMapping)
PUBLIC: Get a named SQLResultSetMapping from this project. |
boolean |
hasGenericHistorySupport()
INTERNAL: Answers if at least one Descriptor or Mapping had a HistoryPolicy at initialize time. |
boolean |
hasIsolatedClasses()
INTERNAL: Return if any descriptors are isolated. |
boolean |
hasMappingsPostCalculateChangesOnDeleted()
INTERNAL: Indicates whether there is at least one descriptor that has at least on mapping that require a call on deleted objects to update change sets. |
boolean |
hasProxyIndirection()
INTERNAL: Return if any descriptors use ProxyIndirection. |
void |
setAliasDescriptors(java.util.Map aHashtable)
INTERNAL: Set the alias descriptors hashtable. |
void |
setDatasourceLogin(Login datasourceLogin)
PUBLIC: Set the login to be used to connect to the database for this project. |
void |
setDefaultIdentityMapClass(java.lang.Class defaultIdentityMapClass)
PUBLIC: Set default value for descriptor cache type. |
void |
setDefaultIdentityMapSize(int defaultIdentityMapSize)
PUBLIC: Set default value descriptor cache size. |
void |
setDefaultIsIsolated(boolean defaultIsIsolated)
PUBLIC: Set default value for whether descriptor should use isolated cache. |
void |
setDefaultReadOnlyClasses(java.util.Collection newValue)
PUBLIC: Set the read-only classes which apply to each UnitOfWork create by default. |
void |
setDefaultTemporalMutable(boolean defaultTemporalMutable)
PUBLIC: Set the default setting for configuring if dates and calendars are mutable. |
void |
setDeferModificationsUntilCommit(int deferralLevel)
ADVANCED: This method is a 'helper' method for updating all of the descriptors within this project to have a particular deferral level. |
void |
setDescriptors(java.util.Map descriptors)
INTERNAL: Set the descriptors registered with this session. |
void |
setHasGenericHistorySupport(boolean hasGenericHistorySupport)
INTERNAL: Set to true during descriptor initialize if any descriptor has history. |
void |
setHasIsolatedClasses(boolean hasIsolatedClasses)
INTERNAL: Set to true during descriptor initialize if any descriptor is isolated. |
void |
setHasMappingsPostCalculateChangesOnDeleted(boolean hasMappingsPostCalculateChangesOnDeleted)
INTERNAL: Indicates whether there is at least one descriptor that has at least on mapping that require a call on deleted objects to update change sets. |
void |
setHasProxyIndirection(boolean hasProxyIndirection)
INTERNAL: Set to true during descriptor initialize if any descriptor uses ProxyIndirection Determines if ProxyIndirectionPolicy.getValueFromProxy should be called. |
protected void |
setJPQLParseCache(org.eclipse.persistence.internal.helper.ConcurrentFixedCache jpqlParseCache)
INTERNAL: Set the JPQL parse cache. |
void |
setJPQLParseCacheMaxSize(int maxSize)
ADVANCED: Set the JPQL parse cache max size. |
void |
setLogin(DatabaseLogin datasourceLogin)
PUBLIC: Set the login to be used to connect to the database for this project. |
void |
setLogin(Login datasourceLogin)
PUBLIC: Set the login to be used to connect to the database for this project. |
void |
setName(java.lang.String name)
PUBLIC: Set the name of the project. |
void |
setOrderedDescriptors(java.util.Vector orderedDescriptors)
INTERNAL: Set the descriptors order. |
java.lang.String |
toString()
INTERNAL: |
void |
useCacheIdentityMap()
PUBLIC: Switch all descriptors to use the cache identity map. |
void |
useCacheIdentityMap(int cacheSize)
PUBLIC: Switch all descriptors to use the cache identity map the size. |
void |
useFullIdentityMap()
PUBLIC: Switch all descriptors to use the full identity map. |
void |
useFullIdentityMap(int initialCacheSize)
PUBLIC: Switch all descriptors to use the full identity map with initial cache size. |
void |
useNoIdentityMap()
PUBLIC: Switch all descriptors to use no identity map. |
void |
useSoftCacheWeakIdentityMap()
PUBLIC: Switch all descriptors to use the soft cache weak identity map. |
void |
useSoftCacheWeakIdentityMap(int cacheSize)
PUBLIC: Switch all descriptors to use the soft cache weak identity map with soft cache size. |
boolean |
usesOptimisticLocking()
INTERNAL: Asks each descriptor if is uses optimistic locking. |
boolean |
usesSequencing()
INTERNAL: Asks each descriptor if is uses sequencing. |
void |
useWeakIdentityMap()
PUBLIC: Switch all descriptors to use the weak identity map. |
void |
useWeakIdentityMap(int initialCacheSize)
PUBLIC: Switch all descriptors to use the weak identity map. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.lang.String name
protected Login datasourceLogin
protected java.util.Map descriptors
protected java.util.Vector orderedDescriptors
protected java.util.Vector defaultReadOnlyClasses
protected java.util.Map aliasDescriptors
protected boolean hasIsolatedClasses
protected boolean hasGenericHistorySupport
protected boolean hasProxyIndirection
protected java.util.Map sqlResultSetMappings
protected transient org.eclipse.persistence.internal.helper.ConcurrentFixedCache jpqlParseCache
protected boolean defaultTemporalMutable
protected transient boolean hasMappingsPostCalculateChangesOnDeleted
protected java.lang.Class defaultIdentityMapClass
protected int defaultIdentityMapSize
protected boolean defaultIsIsolated
Constructor Detail |
---|
public Project()
public Project(Login login)
public Project(DatabaseLogin login)
Method Detail |
---|
public boolean getDefaultTemporalMutable()
public void setDefaultTemporalMutable(boolean defaultTemporalMutable)
public org.eclipse.persistence.internal.helper.ConcurrentFixedCache getJPQLParseCache()
public void setJPQLParseCacheMaxSize(int maxSize)
public int getJPQLParseCacheMaxSize()
protected void setJPQLParseCache(org.eclipse.persistence.internal.helper.ConcurrentFixedCache jpqlParseCache)
public void addDefaultReadOnlyClass(java.lang.Class readOnlyClass)
public void addDescriptor(ClassDescriptor descriptor)
public void addDescriptor(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
public void addDescriptors(java.util.Collection descriptors, org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
public void addDescriptors(Project project, org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
public void addSQLResultSetMapping(SQLResultSetMapping sqlResultSetMapping)
public void conformAllDescriptors()
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
public void assumeExistenceForDoesExist()
public void checkCacheForDoesExist()
public void checkDatabaseForDoesExist()
public java.lang.Object clone()
clone
in class java.lang.Object
public DatabaseSession createDatabaseSession()
public Server createServerSession()
public Server createServerSession(int min, int max)
public Server createServerSession(ConnectionPolicy defaultConnectionPolicy)
public java.util.Vector getDefaultReadOnlyClasses()
public java.lang.Class getDefaultIdentityMapClass()
public int getDefaultIdentityMapSize()
public boolean getDefaultIsIsolated()
public ClassDescriptor getClassDescriptor(java.lang.Class theClass)
public ClassDescriptor getDescriptor(java.lang.Class theClass)
public java.util.Map getDescriptors()
public java.util.Vector getOrderedDescriptors()
public void setOrderedDescriptors(java.util.Vector orderedDescriptors)
public DatabaseLogin getLogin()
public Login getDatasourceLogin()
public java.lang.String getName()
public SQLResultSetMapping getSQLResultSetMapping(java.lang.String sqlResultSetMapping)
public boolean hasGenericHistorySupport()
public void setDefaultReadOnlyClasses(java.util.Collection newValue)
public void setDefaultIdentityMapClass(java.lang.Class defaultIdentityMapClass)
public void setDefaultIdentityMapSize(int defaultIdentityMapSize)
public void setDefaultIsIsolated(boolean defaultIsIsolated)
public void setDescriptors(java.util.Map descriptors)
public void setDeferModificationsUntilCommit(int deferralLevel)
public void setHasGenericHistorySupport(boolean hasGenericHistorySupport)
public boolean hasIsolatedClasses()
public void setHasIsolatedClasses(boolean hasIsolatedClasses)
public boolean hasProxyIndirection()
public void setHasProxyIndirection(boolean hasProxyIndirection)
public void setLogin(DatabaseLogin datasourceLogin)
public void setLogin(Login datasourceLogin)
public void setDatasourceLogin(Login datasourceLogin)
public void setName(java.lang.String name)
public java.lang.String toString()
toString
in class java.lang.Object
public void useCacheIdentityMap()
public void useCacheIdentityMap(int cacheSize)
public void useFullIdentityMap()
public void useFullIdentityMap(int initialCacheSize)
public void useNoIdentityMap()
public void useSoftCacheWeakIdentityMap()
public void useSoftCacheWeakIdentityMap(int cacheSize)
public boolean usesOptimisticLocking()
public boolean usesSequencing()
public void useWeakIdentityMap()
public void useWeakIdentityMap(int initialCacheSize)
public void applyLogin()
public java.util.Map getAliasDescriptors()
public void addAlias(java.lang.String alias, ClassDescriptor descriptor)
public ClassDescriptor getDescriptorForAlias(java.lang.String alias)
public void setAliasDescriptors(java.util.Map aHashtable)
public boolean hasMappingsPostCalculateChangesOnDeleted()
public void setHasMappingsPostCalculateChangesOnDeleted(boolean hasMappingsPostCalculateChangesOnDeleted)
|
EclipseLink 1.1.1_ 1.1.1.v20090430-r4097 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |