Module org.eclipse.persistence.core
Package org.eclipse.persistence.mappings
Class AttributeAccessor
- java.lang.Object
-
- org.eclipse.persistence.mappings.AttributeAccessor
-
- All Implemented Interfaces:
Serializable,Cloneable,CoreAttributeAccessor
- Direct Known Subclasses:
InstanceVariableAttributeAccessor,MethodAttributeAccessor,MultitenantPrimaryKeyAccessor,ObjectPersistenceRuntimeXMLProject_11_1_1.IsSetNullPolicyIsSetParametersAttributeAccessor,ObjectPersistenceRuntimeXMLProject_11_1_1.IsSetNullPolicyIsSetParameterTypesAttributeAccessor,ObjectPersistenceRuntimeXMLProject_11_1_1.NullPolicyAttributeAccessor,ValuesAccessor
public abstract class AttributeAccessor extends Object implements CoreAttributeAccessor, Cloneable, Serializable
Purpose: This provides an abstract class for setting and retrieving the attribute value for the mapping from an object. It can be used in advanced situations if the attribute requires advanced conversion of the mapping value, or a real attribute does not exist.
- Since:
- OracleAS TopLink 10g (10.0.3)
- Author:
- James
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected StringattributeNameStores the name of the attributeprotected booleanisReadOnlyprotected booleanisWriteOnly
-
Constructor Summary
Constructors Modifier Constructor Description protectedAttributeAccessor()Default constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Objectclone()INTERNAL: Clones itself.Class<?>getAttributeClass()Return the class type of the attribute.StringgetAttributeName()INTERNAL: Return the attribute name.abstract ObjectgetAttributeValueFromObject(Object object)Return the attribute value from the object.voidinitializeAttributes(Class<?> descriptorClass)Allow any initialization to be performed with the descriptor class.booleanisInitialized()Returns true if this attribute accessor has been initialized and now stores a reference to the class's attribute.booleanisInstanceVariableAttributeAccessor()booleanisMapValueAttributeAccessor()booleanisMethodAttributeAccessor()booleanisReadOnly()INTERNALbooleanisValuesAccessor()booleanisVirtualAttributeAccessor()booleanisWriteOnly()INTERNAL:voidsetAttributeName(String attributeName)INTERNAL: Set the attribute name.abstract voidsetAttributeValueInObject(Object object, Object value)Set the attribute value into the object.voidsetIsReadOnly(boolean aBoolean)INTERNALvoidsetIsWriteOnly(boolean aBoolean)INTERNAL:
-
-
-
Field Detail
-
attributeName
protected String attributeName
Stores the name of the attribute
-
isWriteOnly
protected boolean isWriteOnly
-
isReadOnly
protected boolean isReadOnly
-
-
Method Detail
-
getAttributeName
public String getAttributeName()
INTERNAL: Return the attribute name.- Specified by:
getAttributeNamein interfaceCoreAttributeAccessor
-
setAttributeName
public void setAttributeName(String attributeName)
INTERNAL: Set the attribute name.
-
getAttributeClass
public Class<?> getAttributeClass()
Return the class type of the attribute.- Specified by:
getAttributeClassin interfaceCoreAttributeAccessor
-
initializeAttributes
public void initializeAttributes(Class<?> descriptorClass) throws DescriptorException
Allow any initialization to be performed with the descriptor class.- Specified by:
initializeAttributesin interfaceCoreAttributeAccessor- Throws:
DescriptorException
-
isInitialized
public boolean isInitialized()
Returns true if this attribute accessor has been initialized and now stores a reference to the class's attribute. An attribute accessor can become uninitialized on serialization.
-
isInstanceVariableAttributeAccessor
public boolean isInstanceVariableAttributeAccessor()
- Specified by:
isInstanceVariableAttributeAccessorin interfaceCoreAttributeAccessor
-
isMapValueAttributeAccessor
public boolean isMapValueAttributeAccessor()
-
isMethodAttributeAccessor
public boolean isMethodAttributeAccessor()
- Specified by:
isMethodAttributeAccessorin interfaceCoreAttributeAccessor
-
isValuesAccessor
public boolean isValuesAccessor()
-
isVirtualAttributeAccessor
public boolean isVirtualAttributeAccessor()
-
isWriteOnly
public boolean isWriteOnly()
INTERNAL:- Specified by:
isWriteOnlyin interfaceCoreAttributeAccessor
-
setIsWriteOnly
public void setIsWriteOnly(boolean aBoolean)
INTERNAL:- Specified by:
setIsWriteOnlyin interfaceCoreAttributeAccessor
-
isReadOnly
public boolean isReadOnly()
INTERNAL
-
setIsReadOnly
public void setIsReadOnly(boolean aBoolean)
INTERNAL- Specified by:
setIsReadOnlyin interfaceCoreAttributeAccessor
-
getAttributeValueFromObject
public abstract Object getAttributeValueFromObject(Object object) throws DescriptorException
Return the attribute value from the object.- Specified by:
getAttributeValueFromObjectin interfaceCoreAttributeAccessor- Throws:
DescriptorException
-
setAttributeValueInObject
public abstract void setAttributeValueInObject(Object object, Object value) throws DescriptorException
Set the attribute value into the object.- Specified by:
setAttributeValueInObjectin interfaceCoreAttributeAccessor- Throws:
DescriptorException
-
-