|
|||||||||
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 FormField 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) |
static int |
NONE
defer no changes |
static int |
UNDEFINED
undefined if it is non-deferred issue sql at create |
static int |
UPDATE_MODIFICATIONS
defer updates |
Constructor Summary | |
---|---|
CMPPolicy()
|
Method Summary | |
---|---|
void |
convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this object to actual class-based settings. |
Object |
createBeanUsingKey(Object key,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Use the key to create a bean and initialize its primary key fields. |
Object |
createPrimaryKeyFromId(Object key,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Use the key to create a EclipseLink primary key. |
Object |
createPrimaryKeyInstance(Object object,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Create an instance of the Id class or value from the object. |
Object |
createPrimaryKeyInstanceFromId(Object key,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Create an instance of the composite primary key class for the key object. |
Object |
createPrimaryKeyInstanceFromPrimaryKeyValues(org.eclipse.persistence.internal.sessions.AbstractSession session,
int[] elementIndex,
Object... keyElements)
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 |
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 |
Class |
getPKClass()
INTERNAL: |
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,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL: Initialize the CMPPolicy settings. |
Boolean |
internalGetForceUpdate()
INTERNAL: return internal tri-state value so we can decide whether to inherit or not at init time. |
Boolean |
internalGetUpdateAllFields()
INTERNAL: return internal tri-state value so we can decide whether to inherit or not at init time. |
void |
internalSetForceUpdate(Boolean newForceUpdateValue)
INTERNAL: internal method to set the tri-state value. |
void |
internalSetUpdateAllFields(Boolean newUpdateAllFieldsValue)
INTERNAL: internal method to set the tri-state value. |
boolean |
isCMP3Policy()
INTERNAL: Return if this policy is for CMP3. |
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 |
setMappedClass(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 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int UPDATE_MODIFICATIONS
public static final int ALL_MODIFICATIONS
public static final int UNDEFINED
public static final int AFTER_EJBCREATE
public static final int AFTER_EJBPOSTCREATE
Constructor Detail |
---|
public CMPPolicy()
Method Detail |
---|
public int getNonDeferredCreateTime()
public PessimisticLockingPolicy getPessimisticLockingPolicy()
#org.eclipse.persistence.descriptors.PessimisticLockingPolicy
public void setDeferModificationsUntilCommit(int deferralLevel)
public void setMappedClass(Class newMappedClass)
Class
- newMappedClasspublic 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 Boolean internalGetForceUpdate()
public Boolean internalGetUpdateAllFields()
public void internalSetForceUpdate(Boolean newForceUpdateValue)
public void internalSetUpdateAllFields(Boolean newUpdateAllFieldsValue)
public void initialize(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public ClassDescriptor getDescriptor()
public void setDescriptor(ClassDescriptor owningDescriptor)
owningDescriptor
- The owningDescriptor to set.public boolean isCMP3Policy()
public void convertClassNamesToClasses(ClassLoader classLoader)
classLoader
- public Object createPrimaryKeyInstanceFromId(Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)
public Object createPrimaryKeyInstanceFromPrimaryKeyValues(org.eclipse.persistence.internal.sessions.AbstractSession session, int[] elementIndex, Object... keyElements)
public Object createPrimaryKeyInstance(Object object, org.eclipse.persistence.internal.sessions.AbstractSession session)
public Object getPKClassInstance()
public Class getPKClass()
public Object createPrimaryKeyFromId(Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)
public Object createBeanUsingKey(Object key, org.eclipse.persistence.internal.sessions.AbstractSession session)
key
- Object the primary key to use for initializing the bean's
corresponding pk fields
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |