EclipseLink 2.5.0, build 'v20130425-368d603' API Reference

org.eclipse.persistence.mappings
Class AttributeAccessor

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

public abstract class AttributeAccessor
extends java.lang.Object
implements CoreAttributeAccessor, java.lang.Cloneable, java.io.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:
Serialized Form
Author:
James
Since:
OracleAS TopLink 10g (10.0.3)

Field Summary
protected  java.lang.String attributeName
          Stores the name of the attribute
protected  boolean isReadOnly
           
protected  boolean isWriteOnly
           
 
Constructor Summary
AttributeAccessor()
           
 
Method Summary
 java.lang.Object clone()
          INTERNAL: Clones itself.
 java.lang.Class getAttributeClass()
          Return the class type of the attribute.
 java.lang.String getAttributeName()
          INTERNAL: Return the attribute name.
abstract  java.lang.Object getAttributeValueFromObject(java.lang.Object object)
          Return the attribute value from the object.
 void initializeAttributes(java.lang.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 isInstanceVariableAttributeAccessor()
           
 boolean isMapValueAttributeAccessor()
           
 boolean isMethodAttributeAccessor()
           
 boolean isReadOnly()
          INTERNAL
 boolean isValuesAccessor()
           
 boolean isVirtualAttributeAccessor()
           
 boolean isWriteOnly()
          INTERNAL:
 void setAttributeName(java.lang.String attributeName)
          INTERNAL: Set the attribute name.
abstract  void setAttributeValueInObject(java.lang.Object object, java.lang.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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributeName

protected java.lang.String attributeName
Stores the name of the attribute


isWriteOnly

protected boolean isWriteOnly

isReadOnly

protected boolean isReadOnly
Constructor Detail

AttributeAccessor

public AttributeAccessor()
Method Detail

clone

public java.lang.Object clone()
INTERNAL: Clones itself.

Overrides:
clone in class java.lang.Object

getAttributeName

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

Specified by:
getAttributeName in interface CoreAttributeAccessor

setAttributeName

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


getAttributeClass

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

Specified by:
getAttributeClass in interface CoreAttributeAccessor

initializeAttributes

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

Specified by:
initializeAttributes in interface CoreAttributeAccessor
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:
isInstanceVariableAttributeAccessor in interface CoreAttributeAccessor

isMapValueAttributeAccessor

public boolean isMapValueAttributeAccessor()

isMethodAttributeAccessor

public boolean isMethodAttributeAccessor()
Specified by:
isMethodAttributeAccessor in interface CoreAttributeAccessor

isValuesAccessor

public boolean isValuesAccessor()

isVirtualAttributeAccessor

public boolean isVirtualAttributeAccessor()

isWriteOnly

public boolean isWriteOnly()
INTERNAL:

Returns:

setIsWriteOnly

public void setIsWriteOnly(boolean aBoolean)
INTERNAL:

Specified by:
setIsWriteOnly in interface CoreAttributeAccessor
Parameters:
aBoolean -

isReadOnly

public boolean isReadOnly()
INTERNAL

Returns:

setIsReadOnly

public void setIsReadOnly(boolean aBoolean)
INTERNAL

Specified by:
setIsReadOnly in interface CoreAttributeAccessor
Parameters:
aBoolean -

getAttributeValueFromObject

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

Specified by:
getAttributeValueFromObject in interface CoreAttributeAccessor
Throws:
DescriptorException

setAttributeValueInObject

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

Specified by:
setAttributeValueInObject in interface CoreAttributeAccessor
Throws:
DescriptorException

EclipseLink 2.5.0, build 'v20130425-368d603' API Reference