Module org.eclipse.persistence.core
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:
Serializable,Cloneable,CoreAttributeAccessor
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.internal.descriptors.MethodAttributeAccessor
getMethod, getMethodName, setMethod, setMethodNameFields inherited from class org.eclipse.persistence.mappings.AttributeAccessor
attributeName, isReadOnly, isWriteOnly -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeValueFromObject(Object anObject) Gets the value of an instance variable in the object.Class<?> Return the method return type.Class<?> Return the set method parameter type.protected Class<?>[]Return the set method parameter types.voidinitializeAttributes(Class<?> theJavaClass) Set get and set method after creating these methods by using get and set method namesbooleanvoidsetAttributeValueInObject(Object domainObject, Object attributeValue) Sets the value of the instance variable in the object to the value.voidsetValueType(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, setSetMethodNameMethods inherited from class org.eclipse.persistence.mappings.AttributeAccessor
clone, getAttributeName, isInstanceVariableAttributeAccessor, isMapValueAttributeAccessor, isReadOnly, isValuesAccessor, isWriteOnly, setAttributeName, setIsReadOnly, setIsWriteOnly
-
Constructor Details
-
VirtualAttributeAccessor
public VirtualAttributeAccessor()
-
-
Method Details
-
getAttributeValueFromObject
Gets the value of an instance variable in the object.- Specified by:
getAttributeValueFromObjectin interfaceCoreAttributeAccessor- Overrides:
getAttributeValueFromObjectin classMethodAttributeAccessor- Throws:
DescriptorException
-
getGetMethodReturnType
Return the method return type. In a name access usage the return type currently must be Object.class.- Overrides:
getGetMethodReturnTypein classMethodAttributeAccessor
-
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
Return the set method parameter types.- Overrides:
getSetMethodParameterTypesin classMethodAttributeAccessor
-
initializeAttributes
Set 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(Object domainObject, Object attributeValue) throws DescriptorException Sets the value of the instance variable in the object to the value.- Specified by:
setAttributeValueInObjectin interfaceCoreAttributeAccessor- Overrides:
setAttributeValueInObjectin classMethodAttributeAccessor- Throws:
DescriptorException
-
setValueType
Override the class of the values being stored.- Since:
- EclipseLink 2.3
-