Class SDOMethodAttributeAccessor

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.eclipse.persistence.core.mappings.CoreAttributeAccessor

    public class SDOMethodAttributeAccessor
    extends org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor

    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 marshalling/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

      Fields 
      Modifier and Type Field Description
      protected java.lang.Class attributeClass  
      protected SDOProperty property  
      • Fields inherited from class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor

        getMethod, getMethodName, setMethod, setMethodName
      • Fields inherited from class org.eclipse.persistence.mappings.AttributeAccessor

        attributeName, isReadOnly, isWriteOnly
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      java.lang.Class getGetMethodReturnType()  
      commonj.sdo.Property getProperty()
      INTERNAL:
      java.lang.Class getSetMethodParameterType()  
      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.internal.descriptors.MethodAttributeAccessor

        getAttributeValueFromObject, getGetMethod, getGetMethodName, getSetMethod, getSetMethodName, getSetMethodParameterType, getSetMethodParameterTypes, initializeAttributes, isInitialized, setAttributeValueInObject, setGetMethod, setGetMethodName, setSetMethod, setSetMethodName
      • Methods inherited from class org.eclipse.persistence.mappings.AttributeAccessor

        clone, getAttributeName, isInstanceVariableAttributeAccessor, isMapValueAttributeAccessor, isReadOnly, isValuesAccessor, isVirtualAttributeAccessor, isWriteOnly, setAttributeName, setIsReadOnly, setIsWriteOnly
      • 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
    • 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.
        Specified by:
        getAttributeClass in interface org.eclipse.persistence.core.mappings.CoreAttributeAccessor
        Overrides:
        getAttributeClass in class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
      • getAttributeValueFromObject

        public java.lang.Object getAttributeValueFromObject​(java.lang.Object anObject)
                                                     throws org.eclipse.persistence.exceptions.DescriptorException
        Gets the value of an instance variable in the object.
        Specified by:
        getAttributeValueFromObject in interface org.eclipse.persistence.core.mappings.CoreAttributeAccessor
        Overrides:
        getAttributeValueFromObject in class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
        Throws:
        org.eclipse.persistence.exceptions.DescriptorException
      • initializeAttributes

        public void initializeAttributes​(java.lang.Class theJavaClass)
                                  throws org.eclipse.persistence.exceptions.DescriptorException
        Set get and set method after creating these methods by using get and set method names
        Specified by:
        initializeAttributes in interface org.eclipse.persistence.core.mappings.CoreAttributeAccessor
        Overrides:
        initializeAttributes in class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
        Throws:
        org.eclipse.persistence.exceptions.DescriptorException
      • isMethodAttributeAccessor

        public boolean isMethodAttributeAccessor()
        INTERNAL:
        Specified by:
        isMethodAttributeAccessor in interface org.eclipse.persistence.core.mappings.CoreAttributeAccessor
        Overrides:
        isMethodAttributeAccessor in class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
      • setAttributeValueInObject

        public void setAttributeValueInObject​(java.lang.Object domainObject,
                                              java.lang.Object attributeValue)
                                       throws org.eclipse.persistence.exceptions.DescriptorException
        Sets the value of the instance variable in the object to the value.
        Specified by:
        setAttributeValueInObject in interface org.eclipse.persistence.core.mappings.CoreAttributeAccessor
        Overrides:
        setAttributeValueInObject in class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
        Throws:
        org.eclipse.persistence.exceptions.DescriptorException
      • setProperty

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

        public commonj.sdo.Property getProperty()
        INTERNAL:
      • getGetMethodReturnType

        public java.lang.Class getGetMethodReturnType()
        Overrides:
        getGetMethodReturnType in class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
      • getSetMethodParameterType

        public java.lang.Class getSetMethodParameterType()
        Overrides:
        getSetMethodParameterType in class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor