Package org.eclipse.persistence.mappings
Class AttributeAccessor
java.lang.Object
org.eclipse.persistence.mappings.AttributeAccessor
- All Implemented Interfaces:
Serializable,Cloneable,CoreAttributeAccessor
- Direct Known Subclasses:
org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor,SDOFragmentMappingAttributeAccessor
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.
- See Also:
- Author:
- James
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringStores the name of the attributeprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()INTERNAL: Clones itself.Return the class type of the attribute.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.booleanReturns true if this attribute accessor has been initialized and now stores a reference to the class's attribute.booleanbooleanbooleanbooleanINTERNALbooleanbooleanbooleanINTERNAL: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 Details
-
attributeName
Stores the name of the attribute -
isWriteOnly
protected boolean isWriteOnly -
isReadOnly
protected boolean isReadOnly
-
-
Constructor Details
-
AttributeAccessor
public AttributeAccessor()
-
-
Method Details
-
clone
INTERNAL: Clones itself. -
getAttributeName
INTERNAL: Return the attribute name.- Specified by:
getAttributeNamein interfaceCoreAttributeAccessor
-
setAttributeName
INTERNAL: Set the attribute name. -
getAttributeClass
Return the class type of the attribute.- Specified by:
getAttributeClassin interfaceCoreAttributeAccessor
-
initializeAttributes
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- Returns:
-
setIsWriteOnly
public void setIsWriteOnly(boolean aBoolean) INTERNAL:- Specified by:
setIsWriteOnlyin interfaceCoreAttributeAccessor- Parameters:
aBoolean-
-
isReadOnly
public boolean isReadOnly()INTERNAL- Returns:
-
setIsReadOnly
public void setIsReadOnly(boolean aBoolean) INTERNAL- Specified by:
setIsReadOnlyin interfaceCoreAttributeAccessor- Parameters:
aBoolean-
-
getAttributeValueFromObject
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
-