| Modifier and Type | Class and Description |
|---|---|
| private abstract static class | |
| private static class | CMP3Policy.FieldAccessor
INTERNAL: This class will be used when the element of the keyclass is a field |
| private static class | CMP3Policy.PropertyAccessor
INTERNAL: This class is used when the key class element is a property |
| private static class | CMP3Policy.ValuesFieldAccessor
INTERNAL: This class will be used when the element of the keyclass is a virtual field. |
| Modifier and Type | Field and Description |
|---|---|
| protected transient HashMap | fieldToAccessorMap
Used to look up the KeyElementAccessor for a specific DatabaseField, used for resolving DerivedIds |
| protected transient CMPPolicy. | keyClassFields
Stores the fields for this classes compound primary key class if required. |
| protected Class | |
| protected String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addReadOnlyMappings(ClassDescriptor aDescriptor, DatabaseField field, List<E> allMappings)
INTERNAL: Add the writable mapping for the given field to the allMappings list. |
| protected void | addWritableMapping(ClassDescriptor aDescriptor, DatabaseField field, List<E> allMappings)
INTERNAL: Add the read only mappings for the given field to the allMappings list. |
| public CMP3Policy | clone()
Overrides org. |
| public void | convertClassNamesToClasses(ClassLoader classLoader)
Overrides org. |
| public Object | Returns: ObjectObject the primary key to use for initializing the bean's
corresponding pk fields key, AbstractSession session)Overrides org. |
| public Object | createPrimaryKeyFromId(Object key, AbstractSession session)
Overrides org. |
| protected Field | |
| protected CMPPolicy. | Returns: Returns the keyClassFields.Overrides org. |
| public <T> Class | getPKClass()
Overrides org. |
| public Object | getPKClassInstance()
Overrides org. |
| public String | |
| public Object | Returns: ObjectObject the primary key to use to get the value for the field key, DatabaseField DatabaseField the field to find a value for field, AbstractSession session)INTERNAL: Pull the value for the field from the key. |
| public void | initialize(ClassDescriptor descriptor, AbstractSession session)
Overrides org. |
| protected CMPPolicy. | initializePrimaryKeyFields(Class<?> keyClass, AbstractSession session)
INTERNAL: Cache the bean's primary key fields so speed up creating of primary key objects and initialization of beans. |
| public boolean | isCMP3Policy()
Overrides org. |
| public void | remoteInitialize(ClassDescriptor descriptor, AbstractSession session)
Overrides org. |
| public void | |
| public void |
| fieldToAccessorMap | back to summary |
|---|---|
| protected transient HashMap<DatabaseField, CMPPolicy. Used to look up the KeyElementAccessor for a specific DatabaseField, used for resolving DerivedIds | |
| keyClassFields | back to summary |
|---|---|
| protected transient CMPPolicy. Stores the fields for this classes compound primary key class if required. | |
| pkClass | back to summary |
|---|---|
| protected Class<?> pkClass | |
| pkClassName | back to summary |
|---|---|
| protected String pkClassName | |
| CMP3Policy | back to summary |
|---|---|
| public CMP3Policy() | |
| addReadOnlyMappings | back to summary |
|---|---|
| protected void addReadOnlyMappings(ClassDescriptor aDescriptor, DatabaseField field, List<E> allMappings) INTERNAL: Add the writable mapping for the given field to the allMappings list. | |
| addWritableMapping | back to summary |
|---|---|
| protected void addWritableMapping(ClassDescriptor aDescriptor, DatabaseField field, List<E> allMappings) INTERNAL: Add the read only mappings for the given field to the allMappings list. | |
| clone | back to summary |
|---|---|
| public CMP3Policy clone() Overrides org. INTERNAL: Clone the CMP3Policy
| |
| convertClassNamesToClasses | back to summary |
|---|---|
| public void convertClassNamesToClasses(ClassLoader classLoader) Overrides org. 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) Overrides org. 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) Overrides org. 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.
| |
| getField | back to summary |
|---|---|
| protected Field getField(Class<?> cls, String fieldName) throws NoSuchFieldException INTERNAL:
| |
| getKeyClassFields | back to summary |
|---|---|
| protected CMPPolicy. Overrides org. INTERNAL:
| |
| getPKClass | back to summary |
|---|---|
| public <T> Class Overrides org. INTERNAL: Return the java Class representing the primary key class name
| |
| getPKClassInstance | back to summary |
|---|---|
| public Object getPKClassInstance() Overrides org. INTERNAL:
| |
| getPKClassName | back to summary |
|---|---|
| public String getPKClassName() INTERNAL: | |
| getPkValueFromKeyForField | back to summary |
|---|---|
| public Object getPkValueFromKeyForField(Object key, DatabaseField field, AbstractSession session) INTERNAL: Pull the value for the field from the key.
| |
| initialize | back to summary |
|---|---|
| public void initialize(ClassDescriptor descriptor, AbstractSession session) throws DescriptorException Overrides org. INTERNAL: Initialize the CMPPolicy settings.
| |
| initializePrimaryKeyFields | back to summary |
|---|---|
| protected CMPPolicy. 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. | |
| isCMP3Policy | back to summary |
|---|---|
| public boolean isCMP3Policy() Overrides org. INTERNAL: Return if this policy is for CMP3.
| |
| remoteInitialize | back to summary |
|---|---|
| public void remoteInitialize(ClassDescriptor descriptor, AbstractSession session) throws DescriptorException Overrides org. INTERNAL: Initialize the CMPPolicy settings for remote sessions.
| |
| setPKClass | back to summary |
|---|---|
| public void setPKClass(Class<?> pkClass) ADVANCED: | |
| setPrimaryKeyClassName | back to summary |
|---|---|
| public void setPrimaryKeyClassName(String pkClassName) INTERNAL: | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final DatabaseField | |
| private final boolean | |
| protected final DatabaseMapping |
| Access | Constructor and Description |
|---|---|
| public | CommonAccessor(String attributeName, DatabaseField field, DatabaseMapping mapping, boolean isNestedAccessor)
|
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public DatabaseField | |
| public DatabaseMapping | |
| public boolean |
| attributeName | back to summary |
|---|---|
| private final String attributeName | |
| databaseField | back to summary |
|---|---|
| private final DatabaseField databaseField | |
| isNestedAccessor | back to summary |
|---|---|
| private final boolean isNestedAccessor | |
| mapping | back to summary |
|---|---|
| protected final DatabaseMapping mapping | |
| CommonAccessor | back to summary |
|---|---|
| public CommonAccessor(String attributeName, DatabaseField field, DatabaseMapping mapping, boolean isNestedAccessor) | |
| 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.
| |
| isNestedAccessor | back to summary |
|---|---|
| public boolean isNestedAccessor() Implements org.
| |
| Access | Constructor and Description |
|---|---|
| public | FieldAccessor(CMPPolicy policy, Field field, String attributeName, DatabaseField databaseField, DatabaseMapping mapping, boolean isNestedAccessor)
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | getValue(Object object, AbstractSession session)
Implements org. |
| public void | setValue(Object object, Object value)
Implements org. |
| field | back to summary |
|---|---|
| private final Field field | |
| policy | back to summary |
|---|---|
| private final CMPPolicy policy | |
| FieldAccessor | back to summary |
|---|---|
| public FieldAccessor(CMPPolicy policy, Field field, String attributeName, DatabaseField databaseField, DatabaseMapping mapping, boolean isNestedAccessor) | |
| getValue | back to summary |
|---|---|
| public Object getValue(Object object, AbstractSession session) Implements org.
| |
| setValue | back to summary |
|---|---|
| public void setValue(Object object, Object value) Implements org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Method | |
| private final CMPPolicy | |
| private final Method |
| Access | Constructor and Description |
|---|---|
| public | PropertyAccessor(CMPPolicy policy, Method getMethod, Method setMethod, String attributeName, DatabaseField databaseField, DatabaseMapping mapping, boolean isNestedAccessor)
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | getValue(Object object, AbstractSession session)
Implements org. |
| public void | setValue(Object object, Object value)
Implements org. |
| getMethod | back to summary |
|---|---|
| private final Method getMethod | |
| policy | back to summary |
|---|---|
| private final CMPPolicy policy | |
| setMethod | back to summary |
|---|---|
| private final Method setMethod | |
| PropertyAccessor | back to summary |
|---|---|
| public PropertyAccessor(CMPPolicy policy, Method getMethod, Method setMethod, String attributeName, DatabaseField databaseField, DatabaseMapping mapping, boolean isNestedAccessor) | |
| getValue | back to summary |
|---|---|
| public Object getValue(Object object, AbstractSession session) Implements org.
| |
| setValue | back to summary |
|---|---|
| public void setValue(Object object, Object value) Implements org.
| |
| Access | Constructor and Description |
|---|---|
| public | ValuesFieldAccessor(String attributeName, DatabaseField databaseField, DatabaseMapping mapping, boolean isNestedAccessor)
|
| Modifier and Type | Method and Description |
|---|---|
| public Object | getValue(Object object, AbstractSession session)
Implements org. |
| public void | setValue(Object object, Object value)
Implements org. |
| ValuesFieldAccessor | back to summary |
|---|---|
| public ValuesFieldAccessor(String attributeName, DatabaseField databaseField, DatabaseMapping mapping, boolean isNestedAccessor) | |
| getValue | back to summary |
|---|---|
| public Object getValue(Object object, AbstractSession session) Implements org.
| |
| setValue | back to summary |
|---|---|
| public void setValue(Object object, Object value) Implements org.
| |