|
EclipseLink 1.0_1.0M2 API Reference - Incubation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.descriptors.CMPPolicy
public class CMPPolicy
Description: Place holder for CMP specific information. This class can be set on the ClassDescriptor.
PessimisticLockingPolicy
,
Serialized FormNested Class Summary | |
---|---|
protected static interface |
CMPPolicy.KeyElementAccessor
INTERNAL: This is the interface used to encapsilate the the type of key class element |
protected class |
CMPPolicy.KeyIsElementAccessor
INTERNAL: This class will be used when the keyClass is a primitive |
Field Summary | |
---|---|
static int |
AFTER_EJBCREATE
issue SQL after ejbCreate but before ejbPostCreate |
static int |
AFTER_EJBPOSTCREATE
issue SQL after ejbPostCreate |
static int |
ALL_MODIFICATIONS
defer all modifications, inserts and deletes included (default) |
protected ClassDescriptor |
descriptor
|
protected int |
forceUpdate
|
protected CMPLifeCycleListener |
lifeCycleListener
Allows for the CMP life-cycle events to be intercepted from core by the CMP integration. |
protected java.lang.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. |
static int |
NONE
defer no changes |
static boolean |
OPTIMIZE_PESSIMISTIC_CMP
|
protected PessimisticLockingPolicy |
pessimisticLockingPolicy
Allow the bean to always be locked as it enters a new transaction. |
static int |
UNDEFINED
undefined if it is non-deferred issue sql at create |
static int |
UPDATE_MODIFICATIONS
defer updates |
protected int |
updateAllFields
|
Constructor Summary | |
---|---|
CMPPolicy()
|
Method Summary | |
---|---|
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this object to actual class-based settings. |
java.lang.Object |
createPrimaryKeyInstance(java.lang.Object key,
AbstractSession session)
INTERNAL: Create an instance of the composite primary key class for the key object. |
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. |
ClassDescriptor |
getDescriptor()
INTERNAL: |
boolean |
getForceUpdate()
ADVANCED: Return true if descriptor is set to always update all registered objects of this type |
protected CMPPolicy.KeyElementAccessor[] |
getKeyClassFields(java.lang.Class clazz)
INTERNAL: |
CMPLifeCycleListener |
getLifeCycleListener()
INTERNAL: Return the CMP life-cycle listener, used to intercept events from core by CMP integration. |
java.lang.Class |
getMappedClass()
PUBLIC: Answer the mapped class. |
int |
getNonDeferredCreateTime()
ADVANCED: This setting is only available for CMP beans that are not being deferred. |
PessimisticLockingPolicy |
getPessimisticLockingPolicy()
PUBLIC: Return the policy for bean pessimistic locking |
java.lang.Class |
getPKClass()
INTERNAL: |
java.lang.Object |
getPKClassInstance()
INTERNAL: |
boolean |
getUpdateAllFields()
ADVANCED: Return true if descriptor is set to update all fields for an object of this type when an update occurs. |
boolean |
hasPessimisticLockingPolicy()
PUBLIC: Return true if bean pessimistic locking is configured |
void |
initialize(ClassDescriptor descriptor,
AbstractSession session)
INTERNAL: Initialize the CMPPolicy settings. |
int |
internalGetForceUpdate()
INTERNAL: return internal tri-state value so we can decide whether to inherit or not at init time. |
int |
internalGetUpdateAllFields()
INTERNAL: return internal tri-state value so we can decide whether to inherit or not at init time. |
void |
internalSetForceUpdate(int newForceUpdateValue)
INTERNAL: internal method to set the tri-state value. |
void |
internalSetUpdateAllFields(int newUpdateAllFieldsValue)
INTERNAL: internal method to set the tri-state value. |
void |
invokeEJBLoad(java.lang.Object bean,
AbstractSession session)
INTERNAL: Allow the ejbLoad life-cycle callback to be called. |
void |
invokeEJBStore(java.lang.Object bean,
AbstractSession session)
INTERNAL: Allow the ejbStore life-cycle callback to be called. |
boolean |
isCMP3Policy()
INTERNAL: Return if this policy is for CMP3. |
void |
postInsert(java.lang.Object bean,
AbstractSession session)
INTERNAL: Notify that the insert operation has occured, allow a sequence primary key to be reset. |
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. |
void |
setDescriptor(ClassDescriptor owningDescriptor)
INTERNAL: |
void |
setForceUpdate(boolean shouldForceUpdate)
ADVANCED: Configure whether TopLink should always update all registered objects of this type. |
void |
setLifeCycleListener(CMPLifeCycleListener lifeCycleListener)
INTERNAL: Set the CMP life-cycle listener, used to intercept events from core by CMP integration. |
void |
setMappedClass(java.lang.Class newMappedClass)
PUBLIC: Define the mapped class. |
void |
setNonDeferredCreateTime(int createTime)
ADVANCED: This setting is only available for CMP beans that are not being deferred. |
void |
setPessimisticLockingPolicy(PessimisticLockingPolicy policy)
PUBLIC: Configure bean pessimistic locking |
void |
setUpdateAllFields(boolean shouldUpdatAllFields)
ADVANCED: Configure whether TopLink should update all fields for an object of this type when an update occurs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean OPTIMIZE_PESSIMISTIC_CMP
protected int forceUpdate
protected int updateAllFields
protected PessimisticLockingPolicy pessimisticLockingPolicy
protected CMPLifeCycleListener lifeCycleListener
protected java.lang.Class mappedClass
protected ClassDescriptor descriptor
protected int modificationDeferralLevel
public static final int NONE
public static final int UPDATE_MODIFICATIONS
public static final int ALL_MODIFICATIONS
protected int nonDeferredCreateTime
public static final int UNDEFINED
public static final int AFTER_EJBCREATE
public static final int AFTER_EJBPOSTCREATE
Constructor Detail |
---|
public CMPPolicy()
Method Detail |
---|
public void postInsert(java.lang.Object bean, AbstractSession session)
public void invokeEJBLoad(java.lang.Object bean, AbstractSession session)
public void invokeEJBStore(java.lang.Object bean, AbstractSession session)
public CMPLifeCycleListener getLifeCycleListener()
public void setLifeCycleListener(CMPLifeCycleListener lifeCycleListener)
public int getNonDeferredCreateTime()
public PessimisticLockingPolicy getPessimisticLockingPolicy()
#org.eclipse.persistence.descriptors.PessimisticLockingPolicy
public void setDeferModificationsUntilCommit(int deferralLevel)
public void setMappedClass(java.lang.Class newMappedClass)
Class
- newMappedClasspublic java.lang.Class getMappedClass()
public void setNonDeferredCreateTime(int createTime)
public void setPessimisticLockingPolicy(PessimisticLockingPolicy policy)
PessimisticLockingPolicy
- policy#org.eclipse.persistence.descriptors.PessimisticLockingPolicy
public boolean hasPessimisticLockingPolicy()
public int getDeferModificationsUntilCommit()
public boolean getForceUpdate()
public void setForceUpdate(boolean shouldForceUpdate)
boolean
- shouldForceUpdatepublic boolean getUpdateAllFields()
public void setUpdateAllFields(boolean shouldUpdatAllFields)
boolean
- shouldUpdatAllFieldspublic int internalGetForceUpdate()
public int internalGetUpdateAllFields()
public void internalSetForceUpdate(int newForceUpdateValue)
public void internalSetUpdateAllFields(int newUpdateAllFieldsValue)
public void initialize(ClassDescriptor descriptor, AbstractSession session) throws DescriptorException
DescriptorException
public ClassDescriptor getDescriptor()
public void setDescriptor(ClassDescriptor owningDescriptor)
owningDescriptor
- The owningDescriptor to set.public boolean isCMP3Policy()
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
classLoader
- public java.lang.Object createPrimaryKeyInstance(java.lang.Object key, AbstractSession session)
public java.lang.Object getPKClassInstance()
public java.lang.Class getPKClass()
protected CMPPolicy.KeyElementAccessor[] getKeyClassFields(java.lang.Class clazz)
|
EclipseLink 1.0_1.0M2 API Reference - Incubation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |