public abstract class PojoField extends Object implements Serializable
Constructor and Description |
---|
PojoField(Element el,
Class<?> pojoCls)
Creates instance of
PojoField based on it's description in XML element. |
PojoField(PojoFieldAccessor accessor)
Creates instance of
PojoField from its field accessor. |
PojoField(PojoField field,
Class<?> pojoCls)
Creates instance of
PojoField from the other instance
and java class. |
Modifier and Type | Method and Description |
---|---|
boolean |
calculatedField()
Indicates if it's a calculated field - field which value just generated based on other field values.
|
static boolean |
containsField(List<? extends PojoField> fields,
String fieldName)
Checks if list contains POJO field with the specified name.
|
Annotation |
getAnnotation(Class clazz)
Returns POJO field annotation.
|
String |
getColumn() |
String |
getColumnDDL() |
Class |
getJavaClass()
Returns java class of the field.
|
String |
getName() |
Object |
getValueFromObject(Object obj,
Serializer serializer)
Gets field value as an object having Cassandra compatible type.
|
void |
setValueFromRow(com.datastax.driver.core.Row row,
Object obj,
Serializer serializer)
Sets object field value from a
Row returned by Cassandra CQL statement. |
public PojoField(Element el, Class<?> pojoCls)
PojoField
based on it's description in XML element.el
- XML element describing Pojo fieldpojoCls
- Pojo java class.public PojoField(PojoFieldAccessor accessor)
PojoField
from its field accessor.accessor
- field accessor.public static boolean containsField(List<? extends PojoField> fields, String fieldName)
fields
- list of POJO fields.fieldName
- field name.public String getName()
public Class getJavaClass()
public String getColumn()
public String getColumnDDL()
public boolean calculatedField()
true
if it's auto generated field, false
if not.public Object getValueFromObject(Object obj, Serializer serializer)
obj
- Object instance.serializer
- Serializer
to use.public Annotation getAnnotation(Class clazz)
public void setValueFromRow(com.datastax.driver.core.Row row, Object obj, Serializer serializer)
Row
returned by Cassandra CQL statement.row
- Row
obj
- object which field should be populated from Row
serializer
- Serializer
to use.
GridGain In-Memory Computing Platform : ver. 8.9.15 Release Date : December 3 2024