EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.sessions
Class Project

java.lang.Object
  extended by org.eclipse.persistence.sessions.Project
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DBWSModelProject, org.eclipse.persistence.internal.sessions.factories.NamespaceResolvableProject

public class Project
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Purpose: Maintain all of the EclipseLink configuration information for a system.

Responsibilities:

See Also:
DatabaseLogin, Serialized Form

Field Summary
protected  java.util.Map aliasDescriptors
          Cache the EJBQL descriptor aliases.
protected  Login datasourceLogin
           
protected  CacheIsolationType defaultCacheIsolation
          Default value for ClassDescriptor.isIsolated.
protected  java.lang.Class defaultIdentityMapClass
          Default value for ClassDescriptor.identityMapClass.
protected  int defaultIdentityMapSize
          Default value for ClassDescriptor.identityMapSize.
protected  IdValidation defaultIdValidation
          Default value for ClassDescriptor.idValidation.
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<java.lang.Class,ClassDescriptor> 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 hasNonIsolatedUOWClasses
          Cache if all descriptors are isolated in the unit of work.
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.util.Map<java.lang.Object,RelationalDescriptor> mappedSuperclassDescriptors
          Mapped Superclasses (JPA 2) collection of parent non-relational descriptors keyed on MetadataClass without creating a compile time dependency on JPA.
protected  java.util.Map<java.lang.String,java.util.List<java.lang.String>> metamodelIdClassMap
          Store the IdClass Id attributes for exclusive use by the Metamodel API Keyed on the fully qualified accessible object owner class name.
protected  java.lang.String name
           
protected  java.util.List<ClassDescriptor> orderedDescriptors
           
protected  java.util.Map<java.lang.String,PartitioningPolicy> partitioningPolicies
          Map of named partitioning policies, keyed by their name.
protected  java.util.List<DatabaseQuery> queries
          List of queries - once Project is initialized, these are copied to the Session.
