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, setMethodName
Fields 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.void
initializeAttributes
(Class<?> theJavaClass) Set get and set method after creating these methods by using get and set method namesboolean
void
setAttributeValueInObject
(Object domainObject, Object attributeValue) Sets the value of the instance variable in the object to the value.void
setValueType
(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
-
Constructor Details
-
VirtualAttributeAccessor
public VirtualAttributeAccessor()
-
-
Method Details
-
getAttributeValueFromObject
Gets the value of an instance variable in the object.- Specified by:
getAttributeValueFromObject
in interfaceCoreAttributeAccessor
- Overrides:
getAttributeValueFromObject
in classMethodAttributeAccessor
- Throws:
DescriptorException
-
getGetMethodReturnType
Return the method return type. In a name access usage the return type currently must be Object.class.- Overrides:
getGetMethodReturnType
in 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:
getSetMethodParameterType
in classMethodAttributeAccessor
-
getSetMethodParameterTypes
Return the set method parameter types.- Overrides:
getSetMethodParameterTypes
in classMethodAttributeAccessor
-
initializeAttributes
Set get and set method after creating these methods by using get and set method names- Specified by:
initializeAttributes
in interfaceCoreAttributeAccessor
- Overrides:
initializeAttributes
in classMethodAttributeAccessor
- Throws:
DescriptorException
-
isVirtualAttributeAccessor
public boolean isVirtualAttributeAccessor()- Overrides:
isVirtualAttributeAccessor
in 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:
setAttributeValueInObject
in interfaceCoreAttributeAccessor
- Overrides:
setAttributeValueInObject
in classMethodAttributeAccessor
- Throws:
DescriptorException
-
setValueType
Override the class of the values being stored.- Since:
- EclipseLink 2.3
-