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
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 ObjectgetAttributeValueFromObject(Object anObject)Gets the value of an instance variable in the object.Class<?>getGetMethodReturnType()Return the method return type.Class<?>getSetMethodParameterType()Return the set method parameter type.protected Class<?>[]getSetMethodParameterTypes()Return the set method parameter types.voidinitializeAttributes(Class<?> theJavaClass)Set get and set method after creating these methods by using get and set method namesbooleanisVirtualAttributeAccessor()voidsetAttributeValueInObject(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, setSetMethodName
-
Methods inherited from class org.eclipse.persistence.mappings.AttributeAccessor
clone, getAttributeName, isInstanceVariableAttributeAccessor, isMapValueAttributeAccessor, isReadOnly, isValuesAccessor, isWriteOnly, setAttributeName, setIsReadOnly, setIsWriteOnly
-
-
-
-
Method Detail
-
getAttributeValueFromObject
public Object getAttributeValueFromObject(Object anObject) throws DescriptorException
Gets the value of an instance variable in the object.- Specified by:
getAttributeValueFromObjectin interfaceCoreAttributeAccessor- Overrides:
getAttributeValueFromObjectin classMethodAttributeAccessor- Throws:
DescriptorException
-
getGetMethodReturnType
public Class<?> getGetMethodReturnType()
Return the method return type. In a name access usage the return type currently must be Object.class.- Overrides:
getGetMethodReturnTypein classMethodAttributeAccessor
-
getSetMethodParameterType
public 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 Class<?>[] getSetMethodParameterTypes()
Return the set method parameter types.- Overrides:
getSetMethodParameterTypesin classMethodAttributeAccessor
-
initializeAttributes
public void initializeAttributes(Class<?> theJavaClass) throws DescriptorException
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
public void setValueType(Class<?> value)
Override the class of the values being stored.- Since:
- EclipseLink 2.3
-
-