|
Oracle TopLink Java API Reference 10g Release 3 (10.1.3.1) B28219-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
RootDescriptor
oracle.toplink.descriptors.ClassDescriptor
Purpose: Abstract descriptor class for defining persistence information on a class. This class provides the data independent behavior and is subclassed, for relational, object-relational, EIS, XML, etc.
RelationalDescriptor
, ObjectRelationalDescriptor
, EISDescriptor
, XMLDescriptor
, Serialized FormField Summary | |
static int |
DO_NOT_SEND_CHANGES |
static int |
INVALIDATE_CHANGED_OBJECTS |
static int |
ISOLATE_CACHE_AFTER_TRANSACTION |
static int |
ISOLATE_CACHE_ALWAYS |
static int |
ISOLATE_NEW_DATA_AFTER_TRANSACTION |
static int |
SEND_NEW_OBJECTS_WITH_CHANGES |
static int |
SEND_OBJECT_CHANGES |
static int |
UNDEFINED_OBJECT_CHANGE_BEHAVIOR Configures how objects will be sent via cache synchronization, if synchronization is enabled. |
static int |
USE_SESSION_CACHE_AFTER_TRANSACTION Configures how the unit of work uses the session cache. |
Constructor Summary | |
ClassDescriptor() PUBLIC: Return a new descriptor. |
Method Summary | |
void |
addAbstractQueryKey(java.lang.String queryKeyName) PUBLIC: This method should only be used for interface descriptors. |
void |
addConstraintDependencies(java.lang.Class dependencies) ADVANCED: TopLink automatically orders database access through the foreign key information provided in 1:1 and 1:m mappings. |
DatabaseMapping |
addDirectMapping(java.lang.String attributeName, java.lang.String fieldName) PUBLIC: Add a direct mapping to the receiver. |
DatabaseMapping |
addDirectMapping(java.lang.String attributeName, java.lang.String getMethodName, java.lang.String setMethodName, java.lang.String fieldName) PUBLIC: Add a direct mapping to the receiver. |
void |
addDirectQueryKey(java.lang.String queryKeyName, java.lang.String fieldName) PUBLIC: Add a query key to the descriptor. |
DatabaseMapping |
addMapping(DatabaseMapping mapping) PUBLIC: Add a database mapping to the receiver. |
void |
addMultipleTableForeignKeyFieldName(java.lang.String fieldNameInSourceTable, java.lang.String fieldNameInTargetTable) PUBLIC: This protocol can be used to associate multiple tables with foreign key information. |
void |
addMultipleTablePrimaryKeyFieldName(java.lang.String fieldNameInSourceTable, java.lang.String fieldNameInTargetTable) PUBLIC: This protocol can be used to map the primary key field names in a multiple table descriptor. |
void |
addPrimaryKeyField(DatabaseField field) ADVANCED: Specify the primary key field of the descriptors table. |
void |
addPrimaryKeyFieldName(java.lang.String fieldName) PUBLIC: Specify the primary key field of the descriptors table. |
void |
addQueryKey(QueryKey queryKey) PUBLIC: Add a query key to the descriptor. |
void |
alwaysConformResultsInUnitOfWork() PUBLIC: Used to set the descriptor to always conform in any unit of work query. |
void |
alwaysRefreshCache() PUBLIC: This method is the equivalent of calling setShouldAlwaysRefreshCache(boolean) with an argument of true : it configures a Descriptor to always refresh the cache if data is received from the database by any query. |
void |
alwaysRefreshCacheOnRemote() PUBLIC: This method is the equivalent of calling setShouldAlwaysRefreshCacheOnRemote(boolean) with an argument of true : it configures a Descriptor to always remotely refresh the cache if data is received from the database by any query in a RemoteSession . |
void |
applyAmendmentMethod() ADVANCED: Call the descriptor amendment method. |
void |
createCopyPolicy(java.lang.String policyType) PUBLIC: Create a copy policy of the type passed in as a string. |
void |
createInstantiationPolicy(java.lang.String policyType) PUBLIC: Create a instantiation policy of the type passed in as a string. |
void |
descriptorIsAggregate() PUBLIC: Sets the descriptor to be an aggregate. |
void |
descriptorIsAggregateCollection() PUBLIC: Sets the descriptor to be part of an aggregate collection. |
void |
descriptorIsForInterface() PUBLIC: Sets the descriptor to be for an interface. |
void |
descriptorIsNormal() PUBLIC: Sets the descriptor to be normal. |
void |
disableCacheHits() PUBLIC: Allow for cache hits on primary key read object queries to be disabled. |
void |
disableCacheHitsOnRemote() PUBLIC: Allow for remote session cache hits on primary key read object queries to be disabled. |
void |
dontAlwaysConformResultsInUnitOfWork() PUBLIC: The descriptor is defined to not conform the results in unit of work in read query. |
void |
dontAlwaysRefreshCache() PUBLIC: This method is the equivalent of calling setShouldAlwaysRefreshCache(boolean) with an argument of false : it ensures that a Descriptor is not configured to always refresh the cache if data is received from the database by any query. |
void |
dontAlwaysRefreshCacheOnRemote() PUBLIC: This method is the equivalent of calling setShouldAlwaysRefreshCacheOnRemote(boolean) with an argument of false : it ensures that a Descriptor is not configured to always remotely refresh the cache if data is received from the database by any query in a RemoteSession . |
void |
dontDisableCacheHits() PUBLIC: Allow for cache hits on primary key read object queries. |
void |
dontDisableCacheHitsOnRemote() PUBLIC: Allow for remote session cache hits on primary key read object queries. |
void |
dontOnlyRefreshCacheIfNewerVersion() PUBLIC: This method is the equivalent of calling setShouldOnlyRefreshCacheIfNewerVersion(boolean) with an argument of false : it ensures that a Descriptor is not configured to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field). |
java.lang.String |
getAlias() PUBLIC: Get the alias |
java.lang.Class |
getAmendmentClass() PUBLIC: Return the amendment class. |
java.lang.String |
getAmendmentMethodName() PUBLIC: Return the amendment method. |
CacheInvalidationPolicy |
getCacheInvalidationPolicy() PUBLIC: Return the CacheInvalidationPolicy for this descriptor For uninitialized cache invalidation policies, this will return a NoExpiryCacheInvalidationPolicy |
int |
getCacheSynchronizationType() PUBLIC: Get a value indicating the type of cache synchronization that will be used on objects of this type. |
CMPPolicy |
getCMPPolicy() ADVANCED: Return the cmp descriptor that holds EJB CMP specific information. |
java.util.Vector |
getConstraintDependencies() ADVANCED: TopLink automatically orders database access through the foreign key information provided in 1:1 and 1:m mappings. |
CopyPolicy |
getCopyPolicy() PUBLIC: Returns the copy policy. |
DescriptorEventManager |
getDescriptorEventManager() PUBLIC: Get the event manager for the descriptor. |
InheritancePolicy |
getDescriptorInheritancePolicy() PUBLIC: The inheritance policy is used to define how a descriptor takes part in inheritance. |
DescriptorQueryManager |
getDescriptorQueryManager() PUBLIC: Return the queryManager. |
int |
getDescriptorType() ADVANCED: return the descriptor type (NORMAL by default, others include INTERFACE, AGGREGATE, AGGREGATE COLLECTION) |
FetchGroupManager |
getFetchGroupManager() PUBLIC: Get the fetch group manager for the descriptor. |
HistoryPolicy |
getHistoryPolicy() PUBLIC: Return this descriptors HistoryPolicy. |
int |
getIdentityMapSize() PUBLIC: Return the size of the identity map. |
InstantiationPolicy |
getInstantiationPolicy() PUBLIC: Returns the instantiation policy. |
InterfacePolicy |
getInterfacePolicy() PUBLIC: Returns the InterfacePolicy. |
java.lang.Class |
getJavaClass() PUBLIC: Return the java class. |
DatabaseMapping |
getMappingForAttributeName(java.lang.String attributeName) PUBLIC: Returns the mapping associated with a given attribute name. |
java.util.Vector |
getMappings() PUBLIC: Returns mappings |
oracle.toplink.descriptors.changetracking.ObjectChangePolicy |
getObjectChangePolicy() PUBLIC: Return this objects ObjectChangePolicy. |
OptimisticLockingPolicy |
getOptimisticLockingPolicy() PUBLIC: Returns the OptimisticLockingPolicy. |
java.util.Vector |
getPrimaryKeyFieldNames() PUBLIC: Return the names of all the primary keys. |
java.util.List |
getPrimaryKeyFields() PUBLIC: Return all the primary key fields |
java.util.Map |
getProperties() PUBLIC: Returns the user defined properties. |
java.lang.Object |
getProperty(java.lang.String name) PUBLIC: Returns the descriptor property associated the given String. |
QueryKey |
getQueryKeyNamed(java.lang.String queryKeyName) PUBLIC: Return the query key with the specified name |
java.util.Map |
getQueryKeys() PUBLIC: Return the query keys. |
int |
getRemoteIdentityMapSize() PUBLIC: Return the size of the remote identity map. |
ReturningPolicy |
getReturningPolicy() PUBLIC: Return returning policy. |
java.lang.String |
getSequenceNumberFieldName() PUBLIC: Get sequence number field name |
java.lang.String |
getSequenceNumberName() PUBLIC: Get sequence number name |
java.lang.String |
getSessionName() PUBLIC: Return the name of the session local to this descriptor. |
WrapperPolicy |
getWrapperPolicy() ADVANCED: Return the WrapperPolicy for this descriptor. |
boolean |
hasCascadeLockingPolicies() PUBLIC: |
boolean |
hasInheritance() PUBLIC: Return if this descriptor is involved in inheritence, (is child or parent). |
boolean |
hasInterfacePolicy() PUBLIC: Return if this descriptor is involved in interface, (is child or parent). |
boolean |
hasMultipleTables() PUBLIC: Check if descriptor has multiple tables |
boolean |
hasReturningPolicy() PUBLIC: Return if this descriptor has Returning policy. |
boolean |
hasWrapperPolicy() PUBLIC: Return if a wrapper policy is used. |
boolean |
isAggregateCollectionDescriptor() PUBLIC: Return true if this descriptor is an aggregate collection descriptor |
boolean |
isAggregateDescriptor() PUBLIC: Return true if this descriptor is an aggregate descriptor |
boolean |
isChildDescriptor() PUBLIC: Return if the descriptor defines inheritence and is a child. |
boolean |
isDescriptorForCMP() PUBLIC: Return true if the descriptor is a CMP entity descriptor |
boolean |
isDescriptorForInterface() PUBLIC: Return if the java class is interface |
boolean |
isFullyInitialized() PUBLIC: Check if the descriptor is finished initialization. |
boolean |
isInterfaceChildDescriptor() PUBLIC: Return if the descriptor defines inheritence and is a child. |
boolean |
isIsolated() PUBLIC: Returns true if the descriptor represents an isolated class |
boolean |
isMultipleTableDescriptor() PUBLIC: Return if this descriptor has more than one table. |
void |
onlyRefreshCacheIfNewerVersion() PUBLIC: This method is the equivalent of calling setShouldOnlyRefreshCacheIfNewerVersion(boolean) with an argument of true : it configures a Descriptor to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field) and as long as one of the following is true: the Descriptor was configured by calling alwaysRefreshCache() or alwaysRefreshCacheOnRemote() , the query was configured by calling ObjectLevelReadQuery.refreshIdentityMapResult() , or the query was a call to Session.refreshObject(java.lang.Object) However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. |
void |
removeProperty(java.lang.String property) PUBLIC: Remove the user defined property. |
void |
setAlias(java.lang.String alias) PUBLIC: Set the alias |
void |
setAmendmentClass(java.lang.Class amendmentClass) PUBLIC: Set the amendment class. |
void |
setAmendmentMethodName(java.lang.String amendmentMethodName) PUBLIC: Set the amendment method. |
void |
setCacheInvalidationPolicy(CacheInvalidationPolicy policy) PUBLIC: Set the Cache Invalidation Policy for this descriptor |
void |
setCacheSynchronizationType(int type) PUBLIC: Set the type of cache synchonization that will be used on objects of this type. |
void |
setCMPPolicy(CMPPolicy newCMPPolicy) ADVANCED: Set the cmp descriptor that holds EJB CMP specific information. |
void |
setCopyPolicy(CopyPolicy policy) PUBLIC: Set the copy policy. |
void |
setDescriptorType(int descriptorType) ADVANCED: set the descriptor type (NORMAL by default, others include INTERFACE, AGGREGATE, AGGREGATE COLLECTION) |
void |
setFetchGroupManager(FetchGroupManager fetchGroupManager) PUBLIC: Set the fetch group manager for the descriptor. |
void |
setHistoryPolicy(HistoryPolicy policy) PUBLIC: Set the HistoryPolicy for this descriptor. |
void |
setIdentityMapClass(java.lang.Class theIdentityMapClass) PUBLIC: Set the class of identity map to be used by this descriptor. |
void |
setIdentityMapSize(int identityMapSize) PUBLIC: Set the size of the identity map to be used by this descriptor. |
void |
setInheritancePolicy(InheritancePolicy inheritancePolicy) PUBLIC: Sets the inheritance policy. |
void |
setInstantiationPolicy(InstantiationPolicy instantiationPolicy) PUBLIC: Sets the instantiation policy. |
void |
setInterfacePolicy(InterfacePolicy interfacePolicy) PUBLIC: Sets the interface policy. |
void |
setIsIsolated(boolean isIsolated) PUBLIC: Used to set if the class that this descriptor represents should be isolated from the shared cache. |
void |
setJavaClass(java.lang.Class theJavaClass) PUBLIC: Set the Java class that this descriptor maps. |
void |
setJavaInterface(java.lang.Class theJavaInterface) PUBLIC: Sets the descriptor to be for an interface. |
void |
setObjectChangePolicy(oracle.toplink.descriptors.changetracking.ObjectChangePolicy policy) PUBLIC: Set the ObjectChangePolicy for this descriptor. |
void |
setOptimisticLockingPolicy(OptimisticLockingPolicy optimisticLockingPolicy) PUBLIC: Set the OptimisticLockingPolicy. |
void |
setPrimaryKeyFieldName(java.lang.String fieldName) PUBLIC: Specify the primary key field of the descriptors table. |
void |
setPrimaryKeyFieldNames(java.util.Vector primaryKeyFieldsName) PUBLIC: User can specify a vector of all the primary key field names if primary key is composite. |
void |
setProperty(java.lang.String name, java.lang.Object value) PUBLIC: Set the user defined property. |
void |
setReadOnly() PUBLIC: Set the descriptor to be read-only. |
void |
setRemoteIdentityMapClass(java.lang.Class theIdentityMapClass) PUBLIC: Set the class of identity map to be used by this descriptor. |
void |
setRemoteIdentityMapSize(int identityMapSize) PUBLIC: Set the size of the identity map to be used by this descriptor. |
void |
setReturningPolicy(ReturningPolicy returningPolicy) PUBLIC: Sets the returning policy. |
void |
setSequenceNumberFieldName(java.lang.String fieldName) PUBLIC: Set the sequence number field name. |
void |
setSequenceNumberName(java.lang.String name) PUBLIC: Set the sequence number name. |
void |
setShouldAlwaysConformResultsInUnitOfWork(boolean shouldAlwaysConformResultsInUnitOfWork) PUBLIC: set if the descriptor is defined to always conform the results in unit of work in read query. |
void |
setShouldAlwaysRefreshCache(boolean shouldAlwaysRefreshCache) PUBLIC: When the shouldAlwaysRefreshCache argument passed into this method is true , this method configures a Descriptor to always refresh the cache if data is received from the database by any query. |
void |
setShouldAlwaysRefreshCacheOnRemote(boolean shouldAlwaysRefreshCacheOnRemote) PUBLIC: When the shouldAlwaysRefreshCacheOnRemote argument passed into this method is true , this method configures a Descriptor to always remotely refresh the cache if data is received from the database by any query in a RemoteSession . |
void |
setShouldBeReadOnly(boolean shouldBeReadOnly) PUBLIC: Define if the descriptor reference class is read-only |
void |
setShouldDisableCacheHits(boolean shouldDisableCacheHits) PUBLIC: Set if cache hits on primary key read object queries should be disabled. |
void |
setShouldDisableCacheHitsOnRemote(boolean shouldDisableCacheHitsOnRemote) PUBLIC: Set if the remote session cache hits on primary key read object queries is allowed or not. |
void |
setShouldOnlyRefreshCacheIfNewerVersion(boolean shouldOnlyRefreshCacheIfNewerVersion) PUBLIC: When the shouldOnlyRefreshCacheIfNewerVersion argument passed into this method is true , this method configures a Descriptor to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field) and as long as one of the following is true: the Descriptor was configured by calling alwaysRefreshCache() or alwaysRefreshCacheOnRemote() , the query was configured by calling ObjectLevelReadQuery.refreshIdentityMapResult() , or the query was a call to Session.refreshObject(java.lang.Object) However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. |
void |
setShouldOrderMappings(boolean shouldOrderMappings) PUBLIC: This is set to turn off the ordering of mappings. |
void |
setWrapperPolicy(WrapperPolicy wrapperPolicy) ADVANCED: Sets the WrapperPolicy for this descriptor. |
boolean |
shouldAlwaysConformResultsInUnitOfWork() PUBLIC: Return if the descriptor is defined to always conform the results in unit of work in read query. |
boolean |
shouldAlwaysRefreshCache() PUBLIC: This method returns true if the Descriptor is configured to always refresh the cache if data is received from the database by any query. |
boolean |
shouldAlwaysRefreshCacheOnRemote() PUBLIC: This method returns true if the Descriptor is configured to always remotely refresh the cache if data is received from the database by any query in a RemoteSession . |
boolean |
shouldBeReadOnly() PUBLIC: Return if the descriptor reference class is defined as read-only |
boolean |
shouldDisableCacheHits() PUBLIC: Return if for cache hits on primary key read object queries to be disabled. |
boolean |
shouldDisableCacheHitsOnRemote() PUBLIC: Return if the remote server session cache hits on primary key read object queries is aloowed or not. |
boolean |
shouldOnlyRefreshCacheIfNewerVersion() PUBLIC: This method returns true if the Descriptor is configured to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field). |
boolean |
shouldUseCacheIdentityMap() PUBLIC: Return true if this descriptor is using CacheIdentityMap |
boolean |
shouldUseFullIdentityMap() PUBLIC: Return true if this descriptor is using FullIdentityMap |
boolean |
shouldUseHardCacheWeakIdentityMap() PUBLIC: Return true if this descriptor is using HardCacheWeakIdentityMap. |
boolean |
shouldUseNoIdentityMap() PUBLIC: Return true if this descriptor is using NoIdentityMap |
boolean |
shouldUseRemoteCacheIdentityMap() PUBLIC: Return true if this descriptor is using CacheIdentityMap |
boolean |
shouldUseRemoteFullIdentityMap() PUBLIC: Return true if this descriptor is using FullIdentityMap |
boolean |
shouldUseRemoteHardCacheWeakIdentityMap() PUBLIC: Return true if this descriptor is using HardCacheWeakIdentityMap |
boolean |
shouldUseRemoteNoIdentityMap() PUBLIC: Return true if this descriptor is using NoIdentityMap |
boolean |
shouldUseRemoteSoftCacheWeakIdentityMap() PUBLIC: Return true if this descriptor is using SoftCacheWeakIdentityMap |
boolean |
shouldUseRemoteWeakIdentityMap() PUBLIC: Return true if this descriptor is using WeakIdentityMap |
boolean |
shouldUseSoftCacheWeakIdentityMap() PUBLIC: Return true if this descriptor is using SoftCacheWeakIdentityMap. |
boolean |
shouldUseWeakIdentityMap() PUBLIC: Return true if this descriptor is using WeakIdentityMap |
void |
useAllFieldsLocking() PUBLIC: Set the locking policy an all fields locking policy. |
void |
useCacheIdentityMap() PUBLIC: Set the class of identity map to be the cache identity map. |
void |
useChangedFieldsLocking() PUBLIC: Set the locking policy a changed fields locking policy. |
void |
useCloneCopyPolicy() PUBLIC: Specifies that the creation of clones within a unit of work is done by sending the #clone() method to the original object. |
void |
useCloneCopyPolicy(java.lang.String cloneMethodName) PUBLIC: Specifies that the creation of clones within a unit of work is done by sending the cloneMethodName method to the original object. |
void |
useDefaultConstructorInstantiationPolicy() PUBLIC: Use the default constructor to create new instances of objects built from the database. |
void |
useFactoryInstantiationPolicy(java.lang.Class factoryClass, java.lang.String methodName) PUBLIC: Use an object factory to create new instances of objects built from the database. |
void |
useFactoryInstantiationPolicy(java.lang.Class factoryClass, java.lang.String methodName, java.lang.String factoryMethodName) PUBLIC: Use an object factory to create new instances of objects built from the database. |
void |
useFactoryInstantiationPolicy(java.lang.Object factory, java.lang.String methodName) PUBLIC: Use an object factory to create new instances of objects built from the database. |
void |
useFactoryInstantiationPolicy(java.lang.String factoryClassName, java.lang.String methodName) PUBLIC: Set the factory class name, used by the MW. |
void |
useFactoryInstantiationPolicy(java.lang.String factoryClassName, java.lang.String methodName, java.lang.String factoryMethodName) PUBLIC: Set the factory class name, used by the MW. |
void |
useFullIdentityMap() PUBLIC: Set the class of identity map to be the full identity map. |
void |
useHardCacheWeakIdentityMap() PUBLIC: Set the class of identity map to be the hard cache weak identity map. |
void |
useInstantiationCopyPolicy() PUBLIC: Specifies that the creation of clones within a unit of work is done by building a new instance using the technique indicated by the descriptor's instantiation policy (which by default is to use the the default constructor). |
void |
useMethodInstantiationPolicy(java.lang.String staticMethodName) PUBLIC: Use the specified static method to create new instances of objects built from the database. |
void |
useNoIdentityMap() PUBLIC: Set the class of identity map to be the no identity map. |
void |
useRemoteCacheIdentityMap() PUBLIC: Set the class of identity map to be the cache identity map. |
void |
useRemoteFullIdentityMap() PUBLIC: Set the class of identity map to be the full identity map. |
void |
useRemoteHardCacheWeakIdentityMap() PUBLIC: Set the class of identity map to be the hard cache weak identity map. |
void |
useRemoteNoIdentityMap() PUBLIC: Set the class of identity map to be the no identity map. |
void |
useRemoteSoftCacheWeakIdentityMap() PUBLIC: Set the class of identity map to be the soft cache weak identity map. |
void |
useRemoteWeakIdentityMap() PUBLIC: Set the class of identity map to be the weak identity map. |
void |
useSelectedFieldsLocking(java.util.Vector fieldNames) PUBLIC: Set the locking policy a selected fields locking policy. |
boolean |
usesFieldLocking() PUBLIC: Return true if the receiver uses either all or changed fields for optimistic locking. |
void |
useSoftCacheWeakIdentityMap() PUBLIC: Set the class of identity map to be the soft cache weak identity map. |
boolean |
usesOptimisticLocking() PUBLIC: Return true if the receiver uses write (optimistic) locking. |
boolean |
usesSequenceNumbers() PUBLIC: Return true if the receiver uses sequence numbers. |
void |
useTimestampLocking(java.lang.String writeLockFieldName) PUBLIC: Use the Timestamps locking policy and storing the value in the cache key #see useVersionLocking(String) |
void |
useTimestampLocking(java.lang.String writeLockFieldName, boolean shouldStoreInCache) PUBLIC: Set the locking policy to use timestamp version locking. |
void |
useVersionLocking(java.lang.String writeLockFieldName) PUBLIC: Default to use the version locking policy and storing the value in the cache key #see useVersionLocking(String) |
void |
useVersionLocking(java.lang.String writeLockFieldName, boolean shouldStoreInCache) PUBLIC: Set the locking policy to use numeric version locking. |
void |
useWeakIdentityMap() PUBLIC: Set the class of identity map to be the weak identity map. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UNDEFINED_OBJECT_CHANGE_BEHAVIOR
public static final int SEND_OBJECT_CHANGES
public static final int INVALIDATE_CHANGED_OBJECTS
public static final int SEND_NEW_OBJECTS_WITH_CHANGES
public static final int DO_NOT_SEND_CHANGES
public static final int USE_SESSION_CACHE_AFTER_TRANSACTION
public static final int ISOLATE_NEW_DATA_AFTER_TRANSACTION
public static final int ISOLATE_CACHE_AFTER_TRANSACTION
public static final int ISOLATE_CACHE_ALWAYS
Constructor Detail |
public ClassDescriptor()
Method Detail |
public void addAbstractQueryKey(java.lang.String queryKeyName)
public void addConstraintDependencies(java.lang.Class dependencies)
public DatabaseMapping addDirectMapping(java.lang.String attributeName, java.lang.String fieldName)
public DatabaseMapping addDirectMapping(java.lang.String attributeName, java.lang.String getMethodName, java.lang.String setMethodName, java.lang.String fieldName)
public void addDirectQueryKey(java.lang.String queryKeyName, java.lang.String fieldName)
public DatabaseMapping addMapping(DatabaseMapping mapping)
public void addMultipleTableForeignKeyFieldName(java.lang.String fieldNameInSourceTable, java.lang.String fieldNameInTargetTable) throws DescriptorException
DescriptorException
public void addMultipleTablePrimaryKeyFieldName(java.lang.String fieldNameInSourceTable, java.lang.String fieldNameInTargetTable) throws DescriptorException
DescriptorException
public void addPrimaryKeyFieldName(java.lang.String fieldName)
#addMultipleTableForeignKeyFieldName(String, String);
public void addPrimaryKeyField(DatabaseField field)
public void addQueryKey(QueryKey queryKey)
public void alwaysConformResultsInUnitOfWork()
public void alwaysRefreshCache()
setShouldAlwaysRefreshCache(boolean)
with an argument of true
: it configures a Descriptor
to always refresh the cache if data is received from the database by any query.
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. For example, by default, when a query for a single object based on its primary key is executed, OracleAS TopLink will first look in the cache for the object. If the object is in the cache, the cached object is returned and data is not refreshed. To avoid cache hits, use the disableCacheHits()
method.
Also note that the UnitOfWork
will not refresh its registered objects.
Use this property with caution because it can lead to poor performance and may refresh on queries when it is not desired. Normally, if you require fresh data, it is better to configure a query with ObjectLevelReadQuery.refreshIdentityMapResult()
. To ensure that refreshes are only done when required, use this method in conjunction with onlyRefreshCacheIfNewerVersion()
.
dontAlwaysRefreshCache()
public void alwaysRefreshCacheOnRemote()
setShouldAlwaysRefreshCacheOnRemote(boolean)
with an argument of true
: it configures a Descriptor
to always remotely refresh the cache if data is received from the database by any query in a RemoteSession
.
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. For example, by default, when a query for a single object based on its primary key is executed, OracleAS TopLink will first look in the cache for the object. If the object is in the cache, the cached object is returned and data is not refreshed. To avoid cache hits, use the disableCacheHitsOnRemote()
method.
Also note that the UnitOfWork
will not refresh its registered objects.
Use this property with caution because it can lead to poor performance and may refresh on queries when it is not desired. Normally, if you require fresh data, it is better to configure a query with ObjectLevelReadQuery.refreshIdentityMapResult()
. To ensure that refreshes are only done when required, use this method in conjunction with #refreshOnlyIfNewerVersion
.
dontAlwaysRefreshCacheOnRemote()
public void applyAmendmentMethod()
public void createCopyPolicy(java.lang.String policyType)
public void createInstantiationPolicy(java.lang.String policyType)
public void descriptorIsAggregate()
public void descriptorIsAggregateCollection()
public void descriptorIsForInterface()
public void descriptorIsNormal()
public void disableCacheHits()
alwaysRefreshCache()
or alwaysRefreshCacheOnRemote()
to ensure queries always go to the database.public void disableCacheHitsOnRemote()
alwaysRefreshCacheOnRemote()
public void dontAlwaysConformResultsInUnitOfWork()
public void dontAlwaysRefreshCache()
setShouldAlwaysRefreshCache(boolean)
with an argument of false
: it ensures that a Descriptor
is not configured to always refresh the cache if data is received from the database by any query.alwaysRefreshCache()
public void dontAlwaysRefreshCacheOnRemote()
setShouldAlwaysRefreshCacheOnRemote(boolean)
with an argument of false
: it ensures that a Descriptor
is not configured to always remotely refresh the cache if data is received from the database by any query in a RemoteSession
.alwaysRefreshCacheOnRemote()
public void dontDisableCacheHits()
disableCacheHits()
public void dontDisableCacheHitsOnRemote()
disableCacheHitsOnRemote()
public void dontOnlyRefreshCacheIfNewerVersion()
setShouldOnlyRefreshCacheIfNewerVersion(boolean)
with an argument of false
: it ensures that a Descriptor
is not configured to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field).onlyRefreshCacheIfNewerVersion()
public java.lang.String getAlias()
public java.lang.Class getAmendmentClass()
public java.lang.String getAmendmentMethodName()
public oracle.toplink.descriptors.changetracking.ObjectChangePolicy getObjectChangePolicy()
public HistoryPolicy getHistoryPolicy()
public CacheInvalidationPolicy getCacheInvalidationPolicy()
CacheInvalidationPolicy
public int getCacheSynchronizationType()
public java.util.Vector getConstraintDependencies()
public CopyPolicy getCopyPolicy()
public int getDescriptorType()
public DescriptorEventManager getDescriptorEventManager()
public int getIdentityMapSize()
public InheritancePolicy getDescriptorInheritancePolicy()
public InstantiationPolicy getInstantiationPolicy()
public InterfacePolicy getInterfacePolicy()
public java.lang.Class getJavaClass()
public DatabaseMapping getMappingForAttributeName(java.lang.String attributeName)
public java.util.Vector getMappings()
public OptimisticLockingPolicy getOptimisticLockingPolicy()
public java.util.Vector getPrimaryKeyFieldNames()
public java.util.List getPrimaryKeyFields()
public java.util.Map getProperties()
public java.lang.Object getProperty(java.lang.String name)
public QueryKey getQueryKeyNamed(java.lang.String queryKeyName)
public java.util.Map getQueryKeys()
public DescriptorQueryManager getDescriptorQueryManager()
public int getRemoteIdentityMapSize()
public ReturningPolicy getReturningPolicy()
public java.lang.String getSequenceNumberFieldName()
public java.lang.String getSequenceNumberName()
public java.lang.String getSessionName()
public WrapperPolicy getWrapperPolicy()
public boolean hasCascadeLockingPolicies()
public boolean hasInheritance()
public boolean hasInterfacePolicy()
public boolean hasMultipleTables()
public boolean hasReturningPolicy()
public boolean hasWrapperPolicy()
public boolean isAggregateCollectionDescriptor()
public boolean isAggregateDescriptor()
public boolean isChildDescriptor()
public boolean isDescriptorForInterface()
public boolean isFullyInitialized()
public boolean isInterfaceChildDescriptor()
public boolean isIsolated()
public boolean isMultipleTableDescriptor()
public void onlyRefreshCacheIfNewerVersion()
setShouldOnlyRefreshCacheIfNewerVersion(boolean)
with an argument of true
: it configures a Descriptor
to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field) and as long as one of the following is true:
Descriptor
was configured by calling alwaysRefreshCache()
or alwaysRefreshCacheOnRemote()
,ObjectLevelReadQuery.refreshIdentityMapResult()
, orSession.refreshObject(java.lang.Object)
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. For example, by default, when a query for a single object based on its primary key is executed, OracleAS TopLink will first look in the cache for the object. If the object is in the cache, the cached object is returned and data is not refreshed. To avoid cache hits, use the disableCacheHits()
method.
Also note that the UnitOfWork
will not refresh its registered objects.
dontOnlyRefreshCacheIfNewerVersion()
public void removeProperty(java.lang.String property)
public void setAlias(java.lang.String alias)
public void setAmendmentClass(java.lang.Class amendmentClass)
public void setAmendmentMethodName(java.lang.String amendmentMethodName)
public void setCacheSynchronizationType(int type)
type
- int The synchronization type for this descriptorpublic void setObjectChangePolicy(oracle.toplink.descriptors.changetracking.ObjectChangePolicy policy)
public void setHistoryPolicy(HistoryPolicy policy)
public void setCacheInvalidationPolicy(CacheInvalidationPolicy policy)
CacheInvalidationPolicy
public void setCopyPolicy(CopyPolicy policy)
public void setDescriptorType(int descriptorType)
public void setIdentityMapClass(java.lang.Class theIdentityMapClass)
public void setIdentityMapSize(int identityMapSize)
public void setInheritancePolicy(InheritancePolicy inheritancePolicy)
public void setInstantiationPolicy(InstantiationPolicy instantiationPolicy)
public void setInterfacePolicy(InterfacePolicy interfacePolicy)
public void setReturningPolicy(ReturningPolicy returningPolicy)
public void setIsIsolated(boolean isIsolated)
public void setJavaClass(java.lang.Class theJavaClass)
public void setJavaInterface(java.lang.Class theJavaInterface)
public void setOptimisticLockingPolicy(OptimisticLockingPolicy optimisticLockingPolicy)
VersionLockingPolicy
, TimestampLockingPolicy
, FieldsLockingPolicy
public void setPrimaryKeyFieldName(java.lang.String fieldName)
addPrimaryKeyFieldName(String)
public void setPrimaryKeyFieldNames(java.util.Vector primaryKeyFieldsName)
addPrimaryKeyFieldName(String)
public void setProperty(java.lang.String name, java.lang.Object value)
public void setRemoteIdentityMapClass(java.lang.Class theIdentityMapClass)
public void setRemoteIdentityMapSize(int identityMapSize)
public void setSequenceNumberFieldName(java.lang.String fieldName)
public void setSequenceNumberName(java.lang.String name)
public void setShouldAlwaysConformResultsInUnitOfWork(boolean shouldAlwaysConformResultsInUnitOfWork)
public void setShouldAlwaysRefreshCache(boolean shouldAlwaysRefreshCache)
shouldAlwaysRefreshCache
argument passed into this method is true
, this method configures a Descriptor
to always refresh the cache if data is received from the database by any query.
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. For example, by default, when a query for a single object based on its primary key is executed, OracleAS TopLink will first look in the cache for the object. If the object is in the cache, the cached object is returned and data is not refreshed. To avoid cache hits, use the disableCacheHits()
method.
Also note that the UnitOfWork
will not refresh its registered objects.
Use this property with caution because it can lead to poor performance and may refresh on queries when it is not desired. Normally, if you require fresh data, it is better to configure a query with ObjectLevelReadQuery.refreshIdentityMapResult()
. To ensure that refreshes are only done when required, use this method in conjunction with onlyRefreshCacheIfNewerVersion()
.
When the shouldAlwaysRefreshCache
argument passed into this method is false
, this method ensures that a Descriptor
is not configured to always refresh the cache if data is received from the database by any query.
alwaysRefreshCache()
, dontAlwaysRefreshCache()
public void setShouldAlwaysRefreshCacheOnRemote(boolean shouldAlwaysRefreshCacheOnRemote)
shouldAlwaysRefreshCacheOnRemote
argument passed into this method is true
, this method configures a Descriptor
to always remotely refresh the cache if data is received from the database by any query in a RemoteSession
. However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. For example, by default, when a query for a single object based on its primary key is executed, OracleAS TopLink will first look in the cache for the object. If the object is in the cache, the cached object is returned and data is not refreshed. To avoid cache hits, use the disableCacheHitsOnRemote()
method.
Also note that the UnitOfWork
will not refresh its registered objects.
Use this property with caution because it can lead to poor performance and may refresh on queries when it is not desired. Normally, if you require fresh data, it is better to configure a query with ObjectLevelReadQuery.refreshIdentityMapResult()
. To ensure that refreshes are only done when required, use this method in conjunction with #refreshOnlyIfNewerVersion
.
When the shouldAlwaysRefreshCacheOnRemote
argument passed into this method is false
, this method ensures that a Descriptor
is not configured to always remotely refresh the cache if data is received from the database by any query in a RemoteSession
.
alwaysRefreshCacheOnRemote()
, dontAlwaysRefreshCacheOnRemote()
public void setShouldBeReadOnly(boolean shouldBeReadOnly)
public void setReadOnly()
public void setShouldDisableCacheHits(boolean shouldDisableCacheHits)
alwaysRefreshCache()
public void setShouldDisableCacheHitsOnRemote(boolean shouldDisableCacheHitsOnRemote)
disableCacheHitsOnRemote()
public void setShouldOnlyRefreshCacheIfNewerVersion(boolean shouldOnlyRefreshCacheIfNewerVersion)
shouldOnlyRefreshCacheIfNewerVersion
argument passed into this method is true
, this method configures a Descriptor
to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field) and as long as one of the following is true:
Descriptor
was configured by calling alwaysRefreshCache()
or alwaysRefreshCacheOnRemote()
,ObjectLevelReadQuery.refreshIdentityMapResult()
, orSession.refreshObject(java.lang.Object)
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. For example, by default, when a query for a single object based on its primary key is executed, OracleAS TopLink will first look in the cache for the object. If the object is in the cache, the cached object is returned and data is not refreshed. To avoid cache hits, use the disableCacheHits()
method.
Also note that the UnitOfWork
will not refresh its registered objects.
When the shouldOnlyRefreshCacheIfNewerVersion
argument passed into this method is false
, this method ensures that a Descriptor
is not configured to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field).
onlyRefreshCacheIfNewerVersion()
, dontOnlyRefreshCacheIfNewerVersion()
public void setShouldOrderMappings(boolean shouldOrderMappings)
public void setWrapperPolicy(WrapperPolicy wrapperPolicy)
public boolean shouldAlwaysConformResultsInUnitOfWork()
public boolean shouldAlwaysRefreshCache()
true
if the Descriptor
is configured to always refresh the cache if data is received from the database by any query. Otherwise, it returns false
.setShouldAlwaysRefreshCache(boolean)
public boolean shouldAlwaysRefreshCacheOnRemote()
true
if the Descriptor
is configured to always remotely refresh the cache if data is received from the database by any query in a RemoteSession
. Otherwise, it returns false
.setShouldAlwaysRefreshCacheOnRemote(boolean)
public boolean shouldBeReadOnly()
public boolean shouldDisableCacheHits()
disableCacheHits()
public boolean shouldDisableCacheHitsOnRemote()
disableCacheHitsOnRemote()
public boolean shouldOnlyRefreshCacheIfNewerVersion()
true
if the Descriptor
is configured to only refresh the cache if the data received from the database by a query is newer than the data in the cache (as determined by the optimistic locking field). Otherwise, it returns false
.setShouldOnlyRefreshCacheIfNewerVersion(boolean)
public boolean shouldUseCacheIdentityMap()
public boolean shouldUseFullIdentityMap()
public boolean shouldUseHardCacheWeakIdentityMap()
public boolean shouldUseNoIdentityMap()
public boolean shouldUseRemoteCacheIdentityMap()
public boolean shouldUseRemoteFullIdentityMap()
public boolean shouldUseRemoteHardCacheWeakIdentityMap()
public boolean shouldUseRemoteNoIdentityMap()
public boolean shouldUseRemoteSoftCacheWeakIdentityMap()
public boolean shouldUseRemoteWeakIdentityMap()
public boolean shouldUseSoftCacheWeakIdentityMap()
public boolean shouldUseWeakIdentityMap()
public void useAllFieldsLocking()
AllFieldsLockingPolicy
public void useCacheIdentityMap()
public void useChangedFieldsLocking()
ChangedFieldsLockingPolicy
public void useCloneCopyPolicy()
useCloneCopyPolicy(String)
public void useCloneCopyPolicy(java.lang.String cloneMethodName)
useCloneCopyPolicy()
public void useInstantiationCopyPolicy()
useCloneCopyPolicy()
, useCloneCopyPolicy(String)
, useDefaultConstructorInstantiationPolicy()
, useMethodInstantiationPolicy(String)
, useFactoryInstantiationPolicy(Class, String)
, useFactoryInstantiationPolicy(Class, String, String)
, useFactoryInstantiationPolicy(Object, String)
public void useDefaultConstructorInstantiationPolicy()
useMethodInstantiationPolicy(String)
, useFactoryInstantiationPolicy(Class, String)
, useFactoryInstantiationPolicy(Class, String, String)
, useFactoryInstantiationPolicy(Object, String)
public void useFactoryInstantiationPolicy(java.lang.Class factoryClass, java.lang.String methodName)
useDefaultConstructorInstantiationPolicy()
, useMethodInstantiationPolicy(String)
, useFactoryInstantiationPolicy(Class, String, String)
, useFactoryInstantiationPolicy(Object, String)
, useFactoryInstantiationPolicy(String, String)
, useFactoryInstantiationPolicy(String, String, String)
public void useFactoryInstantiationPolicy(java.lang.Class factoryClass, java.lang.String methodName, java.lang.String factoryMethodName)
useDefaultConstructorInstantiationPolicy()
, useFactoryInstantiationPolicy(Class, String)
, useMethodInstantiationPolicy(String)
, useFactoryInstantiationPolicy(Object, String)
, useFactoryInstantiationPolicy(String, String)
, useFactoryInstantiationPolicy(String, String, String)
public void useFactoryInstantiationPolicy(java.lang.Object factory, java.lang.String methodName)
useDefaultConstructorInstantiationPolicy()
, useMethodInstantiationPolicy(String)
, useFactoryInstantiationPolicy(Class, String)
, useFactoryInstantiationPolicy(Class, String, String)
, useFactoryInstantiationPolicy(String, String)
, useFactoryInstantiationPolicy(String, String, String)
public void useFactoryInstantiationPolicy(java.lang.String factoryClassName, java.lang.String methodName)
useDefaultConstructorInstantiationPolicy()
, useMethodInstantiationPolicy(String)
, useFactoryInstantiationPolicy(Class, String)
, useFactoryInstantiationPolicy(Class, String, String)
, useFactoryInstantiationPolicy(String, String)
, useFactoryInstantiationPolicy(String, String, String)
public void useFactoryInstantiationPolicy(java.lang.String factoryClassName, java.lang.String methodName, java.lang.String factoryMethodName)
useDefaultConstructorInstantiationPolicy()
, useMethodInstantiationPolicy(String)
, useFactoryInstantiationPolicy(Class, String)
, useFactoryInstantiationPolicy(Class, String, String)
, useFactoryInstantiationPolicy(String, String)
, useFactoryInstantiationPolicy(String, String, String)
public void useFullIdentityMap()
public void useHardCacheWeakIdentityMap()
public void useMethodInstantiationPolicy(java.lang.String staticMethodName)
useDefaultConstructorInstantiationPolicy()
, useFactoryInstantiationPolicy(Class, String)
, useFactoryInstantiationPolicy(Class, String, String)
, useFactoryInstantiationPolicy(Object, String)
public void useNoIdentityMap()
public void useRemoteCacheIdentityMap()
public void useRemoteFullIdentityMap()
public void useRemoteHardCacheWeakIdentityMap()
public void useRemoteNoIdentityMap()
public void useRemoteSoftCacheWeakIdentityMap()
public void useRemoteWeakIdentityMap()
public void useSelectedFieldsLocking(java.util.Vector fieldNames)
SelectedFieldsLockingPolicy
public boolean usesFieldLocking()
public void useSoftCacheWeakIdentityMap()
public boolean usesOptimisticLocking()
public boolean usesSequenceNumbers()
public void useTimestampLocking(java.lang.String writeLockFieldName)
public void useTimestampLocking(java.lang.String writeLockFieldName, boolean shouldStoreInCache)
VersionLockingPolicy
public void useVersionLocking(java.lang.String writeLockFieldName)
public void useVersionLocking(java.lang.String writeLockFieldName, boolean shouldStoreInCache)
TimestampLockingPolicy
public void useWeakIdentityMap()
public CMPPolicy getCMPPolicy()
public void setCMPPolicy(CMPPolicy newCMPPolicy)
public boolean isDescriptorForCMP()
public FetchGroupManager getFetchGroupManager()
FetchGroupTracker
public void setFetchGroupManager(FetchGroupManager fetchGroupManager)
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |