EclipseLink1.0 - 20080707 API Reference

org.eclipse.persistence.sdo.helper
Class SDOMethodAttributeAccessor

java.lang.Object
  extended by org.eclipse.persistence.mappings.AttributeAccessor
      extended by org.eclipse.persistence.sdo.helper.SDOMethodAttributeAccessor
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SDOMethodAttributeAccessor
extends AttributeAccessor

Purpose: A wrapper class for handling cases when the domain object attributes are to be accessed thru the accessor methods that are called "get" and "set". This is to be used when marsalling/unmarshalling SDODataObjects. The propertyName is the name of the property on the DataObject and that must be set on this accessor.

See Also:
Serialized Form

Field Summary
protected  java.lang.Class attributeClass
           
protected  SDOProperty property
           
 
Fields inherited from class org.eclipse.persistence.mappings.AttributeAccessor
attributeName
 
Constructor Summary
SDOMethodAttributeAccessor(commonj.sdo.Property property)
           
SDOMethodAttributeAccessor(commonj.sdo.Property property, java.lang.Class attributeClass)
           
 
Method Summary
 java.lang.Class getAttributeClass()
          Return the return type of the method accessor.
 java.lang.Object getAttributeValueFromObject(java.lang.Object anObject)
          Gets the value of an instance variable in the object.
 commonj.sdo.Property getProperty()
          INTERNAL:
 void initializeAttributes(java.lang.Class theJavaClass)
          Set get and set method after creating these methods by using get and set method names
 boolean isMethodAttributeAccessor()
          INTERNAL:
 void setAttributeValueInObject(java.lang.Object domainObject, java.lang.Object attributeValue)
          Sets the value of the instance variable in the object to the value.
 void setProperty(commonj.sdo.Property property)
          INTERNAL:
 
Methods inherited from class org.eclipse.persistence.mappings.AttributeAccessor
clone, getAttributeName, isInitialized, setAttributeName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributeClass

protected java.lang.Class attributeClass

property

protected SDOProperty property
Constructor Detail

SDOMethodAttributeAccessor

public SDOMethodAttributeAccessor(commonj.sdo.Property property)

SDOMethodAttributeAccessor

public SDOMethodAttributeAccessor(commonj.sdo.Property property,
                                  java.lang.Class attributeClass)
Method Detail

getAttributeClass

public java.lang.Class getAttributeClass()
Return the return type of the method accessor.

Overrides:
getAttributeClass in class AttributeAccessor

getAttributeValueFromObject

public java.lang.Object getAttributeValueFromObject(java.lang.Object anObject)
                                             throws DescriptorException
Gets the value of an instance variable in the object.

Specified by:
getAttributeValueFromObject in class AttributeAccessor
Throws:
DescriptorException

initializeAttributes

public void initializeAttributes(java.lang.Class theJavaClass)
                          throws DescriptorException
Set get and set method after creating these methods by using get and set method names

Overrides:
initializeAttributes in class AttributeAccessor
Throws:
DescriptorException

isMethodAttributeAccessor

public boolean isMethodAttributeAccessor()
INTERNAL:

Overrides:
isMethodAttributeAccessor in class AttributeAccessor

setAttributeValueInObject

public void setAttributeValueInObject(java.lang.Object domainObject,
                                      java.lang.Object attributeValue)
                               throws DescriptorException
Sets the value of the instance variable in the object to the value.

Specified by:
setAttributeValueInObject in class AttributeAccessor
Throws:
DescriptorException

setProperty

public void setProperty(commonj.sdo.Property property)
INTERNAL:


getProperty

public commonj.sdo.Property getProperty()
INTERNAL:


EclipseLink1.0 - 20080707 API Reference