java.lang.Object
org.eclipse.persistence.core.sessions.CoreProject<ClassDescriptor,Login,DatabaseSession>
org.eclipse.persistence.sessions.Project
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
DBWSBuilderModelProject
,DBWSModelProject
,NamespaceResolvableProject
,SchemaModelProject
,SimpleXMLFormatProject
,XMLEntityMappingsMappingProject
,XMLSessionConfigProject
public class Project
extends CoreProject<ClassDescriptor,Login,DatabaseSession>
implements Serializable, Cloneable
Purpose: Maintain all of the EclipseLink configuration information for a system.
Responsibilities:
- Project options and defaults
- Database login information
- Descriptors
- Validate Descriptors
- Maintain sequencing information & other project options
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected Map
<String, ClassDescriptor> Cache the EJBQL descriptor aliases.protected boolean
Flag that allows extended logging of JPA L2 cache or not.protected boolean
Flag that allows extended thread logging or not.protected boolean
Flag that allows add to extended thread logging output thread stack trace or not.protected boolean
Flag that allows native queries or notprotected boolean
Flag that allows query result cache validation or not.protected boolean
Flag that allows call deferral to be disabledprotected boolean
Flag that allows DDL generation of table per tenant multitenant descriptorsprotected Map
<String, AttributeGroup> List of named AttributeGroups - once Project is initialized, these are copied to the Session.protected Collection
<String> used for Caching JPA projectsprotected Login
protected CacheIsolationType
Default value for ClassDescriptor.isIsolated.protected Class
<? extends IdentityMap> Default value for ClassDescriptor.identityMapClass.protected int
Default value for ClassDescriptor.identityMapSize.protected IdValidation
Default value for ClassDescriptor.idValidation.protected QueryResultsCachePolicy
Default value for query caching options for all named queries.Holds the default set of read-only classes that apply to each UnitOfWork.protected boolean
Define the default setting for configuring if dates and calendars are mutable.protected Map
<Class<?>, ClassDescriptor> protected Object
Ensures that only one thread at a time can add/remove descriptorsprotected boolean
Cache if any descriptor has history.protected boolean
Cache if any descriptor is isolated.protected boolean
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
Cache if all descriptors are isolated in the unit of work.protected boolean
Cache if any descriptor is using ProxyIndirection.protected List
<DatabaseQuery> List of queries from JPA that need special processing before execution.protected List
<DatabaseQuery> List of queries from JPA that may special processing and handling before execution.protected ConcurrentFixedCache
PERF: Provide an JPQL parse cache to optimize dynamic JPQL.protected Map
<String, ClassDescriptor> Mapped Superclasses (JPA 2) collection of parent non-relational descriptors keyed on MetadataClass without creating a compile time dependency on JPA.Store the IdClass Id attributes for exclusive use by the Metamodel API Keyed on the fully qualified accessible object owner class name.protected MultitenantPolicy
protected String
protected boolean
Flag that allows transform named stored procedure parameters into positional/index basedprotected List
<ClassDescriptor> protected Map
<String, PartitioningPolicy> Map of named partitioning policies, keyed by their name.protected List
<DatabaseQuery> List of queries - once Project is initialized, these are copied to the Session.protected boolean
Force all queries and relationships to use deferred lock strategy during object building and L2 cache population.protected Map
<String, SQLResultSetMapping> This a collection of 'maps' that allow users to map custom SQL to query resultsprotected Collection
<String> protected String
VPD connection settingsprotected String
-
Constructor Summary
ConstructorDescriptionProject()
PUBLIC: Create a new project.Project
(DatabaseLogin login) PUBLIC: Create a new project that will connect through JDBC using the login information.PUBLIC: Create a new project that will connect through the login information. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAlias
(String alias, ClassDescriptor descriptor) PUBLIC: Add an alias for the descriptor.void
addDefaultReadOnlyClass
(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, DatabaseSessionImpl session) INTERNAL: Used by the BuilderInterface when reading a Project from INI files.void
addDescriptors
(Collection descriptors, DatabaseSessionImpl session) INTERNAL: Add the descriptors to the session.void
addDescriptors
(Project project, DatabaseSessionImpl session) PUBLIC: Merge the descriptors from another project into this one.void
addJPAQuery
(DatabaseQuery query) INTERNAL: Return all pre-defined not yet parsed EJBQL queries.void
INTERNAL: Return all pre-defined not yet parsed EJBQL queries to table per tenant entities.void
addMappedSuperclass
(String key, ClassDescriptor value, boolean replace) INTERNAL: 266912: Add a descriptor to the Map of mappedSuperclass descriptorsvoid
addMetamodelIdClassMapEntry
(String ownerName, 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.boolean
INTERNAL: Return true if extended logging of JPA L2 cache usage is allowed on this project.boolean
INTERNAL: Return true if extended thread logging is allowed on this project.boolean
INTERNAL: Return true if thread dumps will be added to extended thread logging.boolean
INTERNAL: Return true if native sql is allowed on this project.boolean
INTERNAL: Return true if SQL calls can defer to EOT on this project.boolean
INTERNAL: Return true if native sql is allowed on this project.void
INTERNAL: Default apply login implementation.void
PUBLIC: Switch all descriptors to assume existence for non-null primary keys.void
PUBLIC: Switch all descriptors to check the cache for existence.void
PUBLIC: Switch all descriptors to check the database for existence.clone()
INTERNAL: Clones the descriptorvoid
PUBLIC: Set all this project's descriptors to conform all read queries within the context of the unit of work.void
convertClassNamesToClasses
(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings in this project to actual class-based settings.PUBLIC: Factory method to create session.PUBLIC: Factory method to create a server session.createServerSession
(int min, int max) PUBLIC: Factory method to create a server session.createServerSession
(int initial, int min, int max) PUBLIC: Factory method to create a server session.createServerSession
(ConnectionPolicy defaultConnectionPolicy) PUBLIC: Factory method to create a server session.INTERNAL: Returns the alias descriptors hashtable.INTERNAL: List of named AttributesGroups that will be copied to the session at initialization time.getClassDescriptor
(Class<?> theClass) PUBLIC: Return the descriptor specified for the class.INTERNAL: Returns all classes in this project that are needed for weaving.PUBLIC: Return the login, the login holds any database connection information given.PUBLIC: Return the project level default for class cache isolation;Class
<? extends IdentityMap> PUBLIC: Return default value for descriptor cache type.int
PUBLIC: Return default value descriptor cache size.PUBLIC: Return default value for descriptor primary key validation.PUBLIC: Return the default values for query caching options for all named queries.PUBLIC: Returns the default set of read-only classes.boolean
PUBLIC: Return the default setting for configuring if dates and calendars are mutable.getDescriptor
(Class<?> theClass) PUBLIC: Return the descriptor specified for the class.getDescriptorForAlias
(String alias) PUBLIC: Return the descriptor for the aliasMap
<Class<?>, ClassDescriptor> PUBLIC: Return the descriptors in a ClassDescriptors Map keyed on the Java class.INTERNAL: Return all pre-defined not yet parsed JPQL queries.INTERNAL: Return all pre-defined not yet parsed JPQL queries to table per tenant entities.INTERNAL: Return the JPQL parse cache.int
ADVANCED: Return the JPQL parse cache max size.getLogin()
OBSOLETE: Return the login, the login holds any database connection information given.INTERNAL: Use the Metadata key parameter to lookup the Descriptor from the Map of mappedSuperclass descriptorsINTERNAL: Return the Map of RelationalDescriptor objects representing mapped superclass parents keyed by className of the metadata class.INTERNAL: Return the Map of IdClass attribute lists keyed on owner class name.INTERNAL:getName()
PUBLIC: get the name of the project.INTERNAL: Return the descriptors in the order added.PUBLIC: Return the map of partitioning policies, keyed by name.getPartitioningPolicy
(String name) PUBLIC: Return the partitioning policies for the name.INTERNAL: List of queries that upon initialization are copied over to the sessiongetSQLResultSetMapping
(String sqlResultSetMapping) PUBLIC: Get a named SQLResultSetMapping from this project.INTERNAL: Returns structure converter class names that would be set on the databasePlatform instance This is used to avoid the platform instance changing at login.INTERNAL: Return the VPD identifier for this project.INTERNAL: Return the name of the last class to set a VPD identifiers.boolean
INTERNAL: Answers if at least one Descriptor or Mapping had a HistoryPolicy at initialize time.boolean
INTERNAL: Return whether this project has a descriptor that is both Isolated and has a cache isolation level other than ISOLATE_CACHE_ALWAYSboolean
INTERNAL: Return if any descriptors are isolated.boolean
hasMappedSuperclass
(String className) INTERNAL: Return whether the given class is mapped as superclass.boolean
INTERNAL: Return whether there any mappings that are mapped superclasses.boolean
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
INTERNAL: Return if any descriptors are not isolated to the unit of work.boolean
INTERNAL: Return if any descriptors use ProxyIndirection.boolean
hasSQLResultSetMapping
(String sqlResultSetMapping) PUBLIC: Return true if the sql result set mapping name exists.boolean
hasVPDIdentifier
(AbstractSession session) PUBLIC: Return true if there is a VPD identifier for this project.boolean
INTERNAL: Flag that allows query result cache validation or not.boolean
PUBLIC: Get property to Force all queries and relationships to use deferred lock strategy during object building and L2 cache population.boolean
INTERNAL: Return true is allowed to transform named stored procedure parameters into positional/index based.void
setAliasDescriptors
(Map<String, ClassDescriptor> aHashtable) INTERNAL: Set the alias descriptors hashtable.void
setAllowExtendedCacheLogging
(boolean allowExtendedCacheLogging) INTERNAL: Set whether extended logging of JPA L2 cache usage is allowed on this project.void
setAllowExtendedThreadLogging
(boolean allowExtendedThreadLogging) INTERNAL: Set whether extended thread logging is allowed on this project.void
setAllowExtendedThreadLoggingThreadDump
(boolean allowExtendedThreadLoggingThreadDump) INTERNAL: Set if thread dumps will be added to extended thread logging.void
setAllowNativeSQLQueries
(boolean allowNativeSQLQueries) INTERNAL: Set whether native sql is allowed on this project.void
setAllowQueryResultsCacheValidation
(boolean allowQueryResultsCacheValidation) INTERNAL: Set to true to enable query result cache validation or not.void
setAllowSQLDeferral
(boolean allowSQLDeferral) INTERNAL: Set whether sql deferral is allowed on this projectvoid
setAllowTablePerMultitenantDDLGeneration
(boolean allowTablePerMultitenantDDLGeneration) INTERNAL: Set whether ddl generation should allowed for table per tenant multitenant descriptors.void
setClassNamesForWeaving
(Collection<String> classNamesForWeaving) INTERNAL: Returns all classes in this project that are needed for weaving.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
(Class<? extends IdentityMap> 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
setDefaultQueryResultsCachePolicy
(QueryResultsCachePolicy defaultQueryResultsCachePolicy) PUBLIC: Set the default values for query caching options for all named queries.void
setDefaultReadOnlyClasses
(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
(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
(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
PUBLIC: Set the login to be used to connect to the database for this project.void
INTERNAL: Set the multitenant policy.void
PUBLIC: Set the name of the project.void
setNamingIntoIndexed
(boolean namingIntoIndexed) INTERNAL: Set whether named stored procedure parameters is allowed to transform into positional/index based.void
setOrderedDescriptors
(List<ClassDescriptor> orderedDescriptors) INTERNAL: Set the descriptors order.void
setPartitioningPolicies
(Map<String, PartitioningPolicy> partitioningPolicies) PUBLIC: Set the map of partitioning policies, keyed by name.void
setQueries
(List<DatabaseQuery> queries) INTERNAL:void
setQueryCacheForceDeferredLocks
(boolean queryCacheForceDeferredLocks) PUBLIC: Set property to Force all queries and relationships to use deferred lock strategy during object building and L2 cache population.void
setStructConverters
(Collection<String> structConverters) INTERNAL: Returns structure converter class names that would be set on the databasePlatform instance This is used to avoid the platform instance changing at login.void
setVPDIdentifier
(String vpdIdentifier) INTERNAL: Set the VPD identifier for this project.void
setVPDLastIdentifierClassName
(String vpdLastIdentifierClassName) INTERNAL: Set from individual descriptors from the project that set a VPD identifier and used in validation exception.toString()
INTERNAL:void
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
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
PUBLIC: Switch all descriptors to use no identity map.void
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
INTERNAL: Asks each descriptor if is uses optimistic locking.boolean
INTERNAL: Asks each descriptor if is uses sequencing.void
PUBLIC: Switch all descriptors to use the weak identity map.void
useWeakIdentityMap
(int initialCacheSize) PUBLIC: Switch all descriptors to use the weak identity map.
-
Field Details
-
name
-
datasourceLogin
-
descriptors
-
orderedDescriptors
-
multitenantPolicy
-
defaultReadOnlyClasses
Holds the default set of read-only classes that apply to each UnitOfWork. -
aliasDescriptors
Cache the EJBQL descriptor aliases. -
hasIsolatedClasses
protected boolean hasIsolatedClassesCache if any descriptor is isolated. (set during initialization) -
hasNonIsolatedUOWClasses
protected boolean hasNonIsolatedUOWClassesCache if all descriptors are isolated in the unit of work. (set during initialization) -
hasGenericHistorySupport
protected boolean hasGenericHistorySupportCache if any descriptor has history. (set during initialization) -
hasProxyIndirection
protected boolean hasProxyIndirectionCache if any descriptor is using ProxyIndirection. (set during initialization -
sqlResultSetMappings
This a collection of 'maps' that allow users to map custom SQL to query results -
jpqlParseCache
PERF: Provide an JPQL parse cache to optimize dynamic JPQL. -
defaultTemporalMutable
protected boolean defaultTemporalMutableDefine the default setting for configuring if dates and calendars are mutable. -
hasMappingsPostCalculateChangesOnDeleted
protected transient boolean hasMappingsPostCalculateChangesOnDeletedIndicates 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
Default value for ClassDescriptor.identityMapClass. -
defaultIdentityMapSize
protected int defaultIdentityMapSizeDefault value for ClassDescriptor.identityMapSize. -
defaultCacheIsolation
Default value for ClassDescriptor.isIsolated. -
defaultQueryResultsCachePolicy
Default value for query caching options for all named queries. -
defaultIdValidation
Default value for ClassDescriptor.idValidation. -
queries
List of queries - once Project is initialized, these are copied to the Session. -
attributeGroups
List of named AttributeGroups - once Project is initialized, these are copied to the Session. -
jpaQueries
List of queries from JPA that need special processing before execution. -
jpaTablePerTenantQueries
List of queries from JPA that may special processing and handling before execution. -
allowNativeSQLQueries
protected boolean allowNativeSQLQueriesFlag that allows native queries or not -
allowTablePerMultitenantDDLGeneration
protected boolean allowTablePerMultitenantDDLGenerationFlag that allows DDL generation of table per tenant multitenant descriptors -
allowSQLDeferral
protected boolean allowSQLDeferralFlag that allows call deferral to be disabled -
namingIntoIndexed
protected boolean namingIntoIndexedFlag that allows transform named stored procedure parameters into positional/index based -
allowExtendedCacheLogging
protected boolean allowExtendedCacheLoggingFlag that allows extended logging of JPA L2 cache or not. -
allowExtendedThreadLogging
protected boolean allowExtendedThreadLoggingFlag that allows extended thread logging or not. -
allowExtendedThreadLoggingThreadDump
protected boolean allowExtendedThreadLoggingThreadDumpFlag that allows add to extended thread logging output thread stack trace or not. -
allowQueryResultsCacheValidation
protected boolean allowQueryResultsCacheValidationFlag that allows query result cache validation or not. -
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
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
Map of named partitioning policies, keyed by their name. -
descriptorsLock
Ensures that only one thread at a time can add/remove descriptors -
vpdIdentifier
VPD connection settings -
vpdLastIdentifierClassName
-
classNamesForWeaving
used for Caching JPA projects -
structConverters
-
queryCacheForceDeferredLocks
protected boolean queryCacheForceDeferredLocksForce all queries and relationships to use deferred lock strategy during object building and L2 cache population.
-
-
Constructor Details
-
Project
public Project()PUBLIC: Create a new project. -
Project
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: 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 Details
-
getDefaultQueryResultsCachePolicy
PUBLIC: Return the default values for query caching options for all named queries. -
setDefaultQueryResultsCachePolicy
public void setDefaultQueryResultsCachePolicy(QueryResultsCachePolicy defaultQueryResultsCachePolicy) PUBLIC: Set the default values for query caching options for all named queries. By default no query caching is used. -
isQueryCacheForceDeferredLocks
public boolean isQueryCacheForceDeferredLocks()PUBLIC: Get property to Force all queries and relationships to use deferred lock strategy during object building and L2 cache population. -
setQueryCacheForceDeferredLocks
public void setQueryCacheForceDeferredLocks(boolean queryCacheForceDeferredLocks) PUBLIC: Set property to Force all queries and relationships to use deferred lock strategy during object building and L2 cache population. By default there is false value - use use mixed object cache locking strategy (depends on relationship and fetch type) -
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. -
getJPAQueries
INTERNAL: Return all pre-defined not yet parsed JPQL queries. -
getJPATablePerTenantQueries
INTERNAL: Return all pre-defined not yet parsed JPQL queries to table per tenant entities. -
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
INTERNAL: Set the JPQL parse cache. This is used to optimize dynamic JPQL. -
getQueries
INTERNAL: List of queries that upon initialization are copied over to the session -
setQueries
INTERNAL: -
getAttributeGroups
INTERNAL: List of named AttributesGroups that will be copied to the session at initialization time. -
setVPDIdentifier
INTERNAL: Set the VPD identifier for this project. This identifier should be populated from a descriptor VPDMultitenantPolicy and should not be set directly. -
setVPDLastIdentifierClassName
INTERNAL: Set from individual descriptors from the project that set a VPD identifier and used in validation exception. -
addDefaultReadOnlyClass
PUBLIC: Add the read-only class which apply to each UnitOfWork created by default. -
addDescriptor
PUBLIC: Add the descriptor to the project.- Specified by:
addDescriptor
in classCoreProject<ClassDescriptor,
Login, DatabaseSession>
-
addDescriptor
INTERNAL: Used by the BuilderInterface when reading a Project from INI files.- Parameters:
descriptor
- The descriptor to be added to the session and the project.session
- The current database session.
-
addDescriptors
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.- Parameters:
descriptors
- The descriptors to be added to the session and the project.session
- The current database session.
-
addDescriptors
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: 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
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.- Specified by:
convertClassNamesToClasses
in classCoreProject<ClassDescriptor,
Login, DatabaseSession>
-
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
INTERNAL: Clones the descriptor -
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.- Specified by:
createDatabaseSession
in classCoreProject<ClassDescriptor,
Login, DatabaseSession>
-
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: 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: 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: 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: Returns the default set of read-only classes. -
getDefaultIdentityMapClass
PUBLIC: Return default value for descriptor cache type. -
getDefaultIdentityMapSize
public int getDefaultIdentityMapSize()PUBLIC: Return default value descriptor cache size. -
getDefaultCacheIsolation
PUBLIC: Return the project level default for class cache isolation; -
getDefaultIdValidation
PUBLIC: Return default value for descriptor primary key validation. -
getClassDescriptor
PUBLIC: Return the descriptor specified for the class. If the passed Class parameter is null, null will be returned. -
getDescriptor
PUBLIC: Return the descriptor specified for the class.- Specified by:
getDescriptor
in classCoreProject<ClassDescriptor,
Login, DatabaseSession>
-
getDescriptors
PUBLIC: Return the descriptors in a ClassDescriptors Map keyed on the Java class. -
getOrderedDescriptors
INTERNAL: Return the descriptors in the order added. Used to maintain consistent order in XML.- Specified by:
getOrderedDescriptors
in classCoreProject<ClassDescriptor,
Login, DatabaseSession>
-
setOrderedDescriptors
INTERNAL: Set the descriptors order. Used to maintain consistent order in XML. -
getClassNamesForWeaving
INTERNAL: Returns all classes in this project that are needed for weaving. This list currently includes entity, embeddables and mappedSuperClasses. -
setClassNamesForWeaving
INTERNAL: Returns all classes in this project that are needed for weaving. This list currently includes entity, embeddables and mappedSuperClasses. -
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: 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.- Specified by:
getDatasourceLogin
in classCoreProject<ClassDescriptor,
Login, DatabaseSession>
-
getName
PUBLIC: get the name of the project. -
getSQLResultSetMapping
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. -
getStructConverters
INTERNAL: Returns structure converter class names that would be set on the databasePlatform instance This is used to avoid the platform instance changing at login. -
setStructConverters
INTERNAL: Returns structure converter class names that would be set on the databasePlatform instance This is used to avoid the platform instance changing at login. -
getVPDLastIdentifierClassName
INTERNAL: Return the name of the last class to set a VPD identifiers. -
getVPDIdentifier
INTERNAL: Return the VPD identifier for this project. -
getMultitenantPolicy
INTERNAL: -
hasGenericHistorySupport
public boolean hasGenericHistorySupport()INTERNAL: Answers if at least one Descriptor or Mapping had a HistoryPolicy at initialize time. -
setDefaultReadOnlyClasses
PUBLIC: Set the read-only classes which apply to each UnitOfWork create by default. -
setDefaultIdentityMapClass
PUBLIC: Set default value for descriptor cache type. -
setDefaultIdentityMapSize
public void setDefaultIdentityMapSize(int defaultIdentityMapSize) PUBLIC: Set default value descriptor cache size. -
setDefaultCacheIsolation
PUBLIC: Set project level default value for class cache isolation. -
setDefaultIdValidation
PUBLIC: Set default value for descriptor primary key validation. -
setDescriptors
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 -
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: Return true if the sql result set mapping name exists. -
hasVPDIdentifier
PUBLIC: Return true if there is a VPD identifier for this project. Will not be set till after descriptor initialization. -
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: Set the login to be used to connect to the database for this project. -
setMultitenantPolicy
INTERNAL: Set the multitenant policy. -
setLogin
PUBLIC: Set the login to be used to connect to the database for this project.- Specified by:
setLogin
in classCoreProject<ClassDescriptor,
Login, DatabaseSession>
-
setDatasourceLogin
PUBLIC: Set the login to be used to connect to the database for this project. -
setName
PUBLIC: Set the name of the project. -
toString
INTERNAL: -
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
INTERNAL: Returns the alias descriptors hashtable. -
addAlias
PUBLIC: Add an alias for the descriptor. -
allowTablePerMultitenantDDLGeneration
public boolean allowTablePerMultitenantDDLGeneration()INTERNAL: Return true if native sql is allowed on this project. -
allowNativeSQLQueries
public boolean allowNativeSQLQueries()INTERNAL: Return true if native sql is allowed on this project. -
allowSQLDeferral
public boolean allowSQLDeferral()INTERNAL: Return true if SQL calls can defer to EOT on this project. -
namingIntoIndexed
public boolean namingIntoIndexed()INTERNAL: Return true is allowed to transform named stored procedure parameters into positional/index based. -
allowExtendedCacheLogging
public boolean allowExtendedCacheLogging()INTERNAL: Return true if extended logging of JPA L2 cache usage is allowed on this project. -
allowExtendedThreadLogging
public boolean allowExtendedThreadLogging()INTERNAL: Return true if extended thread logging is allowed on this project. -
allowExtendedThreadLoggingThreadDump
public boolean allowExtendedThreadLoggingThreadDump()INTERNAL: Return true if thread dumps will be added to extended thread logging. -
isAllowQueryResultsCacheValidation
public boolean isAllowQueryResultsCacheValidation()INTERNAL: Flag that allows query result cache validation or not. If true result is presented via log messages. -
getDescriptorForAlias
PUBLIC: Return the descriptor for the alias -
setAliasDescriptors
INTERNAL: Set the alias descriptors hashtable. -
setAllowTablePerMultitenantDDLGeneration
public void setAllowTablePerMultitenantDDLGeneration(boolean allowTablePerMultitenantDDLGeneration) INTERNAL: Set whether ddl generation should allowed for table per tenant multitenant descriptors. This will only be true when a non shared emf is used and all the tenant context properties are provided at deploy time. -
setAllowNativeSQLQueries
public void setAllowNativeSQLQueries(boolean allowNativeSQLQueries) INTERNAL: Set whether native sql is allowed on this project. -
setAllowSQLDeferral
public void setAllowSQLDeferral(boolean allowSQLDeferral) INTERNAL: Set whether sql deferral is allowed on this project -
setNamingIntoIndexed
public void setNamingIntoIndexed(boolean namingIntoIndexed) INTERNAL: Set whether named stored procedure parameters is allowed to transform into positional/index based. -
setAllowExtendedCacheLogging
public void setAllowExtendedCacheLogging(boolean allowExtendedCacheLogging) INTERNAL: Set whether extended logging of JPA L2 cache usage is allowed on this project. -
setAllowExtendedThreadLogging
public void setAllowExtendedThreadLogging(boolean allowExtendedThreadLogging) INTERNAL: Set whether extended thread logging is allowed on this project. -
setAllowExtendedThreadLoggingThreadDump
public void setAllowExtendedThreadLoggingThreadDump(boolean allowExtendedThreadLoggingThreadDump) INTERNAL: Set if thread dumps will be added to extended thread logging. -
setAllowQueryResultsCacheValidation
public void setAllowQueryResultsCacheValidation(boolean allowQueryResultsCacheValidation) INTERNAL: Set to true to enable query result cache validation or not. Result is presented via log messages. -
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.- Since:
- EclipseLink 1.2 for the JPA 2.0 Reference Implementation
-
hasMappedSuperclass
INTERNAL: Return whether the given class is mapped as superclass.- Since:
- EclipseLink 2.3 for the JPA 2.0 Reference Implementation
-
addJPAQuery
INTERNAL: Return all pre-defined not yet parsed EJBQL queries. -
addJPATablePerTenantQuery
INTERNAL: Return all pre-defined not yet parsed EJBQL queries to table per tenant entities. -
addMappedSuperclass
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
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
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
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
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: Return the map of partitioning policies, keyed by name. -
setPartitioningPolicies
PUBLIC: Set the map of partitioning policies, keyed by name. -
addPartitioningPolicy
PUBLIC: Set the map of partitioning policies, keyed by name. -
getPartitioningPolicy
PUBLIC: Return the partitioning policies for the name.
-