Class VirtualAttributeAccessor
- java.lang.Object
-
- org.eclipse.persistence.mappings.AttributeAccessor
-
- org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
-
- org.eclipse.persistence.internal.descriptors.VirtualAttributeAccessor
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,CoreAttributeAccessor
public class VirtualAttributeAccessor extends MethodAttributeAccessor
- See Also:
- Serialized Form
-
-
Field Summary
-
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
-
-
Constructor Summary
Constructors Constructor Description VirtualAttributeAccessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetAttributeValueFromObject(java.lang.Object anObject)Gets the value of an instance variable in the object.java.lang.ClassgetGetMethodReturnType()Return the method return type.java.lang.ClassgetSetMethodParameterType()Return the set method parameter type.protected java.lang.Class[]getSetMethodParameterTypes()Return the set method parameter types.voidinitializeAttributes(java.lang.Class theJavaClass)Set get and set method after creating these methods by using get and set method namesbooleanisVirtualAttributeAccessor()voidsetAttributeValueInObject(java.lang.Object domainObject, java.lang.Object attributeValue)Sets the value of the instance variable in the object to the value.voidsetValueType(java.lang.Class value)Override the class of the values being stored.-
Methods inherited from class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
getAttributeClass, getAttributeValueFromObject, getGetMethod, getGetMethodName, getSetMethod, getSetMethodName, getSetMethodParameterType, initializeAttributes, isInitialized, isMethodAttributeAccessor, setAttributeValueInObject, setGetMethod, setGetMethodName, setSetMethod, setSetMethodName
-
Methods inherited from class org.eclipse.persistence.mappings.AttributeAccessor
clone, getAttributeName, isInstanceVariableAttributeAccessor, isMapValueAttributeAccessor, isReadOnly, isValuesAccessor, isWriteOnly, setAttributeName, setIsReadOnly, setIsWriteOnly
-
-
-
-
Method Detail
-
getAttributeValueFromObject
public java.lang.Object getAttributeValueFromObject(java.lang.Object anObject) throws DescriptorExceptionGets the value of an instance variable in the object.- Specified by:
getAttributeValueFromObjectin interfaceCoreAttributeAccessor- Overrides:
getAttributeValueFromObjectin classMethodAttributeAccessor- Throws:
DescriptorException
-
getGetMethodReturnType
public java.lang.Class getGetMethodReturnType()
Return the method return type. In a name access usage the return type currently must be Object.class.- Overrides:
getGetMethodReturnTypein classMethodAttributeAccessor- Returns:
-
getSetMethodParameterType
public java.lang.Class getSetMethodParameterType()
Return the set method parameter type. In a name access usage there must be an extra String parameter along with the Object.class type so we must check and return a different index from the parameter types.- Overrides:
getSetMethodParameterTypein classMethodAttributeAccessor
-
getSetMethodParameterTypes
protected java.lang.Class[] getSetMethodParameterTypes()
Return the set method parameter types.- Overrides:
getSetMethodParameterTypesin classMethodAttributeAccessor
-
initializeAttributes
public void initializeAttributes(java.lang.Class theJavaClass) throws DescriptorExceptionSet get and set method after creating these methods by using get and set method names- Specified by:
initializeAttributesin interfaceCoreAttributeAccessor- Overrides:
initializeAttributesin classMethodAttributeAccessor- Throws:
DescriptorException
-
isVirtualAttributeAccessor
public boolean isVirtualAttributeAccessor()
- Overrides:
isVirtualAttributeAccessorin classAttributeAccessor
-
setAttributeValueInObject
public void setAttributeValueInObject(java.lang.Object domainObject, java.lang.Object attributeValue) throws DescriptorExceptionSets the value of the instance variable in the object to the value.- Specified by:
setAttributeValueInObjectin interfaceCoreAttributeAccessor- Overrides:
setAttributeValueInObjectin classMethodAttributeAccessor- Throws:
DescriptorException
-
setValueType
public void setValueType(java.lang.Class value)
Override the class of the values being stored.- Since:
- EclipseLink 2.3
-
-