|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.reflect.MemberBase de.grogra.persistence.PersistenceField
public abstract class PersistenceField
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}
.
Field Summary |
---|
Fields inherited from class de.grogra.reflect.MemberBase |
---|
annots, declaringType, descriptor, modifiers, name |
Fields inherited from interface de.grogra.reflect.Field |
---|
FIELD_0, INTERFACE_MODIFIERS, MODIFIERS |
Fields inherited from interface de.grogra.reflect.Member |
---|
ABSTRACT, ACCESS_MODIFIERS, ARRAY, BRIDGE, CONSTANT, FINAL, INTERFACE, JAVA_MODIFIERS, LOCAL_CLASS, MIN_UNUSED_MODIFIER, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE |
Method Summary | |
---|---|
static PersistenceField |
get(Field field)
|
java.lang.Object |
get(java.lang.Object object,
int[] indices)
|
abstract boolean |
getBoolean(java.lang.Object o,
int[] indices)
Returns the value of a field. |
abstract byte |
getByte(java.lang.Object o,
int[] indices)
Returns the value of a field. |
abstract char |
getChar(java.lang.Object o,
int[] indices)
Returns the value of a field. |
abstract double |
getDouble(java.lang.Object o,
int[] indices)
Returns the value of a field. |
Field |
getField(int index)
|
abstract float |
getFloat(java.lang.Object o,
int[] indices)
Returns the value of a field. |
abstract int |
getInt(java.lang.Object o,
int[] indices)
Returns the value of a field. |
abstract ManageableType.Field |
getLastField()
|
abstract long |
getLong(java.lang.Object o,
int[] indices)
Returns the value of a field. |
abstract java.lang.Number |
getMaxValue()
|
abstract java.lang.Number |
getMinValue()
|
abstract java.lang.Object |
getObject(java.lang.Object o,
int[] indices)
Returns the value of a field. |
abstract Quantity |
getQuantity()
|
abstract PersistenceField |
getShallowSubchain(int begin)
|
abstract short |
getShort(java.lang.Object o,
int[] indices)
Returns the value of a field. |
abstract ManageableType.Field |
getSubfield(int index)
|
abstract void |
insertBoolean(java.lang.Object o,
int[] indices,
boolean value,
Transaction t)
Inserts the given value into an array. |
abstract void |
insertByte(java.lang.Object o,
int[] indices,
byte value,
Transaction t)
Inserts the given value into an array. |
abstract void |
insertChar(java.lang.Object o,
int[] indices,
char value,
Transaction t)
Inserts the given value into an array. |
abstract void |
insertDouble(java.lang.Object o,
int[] indices,
double value,
Transaction t)
Inserts the given value into an array. |
abstract void |
insertFloat(java.lang.Object o,
int[] indices,
float value,
Transaction t)
Inserts the given value into an array. |
abstract void |
insertInt(java.lang.Object o,
int[] indices,
int value,
Transaction t)
Inserts the given value into an array. |
abstract void |
insertLong(java.lang.Object o,
int[] indices,
long value,
Transaction t)
Inserts the given value into an array. |
abstract void |
insertObject(java.lang.Object o,
int[] indices,
java.lang.Object value,
Transaction t)
Inserts the given value into an array. |
abstract void |
insertShort(java.lang.Object o,
int[] indices,
short value,
Transaction t)
Inserts the given value into an array. |
boolean |
isWritable(java.lang.Object object)
|
abstract void |
removeBoolean(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
abstract void |
removeByte(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
abstract void |
removeChar(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
abstract void |
removeDouble(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
abstract void |
removeFloat(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
abstract void |
removeInt(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
abstract void |
removeLong(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
abstract void |
removeObject(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
abstract void |
removeShort(java.lang.Object o,
int[] indices,
Transaction t)
Removes an element from an array. |
void |
set(java.lang.Object o,
int[] indices,
java.lang.Object value,
Transaction t)
|
abstract void |
setBoolean(java.lang.Object o,
int[] indices,
boolean value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
abstract void |
setByte(java.lang.Object o,
int[] indices,
byte value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
abstract void |
setChar(java.lang.Object o,
int[] indices,
char value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
abstract void |
setDouble(java.lang.Object o,
int[] indices,
double value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
abstract void |
setFloat(java.lang.Object o,
int[] indices,
float value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
abstract void |
setInt(java.lang.Object o,
int[] indices,
int value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
abstract void |
setLong(java.lang.Object o,
int[] indices,
long value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
abstract void |
setObject(java.lang.Object o,
int[] indices,
java.lang.Object value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
abstract void |
setShort(java.lang.Object o,
int[] indices,
short value,
Transaction t)
Sets the value of this field on the instance o
using the given indices and t . |
Methods inherited from class de.grogra.reflect.MemberBase |
---|
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getDescriptor, getModifiers, getName, getSimpleName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods 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, setShort |
Methods inherited from interface de.grogra.reflect.Member |
---|
getDeclaredAnnotation, getDeclaredAnnotationCount, getDeclaringType, getDescriptor, getModifiers, getName, getSimpleName |
Methods inherited from interface de.grogra.reflect.FieldChain |
---|
length, overlaps |
Method Detail |
---|
public static PersistenceField get(Field field)
public final java.lang.Object get(java.lang.Object object, int[] indices)
public abstract boolean getBoolean(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public abstract byte getByte(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public abstract char getChar(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public abstract double getDouble(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public final Field getField(int index)
getField
in interface FieldChain
public abstract float getFloat(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public abstract int getInt(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public abstract ManageableType.Field getLastField()
public abstract long getLong(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public abstract java.lang.Number getMaxValue()
public abstract java.lang.Number getMinValue()
public abstract java.lang.Object getObject(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public abstract Quantity getQuantity()
public abstract PersistenceField getShallowSubchain(int begin)
public abstract short getShort(java.lang.Object o, int[] indices)
o
- the instance for which the field value is returnedindices
- the indices for array fields
pc
PersistenceField
public abstract ManageableType.Field getSubfield(int index)
public abstract void insertBoolean(java.lang.Object o, int[] indices, boolean value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public abstract void insertByte(java.lang.Object o, int[] indices, byte value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public abstract void insertChar(java.lang.Object o, int[] indices, char value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public abstract void insertDouble(java.lang.Object o, int[] indices, double value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public abstract void insertFloat(java.lang.Object o, int[] indices, float value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public abstract void insertInt(java.lang.Object o, int[] indices, int value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public abstract void insertLong(java.lang.Object o, int[] indices, long value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public abstract void insertObject(java.lang.Object o, int[] indices, java.lang.Object value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public abstract void insertShort(java.lang.Object o, int[] indices, short value, Transaction t)
value
into an array.
This field has to be an array component indexed by indices
.
The new value
will be inserted at the place of the
indexed component.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the value to be insertedt
- transaction contextPersistenceField
public boolean isWritable(java.lang.Object object)
public abstract void removeBoolean(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public abstract void removeByte(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public abstract void removeChar(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public abstract void removeDouble(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public abstract void removeFloat(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public abstract void removeInt(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public abstract void removeLong(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public abstract void removeObject(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public abstract void removeShort(java.lang.Object o, int[] indices, Transaction t)
indices
.
The value at the indexed component will be removed.
o
- the instance for which the field is modifiedindices
- the indices for array fieldst
- transaction contextPersistenceField
public final void set(java.lang.Object o, int[] indices, java.lang.Object value, Transaction t)
public abstract void setBoolean(java.lang.Object o, int[] indices, boolean value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
public abstract void setByte(java.lang.Object o, int[] indices, byte value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
public abstract void setChar(java.lang.Object o, int[] indices, char value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
public abstract void setDouble(java.lang.Object o, int[] indices, double value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
public abstract void setFloat(java.lang.Object o, int[] indices, float value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
public abstract void setInt(java.lang.Object o, int[] indices, int value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
public abstract void setLong(java.lang.Object o, int[] indices, long value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
public abstract void setObject(java.lang.Object o, int[] indices, java.lang.Object value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
public abstract void setShort(java.lang.Object o, int[] indices, short value, Transaction t)
o
using the given indices
and t
.
o
- the instance for which the field is modifiedindices
- the indices for array fieldsvalue
- the new valuet
- transaction contextPersistenceField
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |