public class InstanceVariableAttributeAccessor extends AttributeAccessor
Purpose: A wrapper class for handling cases when the domain object has instance varible to map to the database field.
| Modifier and Type | Field and Description |
|---|---|
protected Field |
attributeField
The attribute name of an object is converted to Field type to access it reflectively
|
attributeName| Constructor and Description |
|---|
InstanceVariableAttributeAccessor() |
| Modifier and Type | Method and Description |
|---|---|
Class |
getAttributeClass()
Returns the class type of the attribute.
|
protected Field |
getAttributeField()
Returns the value of attributeField.
|
Class |
getAttributeType()
Returns the declared type of attributeField.
|
Object |
getAttributeValueFromObject(Object anObject)
Returns the value of the attribute on the specified object.
|
void |
initializeAttributes(Class theJavaClass)
instanceVariableName is converted to Field type.
|
protected void |
setAttributeField(Field field)
Sets the value of the attributeField.
|
void |
setAttributeValueInObject(Object anObject,
Object value)
Sets the value of the instance variable in the object to the value.
|
clone, getAttributeName, setAttributeNameprotected transient Field attributeField
public Class getAttributeClass()
getAttributeClass in class AttributeAccessorprotected Field getAttributeField()
public Class getAttributeType()
public Object getAttributeValueFromObject(Object anObject) throws DescriptorException
getAttributeValueFromObject in class AttributeAccessorDescriptorExceptionpublic void initializeAttributes(Class theJavaClass) throws DescriptorException
initializeAttributes in class AttributeAccessorDescriptorExceptionprotected void setAttributeField(Field field)
public void setAttributeValueInObject(Object anObject, Object value) throws DescriptorException
setAttributeValueInObject in class AttributeAccessorDescriptorExceptionCopyright © 2023. All rights reserved.