public class JSimpleField extends JField
| Modifier and Type | Method and Description |
|---|---|
Converter<?,?> |
getConverter(JTransaction jtx)
Get a
Converter that converts this field values between core API type and Java model type. |
FieldType<?> |
getFieldType()
Get the
FieldType used by the core API to encode this field's values. |
JComplexField |
getParentField()
Get the
JComplexField of which this instance is a sub-field, if any. |
Method |
getSetter()
Get the setter method associated with this field.
|
TypeToken<?> |
getTypeToken()
Get the type of this field.
|
Object |
getValue(JObject jobj)
Get the Java value of this field in the given Java model object.
|
boolean |
isIndexed()
Get whether this field is indexed.
|
void |
setValue(JObject jobj,
Object value)
Set the Java value of this field in the given object.
|
<R> R |
visit(JFieldSwitch<R> target)
Apply visitor pattern.
|
getJSimpleDB, getName, getStorageId, toStringpublic JComplexField getParentField()
JComplexField of which this instance is a sub-field, if any.JComplexField, or null if this instance is not a sub-fieldpublic TypeToken<?> getTypeToken()
public FieldType<?> getFieldType()
FieldType used by the core API to encode this field's values.
Note that for Enum and reference fields, the core API uses a different type than the Java model
classes (EnumValue and ObjId, respectively).
Values can always be properly converted using the Converter returned by getConverter().
public boolean isIndexed()
public Method getSetter()
public Object getValue(JObject jobj)
JFieldpublic <R> R visit(JFieldSwitch<R> target)
JFieldpublic Converter<?,?> getConverter(JTransaction jtx)
Converter that converts this field values between core API type and Java model type.
Only Enum and reference types require conversion; for all other types, this returns an identity converter.jtx - transactionConverter from core API field type to Java model field typepublic void setValue(JObject jobj, Object value)
jobj - object containing this fieldvalue - new valueDeletedObjectException - if jobj does not exist in its associated JTransactionStaleTransactionException - if the JTransaction associated with jobj
is no longer usableIllegalArgumentException - if value is not an appropriate value for this fieldIllegalArgumentException - if jobj is nullCopyright © 2017. All rights reserved.