org.eclipse.persistence.mappings
Class AttributeAccessor

java.lang.Object
  extended by org.eclipse.persistence.mappings.AttributeAccessor
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor, SDOFragmentMappingAttributeAccessor

public abstract class AttributeAccessor
extends Object
implements 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

Constructor Summary
AttributeAccessor()
           
 
Method Summary
 Object clone()
          INTERNAL: Clones itself.
 Class getAttributeClass()
          Return the class type of the attribute.
 String getAttributeName()
          INTERNAL: Return the attribute name.
abstract  Object getAttributeValueFromObject(Object object)
          Return the attribute value from the object.
 void initializeAttributes(Class descriptorClass)
          Allow any initialization to be performed with the descriptor class.
 boolean isInitialized()
          Returns true if this attribute accessor has been initialized and now stores a reference to the class's attribute.
 boolean isMethodAttributeAccessor()
           
 boolean isReadOnly()
          INTERNAL
 boolean isWriteOnly()
          INTERNAL:
 void setAttributeName(String attributeName)
          INTERNAL: Set the attribute name.
abstract  void setAttributeValueInObject(Object object, Object value)
          Set the attribute value into the object.
 void setIsReadOnly(boolean aBoolean)
          INTERNAL
 void setIsWriteOnly(boolean aBoolean)
          INTERNAL:
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeAccessor

public AttributeAccessor()
Method Detail

clone

public Object clone()
INTERNAL: Clones itself.

Overrides:
clone in class Object

getAttributeName

public String getAttributeName()
INTERNAL: Return the attribute name.


setAttributeName

public void setAttributeName(String attributeName)
INTERNAL: Set the attribute name.


getAttributeClass

public Class getAttributeClass()
Return the class type of the attribute.


initializeAttributes

public void initializeAttributes(Class descriptorClass)
                          throws DescriptorException
Allow any initialization to be performed with the descriptor class.

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.


isMethodAttributeAccessor

public boolean isMethodAttributeAccessor()

isWriteOnly

public boolean isWriteOnly()
INTERNAL:

Returns:

setIsWriteOnly

public void setIsWriteOnly(boolean aBoolean)
INTERNAL:

Parameters:
aBoolean -

isReadOnly

public boolean isReadOnly()
INTERNAL

Returns:

setIsReadOnly

public void setIsReadOnly(boolean aBoolean)
INTERNAL

Parameters:
aBoolean -

getAttributeValueFromObject

public abstract Object getAttributeValueFromObject(Object object)
                                            throws DescriptorException
Return the attribute value from the object.

Throws:
DescriptorException

setAttributeValueInObject

public abstract void setAttributeValueInObject(Object object,
                                               Object value)
                                        throws DescriptorException
Set the attribute value into the object.

Throws:
DescriptorException