java.lang.Object
de.grogra.reflect.MemberBase
de.grogra.persistence.PersistenceField
- All Implemented Interfaces:
Field,FieldChain,Member
- Direct Known Subclasses:
IndirectField,ManageableType.Field
A
PersistenceField represents a field which can be handled
by classes of the persistence package. It is
an abstract base class; its methods imply that a PersistenceField
is composed of a chain of fields of class
ManageableType.Field. E.g., if an object
has a field location of type javax.vecmath.Point3f,
such a chain could be (location, x) (then it denotes the
x field of the location field of the object).
A chain may involve array components. An array component is either
an array component in the sense of the Java programming language,
e.g., object.values[i], or an element of
java.util.List or one of the primitive list classes in
de.grogra.util, e.g., object.values.get (i).
When a PersistenceField containing array components is
accessed by one of its methods, the indices parameter has
to provide one index for every component. E.g., a field access
object.values[i].locations[j].x is represented
by the chain (values, [], locations, [], x), where
[] represents array components,
and indices = {i, j}.- Author:
- Ole Kniemeyer
-
Field Summary
Fields inherited from class de.grogra.reflect.MemberBase
annots, declaringType, descriptor, modifiers, nameFields inherited from interface de.grogra.reflect.Field
FIELD_0, INTERFACE_MODIFIERS, MODIFIERSFields inherited from interface de.grogra.reflect.Member
ABSTRACT, ACCESS_MODIFIERS, ARRAY, BRIDGE, CONSTANT, FINAL, GLOBAL, INTERFACE, JAVA_MODIFIERS, LOCAL_CLASS, MIN_UNUSED_MODIFIER, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE -
Method Summary
Modifier and TypeMethodDescriptionstatic PersistenceFieldfinal Objectabstract booleangetBoolean(Object o, int[] indices) Returns the value of a field.abstract byteReturns the value of a field.abstract charReturns the value of a field.abstract doubleReturns the value of a field.final FieldgetField(int index) abstract floatReturns the value of a field.abstract intReturns the value of a field.abstract ManageableType.Fieldabstract longReturns the value of a field.abstract Numberabstract Numberabstract ObjectReturns the value of a field.abstract Quantityabstract PersistenceFieldgetShallowSubchain(int begin) abstract shortReturns the value of a field.abstract ManageableType.FieldgetSubfield(int index) abstract voidinsertBoolean(Object o, int[] indices, boolean value, Transaction t) Inserts the givenvalueinto an array.abstract voidinsertByte(Object o, int[] indices, byte value, Transaction t) Inserts the givenvalueinto an array.abstract voidinsertChar(Object o, int[] indices, char value, Transaction t) Inserts the givenvalueinto an array.abstract voidinsertDouble(Object o, int[] indices, double value, Transaction t) Inserts the givenvalueinto an array.abstract voidinsertFloat(Object o, int[] indices, float value, Transaction t) Inserts the givenvalueinto an array.abstract voidinsertInt(Object o, int[] indices, int value, Transaction t) Inserts the givenvalueinto an array.abstract voidinsertLong(Object o, int[] indices, long value, Transaction t) Inserts the givenvalueinto an array.abstract voidinsertObject(Object o, int[] indices, Object value, Transaction t) Inserts the givenvalueinto an array.abstract voidinsertShort(Object o, int[] indices, short value, Transaction t) Inserts the givenvalueinto an array.booleanisWritable(Object object) abstract voidremoveBoolean(Object o, int[] indices, Transaction t) Removes an element from an array.abstract voidremoveByte(Object o, int[] indices, Transaction t) Removes an element from an array.abstract voidremoveChar(Object o, int[] indices, Transaction t) Removes an element from an array.abstract voidremoveDouble(Object o, int[] indices, Transaction t) Removes an element from an array.abstract voidremoveFloat(Object o, int[] indices, Transaction t) Removes an element from an array.abstract voidremoveInt(Object o, int[] indices, Transaction t) Removes an element from an array.abstract voidremoveLong(Object o, int[] indices, Transaction t) Removes an element from an array.abstract voidremoveObject(Object o, int[] indices, Transaction t) Removes an element from an array.abstract voidremoveShort(Object o, int[] indices, Transaction t) Removes an element from an array.final voidset(Object o, int[] indices, Object value, Transaction t) abstract voidsetBoolean(Object o, int[] indices, boolean value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.abstract voidsetByte(Object o, int[] indices, byte value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.abstract voidsetChar(Object o, int[] indices, char value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.abstract voidsetDouble(Object o, int[] indices, double value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.abstract voidsetFloat(Object o, int[] indices, float value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.abstract voidsetInt(Object o, int[] indices, int value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.abstract voidsetLong(Object o, int[] indices, long value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.abstract voidsetObject(Object o, int[] indices, Object value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.abstract voidsetShort(Object o, int[] indices, short value, Transaction t) Sets the value of this field on the instanceousing the givenindicesandt.Methods inherited from class de.grogra.reflect.MemberBase
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getDescriptor, getModifiers, getName, getSimpleName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.reflect.Field
getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getObject, getShort, getType, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setShortMethods inherited from interface de.grogra.reflect.FieldChain
length, overlapsMethods inherited from interface de.grogra.reflect.Member
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getDescriptor, getModifiers, getName, getSimpleName
-
Method Details
-
get
-
getField
- Specified by:
getFieldin interfaceFieldChain
-
getSubfield
-
getLastField
-
getShallowSubchain
-
getQuantity
-
getMinValue
-
getMaxValue
-
isWritable
-
set
-
get
-
setBoolean
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertBoolean
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeBoolean
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getBoolean
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-
setByte
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertByte
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeByte
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getByte
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-
setShort
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertShort
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeShort
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getShort
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-
setChar
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertChar
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeChar
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getChar
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-
setInt
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertInt
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeInt
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getInt
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-
setLong
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertLong
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeLong
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getLong
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-
setFloat
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertFloat
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeFloat
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getFloat
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-
setDouble
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertDouble
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeDouble
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getDouble
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-
setObject
Sets the value of this field on the instanceousing the givenindicesandt.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the new valuet- transaction context- See Also:
-
insertObject
Inserts the givenvalueinto an array. This field has to be an array component indexed byindices. The newvaluewill be inserted at the place of the indexed component.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldsvalue- the value to be insertedt- transaction context- See Also:
-
removeObject
Removes an element from an array. This field has to be an array component indexed byindices. The value at the indexed component will be removed.- Parameters:
o- the instance for which the field is modifiedindices- the indices for array fieldst- transaction context- See Also:
-
getObject
Returns the value of a field.- Parameters:
o- the instance for which the field value is returnedindices- the indices for array fields- Returns:
- the field's value for the instance
pc - See Also:
-