protected  java.util.Map<java.lang.String,SQLResultSetMapping> 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 addMappedSuperclass(java.lang.Object key, RelationalDescriptor value)
          INTERNAL: 266912: Add a descriptor to the Map of mappedSuperclass descriptors
 void addMetamodelIdClassMapEntry(java.lang.String ownerName, java.lang.String name)
          INTERNAL: Add an IdClass entry to the map of ids for a particular owner This function is used exclusively by the Metamodel API.
 void addPartitioningPolicy(PartitioningPolicy partitioningPolicy)
          PUBLIC: Set the map of partitioning policies, keyed by name.
 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.
 Server createServerSession(int initial, 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.
 CacheIsolationType getDefaultCacheIsolation()
          PUBLIC: Return the project level default for class cache isolation;
 java.lang.Class getDefaultIdentityMapClass()
          PUBLIC: Return default value for descriptor cache type.
 int getDefaultIdentityMapSize()
          PUBLIC: Return default value descriptor cache size.
 IdValidation getDefaultIdValidation()
          PUBLIC: Return default value for descriptor primary key validation.
 boolean getDefaultIsIsolated()
          Deprecated. see getDefaultCacheIsolation()
 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<java.lang.Class,ClassDescriptor> getDescriptors()
          PUBLIC: Return the descriptors in a ClassDescriptors Map keyed on the Java class.
 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.
 RelationalDescriptor getMappedSuperclass(java.lang.Object key)
          INTERNAL: Use the Metadata key parameter to lookup the Descriptor from the Map of mappedSuperclass descriptors
 java.util.Map<java.lang.Object,RelationalDescriptor> getMappedSuperclassDescriptors()
          INTERNAL: Return the Map of RelationalDescriptor objects representing mapped superclass parents keyed by className of the metadata class.
 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMetamodelIdClassMap()
          INTERNAL: Return the Map of IdClass attribute lists keyed on owner class name.
 java.lang.String getName()
          PUBLIC: get the name of the project.
 java.util.List<ClassDescriptor> getOrderedDescriptors()
          INTERNAL: Return the descriptors in the order added.
 java.util.Map<java.lang.String,PartitioningPolicy> getPartitioningPolicies()
          PUBLIC: Return the map of partitioning policies, keyed by name.
 PartitioningPolicy getPartitioningPolicy(java.lang.String name)
          PUBLIC: Return the partitioning policies for the name.
 java.util.List<DatabaseQuery> getQueries()
          INTERNAL: List of queries that upon initialization are copied over to the session
 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 hasIsolatedCacheClassWithoutUOWIsolation()
          INTERNAL: Return whether this project has a descriptor that is both Isolated and has a cache isolation level other than ISOLATE_CACHE_ALWAYS
 boolean hasIsolatedClasses()
          INTERNAL: Return if any descriptors are isolated.
 boolean hasMappedSuperclasses()
          INTERNAL: Return whether there any mappings that are mapped superclasses.
 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 hasNonIsolatedUOWClasses()
          INTERNAL: Return if any descriptors are not isolated to the unit of work.
 boolean hasProxyIndirection()
          INTERNAL: Return if any descriptors use ProxyIndirection.
 boolean hasSQLResultSetMapping(java.lang.String sqlResultSetMapping)
          PUBLIC: Return true if the sql result set mapping name exists.
 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 setDefaultCacheIsolation(CacheIsolationType isolationType)
          PUBLIC: Set project level default value for class cache isolation.
 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 setDefaultIdValidation(IdValidation defaultIdValidation)
          PUBLIC: Set default value for descriptor primary key validation.
 void setDefaultIsIsolated(boolean defaultIsIsolated)
          Deprecated. see setDefaultCacheIsolation(CacheIsolationType)
 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 setHasNonIsolatedUOWClasses(boolean hasNonIsolatedUOWClasses)
          INTERNAL: Set if any descriptors are not isolated to the unit of work.
 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.List<ClassDescriptor> orderedDescriptors)
          INTERNAL: Set the descriptors order.
 void setPartitioningPolicies(java.util.Map<java.lang.String,PartitioningPolicy> partitioningPolicies)
          PUBLIC: Set the map of partitioning policies, keyed by name.
 void setQueries(java.util.List<DatabaseQuery> queries)
          INTERNAL:
 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

name

protected java.lang.String name

datasourceLogin

protected Login datasourceLogin

descriptors

protected java.util.Map<java.lang.Class,ClassDescriptor> descriptors

orderedDescriptors

protected java.util.List<ClassDescriptor> orderedDescriptors

defaultReadOnlyClasses

protected java.util.Vector defaultReadOnlyClasses
Holds the default set of read-only classes that apply to each UnitOfWork.


aliasDescriptors

protected java.util.Map aliasDescriptors
Cache the EJBQL descriptor aliases.


hasIsolatedClasses

protected boolean hasIsolatedClasses
Cache if any descriptor is isolated. (set during initialization)


hasNonIsolatedUOWClasses

protected boolean hasNonIsolatedUOWClasses
Cache if all descriptors are isolated in the unit of work. (set during initialization)


hasGenericHistorySupport

protected boolean hasGenericHistorySupport
Cache if any descriptor has history. (set during initialization)


hasProxyIndirection

