Top Description Fields Constructors Methods
org.eclipse.persistence.internal.descriptors

public Class InstanceVariableAttributeAccessor

extends AttributeAccessor
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.descriptors.PersistenceObjectAttributeAccessor
Imports
java.lang.reflect.Field, org.eclipse.persistence.exceptions.DescriptorException, org.eclipse.persistence.internal.helper.ConversionManager, .Helper, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, org.eclipse.persistence.mappings.AttributeAccessor

Purpose: A wrapper class for handling cases when the domain object has instance variable to map to the database field.

Author
Sati
Since
TOPLink/Java 1.0

Field Summary

Modifier and TypeField and Description
protected transient Field
attributeField

The attribute name of an object is converted to Field type to access it reflectively

Inherited from org.eclipse.persistence.mappings.AttributeAccessor:
attributeNameisReadOnlyisWriteOnly

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Class<?>
public Field
getAttributeField()

Returns the value of attributeField.

public Class<?>
getAttributeType()

Returns the declared type of attributeField.

public Object
public void
public boolean
isInitialized()

Overrides org.eclipse.persistence.mappings.AttributeAccessor.isInitialized.

Returns true if this attribute accessor has been initialized and now stores a reference to the class's attribute.
public boolean
protected void
setAttributeField(Field field)

Sets the value of the attributeField.

public void
setAttributeValueInObject(final Object anObject, final Object value)

Implements abstract org.eclipse.persistence.mappings.AttributeAccessor.setAttributeValueInObject.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.setAttributeValueInObject.

Sets the value of the instance variable in the object to the value.
Inherited from org.eclipse.persistence.mappings.AttributeAccessor:
clonegetAttributeNameisMapValueAttributeAccessorisMethodAttributeAccessorisReadOnlyisValuesAccessorisVirtualAttributeAccessorisWriteOnlysetAttributeNamesetIsReadOnlysetIsWriteOnly

Field Detail

attributeFieldback to summary
protected transient Field attributeField

The attribute name of an object is converted to Field type to access it reflectively

Constructor Detail

InstanceVariableAttributeAccessorback to summary
public InstanceVariableAttributeAccessor()

Method Detail

getAttributeClassback to summary
public Class<?> getAttributeClass()

Overrides org.eclipse.persistence.mappings.AttributeAccessor.getAttributeClass.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.getAttributeClass.

Returns the class type of the attribute.

Annotations
@Override
getAttributeFieldback to summary
public Field getAttributeField()

Returns the value of attributeField. 266912: For Metamodel API - change visibility from protected

getAttributeTypeback to summary
public Class<?> getAttributeType()

Returns the declared type of attributeField.

getAttributeValueFromObjectback to summary
public Object getAttributeValueFromObject(Object anObject) throws DescriptorException

Implements abstract org.eclipse.persistence.mappings.AttributeAccessor.getAttributeValueFromObject.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.getAttributeValueFromObject.

Returns the value of the attribute on the specified object.

Annotations
@Override
initializeAttributesback to summary
public void initializeAttributes(Class<?> theJavaClass) throws DescriptorException

Overrides org.eclipse.persistence.mappings.AttributeAccessor.initializeAttributes.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.initializeAttributes.

instanceVariableName is converted to Field type.

Annotations
@Override
isInitializedback to summary
public boolean isInitialized()

Overrides org.eclipse.persistence.mappings.AttributeAccessor.isInitialized.

Returns true if this attribute accessor has been initialized and now stores a reference to the class's attribute. An attribute accessor can become uninitialized on serialization.

Annotations
@Override
isInstanceVariableAttributeAccessorback to summary
public boolean isInstanceVariableAttributeAccessor()

Overrides org.eclipse.persistence.mappings.AttributeAccessor.isInstanceVariableAttributeAccessor.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.isInstanceVariableAttributeAccessor.

Annotations
@Override
setAttributeFieldback to summary
protected void setAttributeField(Field field)

Sets the value of the attributeField.

setAttributeValueInObjectback to summary
public void setAttributeValueInObject(final Object anObject, final Object value) throws DescriptorException

Implements abstract org.eclipse.persistence.mappings.AttributeAccessor.setAttributeValueInObject.

Implements org.eclipse.persistence.core.mappings.CoreAttributeAccessor.setAttributeValueInObject.

Sets the value of the instance variable in the object to the value.

Annotations
@Override