Description: Place holder for CMP specific information. This class can be set on the ClassDescriptor.
org.eclipse.persistence.descriptors.PessimisticLockingPolicy
| Modifier and Type | Class and Description |
|---|---|
| protected static interface | CMPPolicy.KeyElementAccessor
INTERNAL: This is the interface used to encapsulate the the type of key class element |
| protected static class | CMPPolicy.KeyIsElementAccessor
INTERNAL: This class will be used when the keyClass is a primitive |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | AFTER_EJBCREATE
issue SQL after ejbCreate but before ejbPostCreate |
| public static final int | AFTER_EJBPOSTCREATE
issue SQL after ejbPostCreate |
| public static final int | ALL_MODIFICATIONS
defer all modifications, inserts and deletes included (default) |
| protected ClassDescriptor | |
| protected Boolean | |
| protected Class | mappedClass
Class originally mapped, before anything was generated. |
| protected int | modificationDeferralLevel
The object deferral level. |
| protected int | nonDeferredCreateTime
This setting will allow customers to control when Toplink will issue the insert SQL for CMP beans. |
| public static final int | NONE
defer no changes |
| protected PessimisticLockingPolicy | pessimisticLockingPolicy
Allow the bean to always be locked as it enters a new transaction. |
| public static final int | UNDEFINED
undefined if it is non-deferred issue sql at create |
| public static final int | UPDATE_MODIFICATIONS
defer updates |
| protected Boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public CMPPolicy | |
| public void | convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this object to actual class-based settings. |
| public Object | Returns: ObjectObject the primary key to use for initializing the bean's
corresponding pk fields key, AbstractSession session)INTERNAL: Use the key to create a bean and initialize its primary key fields. |
| public Object | createPrimaryKeyFromId(Object key, AbstractSession session)
INTERNAL: Use the key to create a EclipseLink primary key. |
| public Object | createPrimaryKeyInstance(Object object, AbstractSession session)
INTERNAL: Create an instance of the Id class or value from the object. |
| public Object | createPrimaryKeyInstanceFromId(Object key, AbstractSession session)
INTERNAL: Create an instance of the composite primary key class for the key object. |
| public Object | createPrimaryKeyInstanceFromPrimaryKeyValues(AbstractSession session, int[] elementIndex, Object... keyElements)
INTERNAL: Create an instance of the composite primary key class for the key object. |
| public Object | |
| public int | getDeferModificationsUntilCommit()
ADVANCED: This can be used to control when changes to objects are submitted to the database This is only applicable to TopLink's CMP implementation and not available within the core. |
| public ClassDescriptor | |
| public boolean | getForceUpdate()
ADVANCED: Return true if descriptor is set to always update all registered objects of this type |
| protected CMPPolicy. | |
| public Class | |
| public int | getNonDeferredCreateTime()
ADVANCED: This setting is only available for CMP beans that are not being deferred. |
| public PessimisticLockingPolicy | |
| public <T> Class | |
| public <T> T | |
| public boolean | getUpdateAllFields()
ADVANCED: Return true if descriptor is set to update all fields for an object of this type when an update occurs. |
| public boolean | |
| public void | initialize(ClassDescriptor descriptor, AbstractSession session)
INTERNAL: Initialize the CMPPolicy settings. |
| public Boolean | internalGetForceUpdate()
INTERNAL: return internal tri-state value so we can decide whether to inherit or not at init time. |
| public Boolean | internalGetUpdateAllFields()
INTERNAL: return internal tri-state value so we can decide whether to inherit or not at init time. |
| public void | internalSetForceUpdate(Boolean newForceUpdateValue)
INTERNAL: internal method to set the tri-state value. |
| public void | internalSetUpdateAllFields(Boolean newUpdateAllFieldsValue)
INTERNAL: internal method to set the tri-state value. |
| public boolean | |
| protected boolean | isSingleKey(CMPPolicy.
Check to see if there is a single key element. |
| public void | remoteInitialize(ClassDescriptor descriptor, AbstractSession session)
INTERNAL: Initialize the CMPPolicy settings for remote sessions. |
| public void | setDeferModificationsUntilCommit(int deferralLevel)
ADVANCED: This can be set to control when changes to objects are submitted to the database This is only applicable to TopLink's CMP implementation and not available within the core. |
| public void | |
| protected void | setFieldValue(CMPPolicy.
INTERNAL: Recursive method to set a field value in the given key instance. |
| public void | setForceUpdate(boolean shouldForceUpdate)
ADVANCED: Configure whether TopLink should always update all registered objects of this type. |
| public void | |
| public void | setNonDeferredCreateTime(int createTime)
ADVANCED: This setting is only available for CMP beans that are not being deferred. |
| public void | setPessimisticLockingPolicy(PessimisticLockingPolicy policy)
PUBLIC: Configure bean pessimistic locking |
| public void | setUpdateAllFields(boolean shouldUpdatAllFields)
ADVANCED: Configure whether TopLink should update all fields for an object of this type when an update occurs. |
| AFTER_EJBCREATE | back to summary |
|---|---|
| public static final int AFTER_EJBCREATE issue SQL after ejbCreate but before ejbPostCreate | |
| AFTER_EJBPOSTCREATE | back to summary |
|---|---|
| public static final int AFTER_EJBPOSTCREATE issue SQL after ejbPostCreate | |
| ALL_MODIFICATIONS | back to summary |
|---|---|
| public static final int ALL_MODIFICATIONS defer all modifications, inserts and deletes included (default) | |
| descriptor | back to summary |
|---|---|
| protected ClassDescriptor descriptor | |
| forceUpdate | back to summary |
|---|---|
| protected Boolean forceUpdate | |
| mappedClass | back to summary |
|---|---|
| protected Class<?> mappedClass Class originally mapped, before anything was generated. | |
| modificationDeferralLevel | back to summary |
|---|---|
| protected int modificationDeferralLevel The object deferral level. This controls when objects changes will be sent to the Database. | |
| nonDeferredCreateTime | back to summary |
|---|---|
| protected int nonDeferredCreateTime This setting will allow customers to control when Toplink will issue the insert SQL for CMP beans. | |
| NONE | back to summary |
|---|---|
| public static final int NONE defer no changes | |
| pessimisticLockingPolicy | back to summary |
|---|---|
| protected PessimisticLockingPolicy pessimisticLockingPolicy Allow the bean to always be locked as it enters a new transaction. | |
| UNDEFINED | back to summary |
|---|---|
| public static final int UNDEFINED undefined if it is non-deferred issue sql at create | |
| UPDATE_MODIFICATIONS | back to summary |
|---|---|
| public static final int UPDATE_MODIFICATIONS defer updates | |
| updateAllFields | back to summary |
|---|---|
| protected Boolean updateAllFields | |
| CMPPolicy | back to summary |
|---|---|
| public CMPPolicy() | |
| clone | back to summary |
|---|---|
| public CMPPolicy clone() Overrides java. INTERNAL: Clone the CMPPolicy
| |
| convertClassNamesToClasses | back to summary |
|---|---|
| public void convertClassNamesToClasses(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings in this object to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes. | |
| createBeanUsingKey | back to summary |
|---|---|
| public Object createBeanUsingKey(Object key, AbstractSession session) INTERNAL: Use the key to create a bean and initialize its primary key fields. Note If is a compound PK then a primary key object is being used. This method should only be used for 'templates' when executing queries. The bean built will not be given an EntityContext and should not be used as an actual entity bean. | |
| createPrimaryKeyFromId | back to summary |
|---|---|
| public Object createPrimaryKeyFromId(Object key, AbstractSession session) INTERNAL: Use the key to create a EclipseLink primary key. If the key is simple (direct mapped) then just add it to a vector, otherwise must go through the inefficient process of copying the key into the bean and extracting the key from the bean. | |
| createPrimaryKeyInstance | back to summary |
|---|---|
| public Object createPrimaryKeyInstance(Object object, AbstractSession session) INTERNAL: Create an instance of the Id class or value from the object. | |
| createPrimaryKeyInstanceFromId | back to summary |
|---|---|
| public Object createPrimaryKeyInstanceFromId(Object key, AbstractSession session) INTERNAL: Create an instance of the composite primary key class for the key object. | |
| createPrimaryKeyInstanceFromPrimaryKeyValues | back to summary |
|---|---|
| public Object createPrimaryKeyInstanceFromPrimaryKeyValues(AbstractSession session, int[] elementIndex, Object... keyElements) INTERNAL: Create an instance of the composite primary key class for the key object. Yes the elementIndex looks strange but this is just a simple way to get the index to be pass-by-reference | |
| getClassInstance | back to summary |
|---|---|
| public Object getClassInstance(Class<?> cls) INTERNAL: Return a new instance of the class provided. | |
| getDeferModificationsUntilCommit | back to summary |
|---|---|
| public int getDeferModificationsUntilCommit() ADVANCED: This can be used to control when changes to objects are submitted to the database This is only applicable to TopLink's CMP implementation and not available within the core. | |
| getDescriptor | back to summary |
|---|---|
| public ClassDescriptor getDescriptor() INTERNAL:
| |
| getForceUpdate | back to summary |
|---|---|
| public boolean getForceUpdate() ADVANCED: Return true if descriptor is set to always update all registered objects of this type | |
| getKeyClassFields | back to summary |
|---|---|
| protected CMPPolicy. INTERNAL:
| |
| getMappedClass | back to summary |
|---|---|
| public Class PUBLIC: Answer the mapped class. This is the class which was originally mapped in the MW | |
| getNonDeferredCreateTime | back to summary |
|---|---|
| public int getNonDeferredCreateTime() ADVANCED: This setting is only available for CMP beans that are not being deferred. Using it will allow TopLink to determine if the INSERT SQL should be sent to the database before or after the postCreate call. | |
| getPessimisticLockingPolicy | back to summary |
|---|---|
| public PessimisticLockingPolicy getPessimisticLockingPolicy() PUBLIC: Return the policy for bean pessimistic locking | |
| getPKClass | back to summary |
|---|---|
| public <T> Class INTERNAL: | |
| getPKClassInstance | back to summary |
|---|---|
| public <T> T getPKClassInstance() INTERNAL: | |
| getUpdateAllFields | back to summary |
|---|---|
| public boolean getUpdateAllFields() ADVANCED: Return true if descriptor is set to update all fields for an object of this type when an update occurs. | |
| hasPessimisticLockingPolicy | back to summary |
|---|---|
| public boolean hasPessimisticLockingPolicy() PUBLIC: Return true if bean pessimistic locking is configured | |
| initialize | back to summary |
|---|---|
| public void initialize(ClassDescriptor descriptor, AbstractSession session) throws DescriptorException INTERNAL: Initialize the CMPPolicy settings. | |
| internalGetForceUpdate | back to summary |
|---|---|
| public Boolean internalGetForceUpdate() INTERNAL: return internal tri-state value so we can decide whether to inherit or not at init time. | |
| internalGetUpdateAllFields | back to summary |
|---|---|
| public Boolean internalGetUpdateAllFields() INTERNAL: return internal tri-state value so we can decide whether to inherit or not at init time. | |
| internalSetForceUpdate | back to summary |
|---|---|
| public void internalSetForceUpdate(Boolean newForceUpdateValue) INTERNAL: internal method to set the tri-state value. This is done in InheritancePolicy at init time. | |
| internalSetUpdateAllFields | back to summary |
|---|---|
| public void internalSetUpdateAllFields(Boolean newUpdateAllFieldsValue) INTERNAL: internal method to set the tri-state value. This is done in InheritancePolicy at init time. | |
| isCMP3Policy | back to summary |
|---|---|
| public boolean isCMP3Policy() INTERNAL: Return if this policy is for CMP3. | |
| isSingleKey | back to summary |
|---|---|
| protected boolean isSingleKey(CMPPolicy. Check to see if there is a single key element. Iterate through the list of primary key elements and count only keys that are not part of the Multitenant identifier. | |
| remoteInitialize | back to summary |
|---|---|
| public void remoteInitialize(ClassDescriptor descriptor, AbstractSession session) throws DescriptorException INTERNAL: Initialize the CMPPolicy settings for remote sessions. | |
| setDeferModificationsUntilCommit | back to summary |
|---|---|
| public void setDeferModificationsUntilCommit(int deferralLevel) ADVANCED: This can be set to control when changes to objects are submitted to the database This is only applicable to TopLink's CMP implementation and not available within the core. | |
| setDescriptor | back to summary |
|---|---|
| public void setDescriptor(ClassDescriptor owningDescriptor) INTERNAL:
| |
| setFieldValue | back to summary |
|---|---|
| protected void setFieldValue(CMPPolicy. INTERNAL: Recursive method to set a field value in the given key instance. | |
| setForceUpdate | back to summary |
|---|---|
| public void setForceUpdate(boolean shouldForceUpdate) ADVANCED: Configure whether TopLink should always update all registered objects of this type. Note if set to true, then updateAllFields must also be set to true | |
| setMappedClass | back to summary |
|---|---|
| public void setMappedClass(Class<?> newMappedClass) PUBLIC: Define the mapped class. This is the class which was originally mapped in the MW | |
| setNonDeferredCreateTime | back to summary |
|---|---|
| public void setNonDeferredCreateTime(int createTime) ADVANCED: This setting is only available for CMP beans that are not being deferred. Using it will allow TopLink to determine if the INSERT SQL should be sent to the database before or after the postCreate call. | |
| setPessimisticLockingPolicy | back to summary |
|---|---|
| public void setPessimisticLockingPolicy(PessimisticLockingPolicy policy) PUBLIC: Configure bean pessimistic locking | |
| setUpdateAllFields | back to summary |
|---|---|
| public void setUpdateAllFields(boolean shouldUpdatAllFields) ADVANCED: Configure whether TopLink should update all fields for an object of this type when an update occurs. | |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public DatabaseField | |
| public DatabaseMapping | |
| public Object | |
| public boolean | |
| public void |
| getAttributeName | back to summary |
|---|---|
| public String getAttributeName() | |
| getDatabaseField | back to summary |
|---|---|
| public DatabaseField getDatabaseField() | |
| getMapping | back to summary |
|---|---|
| public DatabaseMapping getMapping() | |
| getValue | back to summary |
|---|---|
| public Object getValue(Object object, AbstractSession session) | |
| isNestedAccessor | back to summary |
|---|---|
| public boolean isNestedAccessor() | |
| setValue | back to summary |
|---|---|
| public void setValue(Object object, Object value) | |
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected DatabaseField | |
| protected DatabaseMapping |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public DatabaseField | |
| public DatabaseMapping | |
| public Object | getValue(Object object, AbstractSession session)
Implements org. |
| public boolean | |
| public void | setValue(Object object, Object value)
Implements org. |
| attributeName | back to summary |
|---|---|
| protected String attributeName | |
| databaseField | back to summary |
|---|---|
| protected DatabaseField databaseField | |
| mapping | back to summary |
|---|---|
| protected DatabaseMapping mapping | |
| KeyIsElementAccessor | back to summary |
|---|---|
| public KeyIsElementAccessor(String attributeName, DatabaseField databaseField, DatabaseMapping mapping) | |
| getAttributeName | back to summary |
|---|---|
| public String getAttributeName() Implements org.
| |
| getDatabaseField | back to summary |
|---|---|
| public DatabaseField getDatabaseField() Implements org.
| |
| getMapping | back to summary |
|---|---|
| public DatabaseMapping getMapping() Implements org.
| |
| getValue | back to summary |
|---|---|
| public Object getValue(Object object, AbstractSession session) Implements org.
| |
| isNestedAccessor | back to summary |
|---|---|
| public boolean isNestedAccessor() Implements org.
| |
| setValue | back to summary |
|---|---|
| public void setValue(Object object, Object value) Implements org.
| |