Top Description Fields Constructors Methods
org.eclipse.persistence.jpa.dynamic

public Class DynamicIdentityPolicy

extends CMP3Policy
Class Inheritance
Imports
org.eclipse.persistence.internal.identitymaps.CacheId, org.eclipse.persistence.internal.jpa.CMP3Policy, org.eclipse.persistence.internal.sessions.AbstractSession

Custom CMPPolicy to handle Object[]. The parent class supports only List and ID class for composite keys.
Author
dclarke
Since
EclipseLink 1.2

Field Summary

Inherited from org.eclipse.persistence.internal.jpa.CMP3Policy:
fieldToAccessorMapkeyClassFieldspkClasspkClassName

Constructor Summary

AccessConstructor and Description
public
DynamicIdentityPolicy()

Default constructor;

Method Summary

Modifier and TypeMethod and Description
public Object
createPrimaryKeyFromId(Object key, AbstractSession session)

Overrides org.eclipse.persistence.internal.jpa.CMP3Policy.createPrimaryKeyFromId.

INTERNAL: Use the key to create a EclipseLink primary key.
protected CMPPolicy.KeyElementAccessor[]
initializePrimaryKeyFields(Class<?> keyClass, AbstractSession session)

Overrides org.eclipse.persistence.internal.jpa.CMP3Policy.initializePrimaryKeyFields.

INTERNAL: Cache the bean's primary key fields so speed up creating of primary key objects and initialization of beans.
Inherited from org.eclipse.persistence.internal.jpa.CMP3Policy:
addReadOnlyMappingsaddWritableMappingcloneconvertClassNamesToClassescreateBeanUsingKeygetFieldgetKeyClassFieldsgetPKClassgetPKClassInstancegetPKClassNamegetPkValueFromKeyForFieldinitializeisCMP3PolicyremoteInitializesetPKClasssetPrimaryKeyClassName

Constructor Detail

DynamicIdentityPolicyback to summary
public DynamicIdentityPolicy()

Default constructor;

Method Detail

createPrimaryKeyFromIdback to summary
public Object createPrimaryKeyFromId(Object key, AbstractSession session)

Overrides org.eclipse.persistence.internal.jpa.CMP3Policy.createPrimaryKeyFromId.

Doc from org.eclipse.persistence.internal.jpa.CMP3Policy.createPrimaryKeyFromId.

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.

Annotations
@Override
initializePrimaryKeyFieldsback to summary
protected CMPPolicy.KeyElementAccessor[] initializePrimaryKeyFields(Class<?> keyClass, AbstractSession session)

Overrides org.eclipse.persistence.internal.jpa.CMP3Policy.initializePrimaryKeyFields.

Doc from org.eclipse.persistence.internal.jpa.CMP3Policy.initializePrimaryKeyFields.

INTERNAL: Cache the bean's primary key fields so speed up creating of primary key objects and initialization of beans. Note, we have to re-look up the fields for the bean class since these fields may have been loaded with the wrong loader (thank you Kirk). If the key is compound, we also have to look up the fields for the key.

Annotations
@Override