protected boolean hasProxyIndirection
Cache if any descriptor is using ProxyIndirection. (set during initialization


sqlResultSetMappings

protected java.util.Map<java.lang.String,SQLResultSetMapping> sqlResultSetMappings
This a collection of 'maps' that allow users to map custom SQL to query results


jpqlParseCache

protected transient org.eclipse.persistence.internal.helper.ConcurrentFixedCache jpqlParseCache
PERF: Provide an JPQL parse cache to optimize dynamic JPQL.


defaultTemporalMutable

protected boolean defaultTemporalMutable
Define the default setting for configuring if dates and calendars are mutable.


hasMappingsPostCalculateChangesOnDeleted

protected transient 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.


defaultIdentityMapClass

protected java.lang.Class defaultIdentityMapClass
Default value for ClassDescriptor.identityMapClass.


defaultIdentityMapSize

protected int defaultIdentityMapSize
Default value for ClassDescriptor.identityMapSize.


defaultCacheIsolation

protected CacheIsolationType defaultCacheIsolation
Default value for ClassDescriptor.isIsolated.


defaultIdValidation

protected IdValidation defaultIdValidation
Default value for ClassDescriptor.idValidation.


queries

protected transient java.util.List<DatabaseQuery> queries
List of queries - once Project is initialized, these are copied to the Session.


mappedSuperclassDescriptors

protected java.util.Map<java.lang.Object,RelationalDescriptor> mappedSuperclassDescriptors
Mapped Superclasses (JPA 2) collection of parent non-relational descriptors keyed on MetadataClass without creating a compile time dependency on JPA. The descriptor values of this map must not be replaced by a put() so that the mappings on the initial descriptor are not overwritten.

These descriptors are only to be used by Metamodel generation.

Since:
EclipseLink 1.2 for the JPA 2.0 Reference Implementation

metamodelIdClassMap

protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> metamodelIdClassMap
Store the IdClass Id attributes for exclusive use by the Metamodel API Keyed on the fully qualified accessible object owner class name. Value is a List of the fully qualified id class name or id attribute name.

Since:
EclipseLink 1.2 for the JPA 2.0 Reference Implementation

partitioningPolicies

protected java.util.Map<java.lang.String,PartitioningPolicy> partitioningPolicies
Map of named partitioning policies, keyed by their name.

Constructor Detail

Project

public Project()
PUBLIC: Create a new project.


Project

public Project(Login login)
PUBLIC: Create a new project that will connect through the login information. This method can be used if the project is being create in code instead of being read from a file.


Project

public Project(DatabaseLogin login)
PUBLIC: Create a new project that will connect through JDBC using the login information. This method can be used if the project is being create in code instead of being read from a file.

Method Detail

getDefaultTemporalMutable

public boolean getDefaultTemporalMutable()
PUBLIC: Return the default setting for configuring if dates and calendars are mutable. Mutable means that changes to the date's year/month/day are detected. By default they are treated as not mutable.


setDefaultTemporalMutable

public void setDefaultTemporalMutable(boolean defaultTemporalMutable)
PUBLIC: Set the default setting for configuring if dates and calendars are mutable. Mutable means that changes to the date's year/month/day are detected. By default they are treated as not mutable.


getJPQLParseCache

public org.eclipse.persistence.internal.helper.ConcurrentFixedCache getJPQLParseCache()
INTERNAL: Return the JPQL parse cache. This is used to optimize dynamic JPQL.


setJPQLParseCacheMaxSize

public void setJPQLParseCacheMaxSize(int maxSize)
ADVANCED: Set the JPQL parse cache max size. This is used to optimize dynamic JPQL.


getJPQLParseCacheMaxSize

public int getJPQLParseCacheMaxSize()
ADVANCED: Return the JPQL parse cache max size. This is used to optimize dynamic JPQL.


setJPQLParseCache

protected void setJPQLParseCache(org.eclipse.persistence.internal.helper.ConcurrentFixedCache jpqlParseCache)
INTERNAL: Set the JPQL parse cache. This is used to optimize dynamic JPQL.


getQueries

public java.util.List<DatabaseQuery> getQueries()
INTERNAL: List of queries that upon initialization are copied over to the session


setQueries

public void setQueries(java.util.List<DatabaseQuery> queries)
INTERNAL:

Parameters:
queries -

addDefaultReadOnlyClass

public void addDefaultReadOnlyClass(java.lang.Class readOnlyClass)
PUBLIC: Add the read-only class which apply to each UnitOfWork created by default.


addDescriptor

public void addDescriptor(ClassDescriptor descriptor)
PUBLIC: Add the descriptor to the project.


addDescriptor

public void addDescriptor(ClassDescriptor descriptor,
                          org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
INTERNAL: Used by the BuilderInterface when reading a Project from INI files.


addDescriptors

public void addDescriptors(java.util.Collection descriptors,
                           org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
INTERNAL: Add the descriptors to the session. All persistent classes must have a descriptor registered for them with the session. This method allows for a batch of descriptors to be added at once so that EclipseLink can resolve the dependencies between the descriptors and perform initialization optimally.


addDescriptors

public void addDescriptors(Project project,
                           org.eclipse.persistence.internal.sessions.DatabaseSessionImpl session)
PUBLIC: Merge the descriptors from another project into this one. All persistent classes must have a descriptor registered for them with the session. This method allows for a batch of descriptors to be added at once so that EclipseLink can resolve the dependencies between the descriptors and perform initialization optimally.


addSQLResultSetMapping

public void addSQLResultSetMapping(SQLResultSetMapping sqlResultSetMapping)
PUBLIC: Add a named SQLResultSetMapping to this project. These SQLResultSetMappings can be later used by ResultSetMappingQueries to map Custom sql results to results as defined by the SQLResultSetMappings.


conformAllDescriptors

public void conformAllDescriptors()
PUBLIC: Set all this project's descriptors to conform all read queries within the context of the unit of work.


convertClassNamesToClasses

public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this project to actual class-based settings. This will also reset any class references to the version of the class from the class loader.


assumeExistenceForDoesExist

public void assumeExistenceForDoesExist()
PUBLIC: Switch all descriptors to assume existence for non-null primary keys.


checkCacheForDoesExist

public void checkCacheForDoesExist()
PUBLIC: Switch all descriptors to check the cache for existence.


checkDatabaseForDoesExist

public void checkDatabaseForDoesExist()
PUBLIC: Switch all descriptors to check the database for existence.


clone

public java.lang.Object clone()
INTERNAL: Clones the descriptor

Overrides:
clone in class java.lang.Object

createDatabaseSession

public DatabaseSession createDatabaseSession()
PUBLIC: Factory method to create session. This returns an implementor of the DatabaseSession interface, which can be used to login and add descriptors from other projects. The Session interface however should be used for reading and writing once connected for complete portability.


createServerSession

public Server createServerSession()
PUBLIC: Factory method to create a server session. This returns an implementor of the Server interface, which can be used to login and add descriptors from other projects, configure connection pooling and acquire client sessions.
By default the ServerSession has a single shared read/write connection pool with 32 min/max connections and an initial of 1 connection.


createServerSession

public Server createServerSession(int min,
                                  int max)
PUBLIC: Factory method to create a server session. This returns an implementor of the Server interface, which can be used to login and add descriptors from other projects, configure connection pooling and acquire client sessions. Configure the min and max number of connections for the default shared read/write pool.


createServerSession

public Server createServerSession(int initial,
                                  int min,
                                  int max)
PUBLIC: Factory method to create a server session. This returns an implementor of the Server interface, which can be used to login and add descriptors from other projects, configure connection pooling and acquire client sessions. Configure the min and max number of connections for the default shared read/write pool.


createServerSession

public Server createServerSession(ConnectionPolicy defaultConnectionPolicy)
PUBLIC: Factory method to create a server session. This returns an implementor of the Server interface, which can be used to login and add descriptors from other projects, configure connection pooling and acquire client sessions. Configure the default connection policy to be used. This policy is used on the "acquireClientSession()" protocol.
By default the ServerSession has a single shared read/write connection pool with 32 min/max connections and an initial of 1 connection.


getDefaultReadOnlyClasses

public java.util.Vector getDefaultReadOnlyClasses()
PUBLIC: Returns the default set of read-only classes.


getDefaultIdentityMapClass

public java.lang.Class getDefaultIdentityMapClass()
PUBLIC: Return default value for descriptor cache type.


getDefaultIdentityMapSize

public int getDefaultIdentityMapSize()
PUBLIC: Return default value descriptor cache size.


getDefaultIsIsolated

@Deprecated
public boolean getDefaultIsIsolated()
Deprecated. see getDefaultCacheIsolation()

PUBLIC: Return default value for whether descriptor should use isolated cache.


getDefaultCacheIsolation

public CacheIsolationType getDefaultCacheIsolation()
PUBLIC: Return the project level default for class cache isolation;


getDefaultIdValidation

public IdValidation getDefaultIdValidation()
PUBLIC: Return default value for descriptor primary key validation.


getClassDescriptor

public ClassDescriptor getClassDescriptor(java.lang.Class theClass)
PUBLIC: Return the descriptor specified for the class. If the passed Class parameter is null, null will be returned.


getDescriptor

public ClassDescriptor getDescriptor(java.lang.Class theClass)
PUBLIC: Return the descriptor specified for the class.


getDescriptors

public java.util.Map<java.lang.Class,ClassDescriptor> getDescriptors()
PUBLIC: Return the descriptors in a ClassDescriptors Map keyed on the Java class.


getOrderedDescriptors

public java.util.List<ClassDescriptor> getOrderedDescriptors()
INTERNAL: Return the descriptors in the order added. Used to maintain consistent order in XML.


setOrderedDescriptors

public void setOrderedDescriptors(java.util.List<ClassDescriptor> orderedDescriptors)
INTERNAL: Set the descriptors order. Used to maintain consistent order in XML.


getLogin

public DatabaseLogin getLogin()
OBSOLETE: Return the login, the login holds any database connection information given. This has been replaced by getDatasourceLogin to make use of the Login interface to support non-relational datasources, if DatabaseLogin API is required it will need to be cast.


getDatasourceLogin

public Login getDatasourceLogin()
PUBLIC: Return the login, the login holds any database connection information given. This return the Login interface and may need to be cast to the datasource specific implementation.


getName

public java.lang.String getName()
PUBLIC: get the name of the project.


getSQLResultSetMapping

public SQLResultSetMapping getSQLResultSetMapping(java.lang.String sqlResultSetMapping)
PUBLIC: Get a named SQLResultSetMapping from this project. These SQLResultSetMappings can be used by ResultSetMappingQueries to map Custom sql results to results as defined by the SQLResultSetMappings.


hasGenericHistorySupport

public boolean hasGenericHistorySupport()
INTERNAL: Answers if at least one Descriptor or Mapping had a HistoryPolicy at initialize time.


setDefaultReadOnlyClasses

public void setDefaultReadOnlyClasses(java.util.Collection newValue)
PUBLIC: Set the read-only classes which apply to each UnitOfWork create by default.


setDefaultIdentityMapClass

public void setDefaultIdentityMapClass(java.lang.Class defaultIdentityMapClass)
PUBLIC: Set default value for descriptor cache type.


setDefaultIdentityMapSize

public void setDefaultIdentityMapSize(int defaultIdentityMapSize)
PUBLIC: Set default value descriptor cache size.


setDefaultIsIsolated

@Deprecated
public void setDefaultIsIsolated(boolean defaultIsIsolated)
Deprecated. see setDefaultCacheIsolation(CacheIsolationType)

PUBLIC: Set default value for whether descriptor should use isolated cache.


setDefaultCacheIsolation

public void setDefaultCacheIsolation(CacheIsolationType isolationType)
PUBLIC: Set project level default value for class cache isolation.


setDefaultIdValidation

public void setDefaultIdValidation(IdValidation defaultIdValidation)
PUBLIC: Set default value for descriptor primary key validation.


setDescriptors

public void setDescriptors(java.util.Map descriptors)
INTERNAL: Set the descriptors registered with this session.


setDeferModificationsUntilCommit

public 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. The levels are as follows ClassDescriptor.ALL_MODIFICATIONS - this is the default and recommended. The writing of all changes will be deferred until the end of the transaction ClassDescriptor.UPDATE_MODIFICATIONS - this will cause the update changes to be deferred and all other changes to be written immediately. ClassDescriptor.NONE - this will cause all changes to be written on each container call.


setHasGenericHistorySupport

public void setHasGenericHistorySupport(boolean hasGenericHistorySupport)
INTERNAL: Set to true during descriptor initialize if any descriptor has history.


hasIsolatedCacheClassWithoutUOWIsolation

public boolean hasIsolatedCacheClassWithoutUOWIsolation()
INTERNAL: Return whether this project has a descriptor that is both Isolated and has a cache isolation level other than ISOLATE_CACHE_ALWAYS

Returns:

hasIsolatedClasses

public boolean hasIsolatedClasses()
INTERNAL: Return if any descriptors are isolated. Set to true during descriptor initialize if any descriptor is isolated. Determines if an isolated client session is required.


setHasIsolatedClasses

public void setHasIsolatedClasses(boolean hasIsolatedClasses)
INTERNAL: Set to true during descriptor initialize if any descriptor is isolated. Determines if an isolated client session is required.


hasNonIsolatedUOWClasses

public boolean hasNonIsolatedUOWClasses()
INTERNAL: Return if any descriptors are not isolated to the unit of work. Set to true during descriptor initialize if any descriptor is not isolated. Allows uow merge to be bypassed.


setHasNonIsolatedUOWClasses

public void setHasNonIsolatedUOWClasses(boolean hasNonIsolatedUOWClasses)
INTERNAL: Set if any descriptors are not isolated to the unit of work. Set to true during descriptor initialize if any descriptor is not isolated. Allows uow merge to be bypassed.


hasProxyIndirection

public boolean hasProxyIndirection()
INTERNAL: Return if any descriptors use ProxyIndirection. Set to true during descriptor initialize if any descriptor uses ProxyIndirection Determines if ProxyIndirectionPolicy.getValueFromProxy should be called.


hasSQLResultSetMapping

public boolean hasSQLResultSetMapping(java.lang.String sqlResultSetMapping)
PUBLIC: Return true if the sql result set mapping name exists.


setHasProxyIndirection

public void setHasProxyIndirection(boolean hasProxyIndirection)
INTERNAL: Set to true during descriptor initialize if any descriptor uses ProxyIndirection Determines if ProxyIndirectionPolicy.getValueFromProxy should be called.


setLogin

public void setLogin(DatabaseLogin datasourceLogin)
PUBLIC: Set the login to be used to connect to the database for this project.


setLogin

public void setLogin(Login datasourceLogin)
PUBLIC: Set the login to be used to connect to the database for this project.


setDatasourceLogin

public void setDatasourceLogin(Login datasourceLogin)
PUBLIC: Set the login to be used to connect to the database for this project.


setName

public void setName(java.lang.String name)
PUBLIC: Set the name of the project.


toString

public java.lang.String toString()
INTERNAL:

Overrides:
toString in class java.lang.Object

useCacheIdentityMap

public void useCacheIdentityMap()
PUBLIC: Switch all descriptors to use the cache identity map.


useCacheIdentityMap

public void useCacheIdentityMap(int cacheSize)
PUBLIC: Switch all descriptors to use the cache identity map the size.


useFullIdentityMap

public void useFullIdentityMap()
PUBLIC: Switch all descriptors to use the full identity map.


useFullIdentityMap

public void useFullIdentityMap(int initialCacheSize)
PUBLIC: Switch all descriptors to use the full identity map with initial cache size.


useNoIdentityMap

public void useNoIdentityMap()
PUBLIC: Switch all descriptors to use no identity map.


useSoftCacheWeakIdentityMap

public void useSoftCacheWeakIdentityMap()
PUBLIC: Switch all descriptors to use the soft cache weak identity map.


useSoftCacheWeakIdentityMap

public void useSoftCacheWeakIdentityMap(int cacheSize)
PUBLIC: Switch all descriptors to use the soft cache weak identity map with soft cache size.


usesOptimisticLocking

public boolean usesOptimisticLocking()
INTERNAL: Asks each descriptor if is uses optimistic locking.


usesSequencing

public boolean usesSequencing()
INTERNAL: Asks each descriptor if is uses sequencing.


useWeakIdentityMap

public void useWeakIdentityMap()
PUBLIC: Switch all descriptors to use the weak identity map.


useWeakIdentityMap

public void useWeakIdentityMap(int initialCacheSize)
PUBLIC: Switch all descriptors to use the weak identity map.


applyLogin

public void applyLogin()
INTERNAL: Default apply login implementation. Defined for generated subclasses that may not have a login. BUG#2669342


getAliasDescriptors

public java.util.Map getAliasDescriptors()
INTERNAL: Returns the alias descriptors hashtable.


addAlias

public void addAlias(java.lang.String alias,
                     ClassDescriptor descriptor)
PUBLIC: Add an alias for the descriptor.


getDescriptorForAlias

public ClassDescriptor getDescriptorForAlias(java.lang.String alias)
PUBLIC: Return the descriptor for the alias


setAliasDescriptors

public void setAliasDescriptors(java.util.Map aHashtable)
INTERNAL: Set the alias descriptors hashtable.


hasMappingsPostCalculateChangesOnDeleted

public 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.


setHasMappingsPostCalculateChangesOnDeleted

public 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.


hasMappedSuperclasses

public boolean hasMappedSuperclasses()
INTERNAL: Return whether there any mappings that are mapped superclasses.

Returns:
Since:
EclipseLink 1.2 for the JPA 2.0 Reference Implementation

addMappedSuperclass

public void addMappedSuperclass(java.lang.Object key,
                                RelationalDescriptor value)
INTERNAL: 266912: Add a descriptor to the Map of mappedSuperclass descriptors

Parameters:
key - (Metadata class)
value - (RelationalDescriptor)
Since:
EclipseLink 1.2 for the JPA 2.0 Reference Implementation

getMappedSuperclass

public RelationalDescriptor getMappedSuperclass(java.lang.Object key)
INTERNAL: Use the Metadata key parameter to lookup the Descriptor from the Map of mappedSuperclass descriptors

Parameters:
key - - theMetadata class
Since:
EclipseLink 1.2 for the JPA 2.0 Reference Implementation

getMappedSuperclassDescriptors

public java.util.Map<java.lang.Object,RelationalDescriptor> getMappedSuperclassDescriptors()
INTERNAL: Return the Map of RelationalDescriptor objects representing mapped superclass parents keyed by className of the metadata class.

Since:
EclipseLink 1.2 for the JPA 2.0 Reference Implementation

addMetamodelIdClassMapEntry

public void addMetamodelIdClassMapEntry(java.lang.String ownerName,
                                        java.lang.String name)
INTERNAL: Add an IdClass entry to the map of ids for a particular owner This function is used exclusively by the Metamodel API.

Since:
EclipseLink 1.2 for the JPA 2.0 Reference Implementation

getMetamodelIdClassMap

public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMetamodelIdClassMap()
INTERNAL: Return the Map of IdClass attribute lists keyed on owner class name.

Since:
EclipseLink 1.2 for the JPA 2.0 Reference Implementation

getPartitioningPolicies

public java.util.Map<java.lang.String,PartitioningPolicy> getPartitioningPolicies()
PUBLIC: Return the map of partitioning policies, keyed by name.


setPartitioningPolicies

public void setPartitioningPolicies(java.util.Map<java.lang.String,PartitioningPolicy> partitioningPolicies)
PUBLIC: Set the map of partitioning policies, keyed by name.


addPartitioningPolicy

public void addPartitioningPolicy(PartitioningPolicy partitioningPolicy)
PUBLIC: Set the map of partitioning policies, keyed by name.


getPartitioningPolicy

public PartitioningPolicy getPartitioningPolicy(java.lang.String name)
PUBLIC: Return the partitioning policies for the name.


EclipseLink 2.2.0, build 'v20110202-r8913' API Reference