E
- the class of the payloadpublic abstract class Field<E> extends Named
Modifier and Type | Field and Description |
---|---|
protected FieldSchema<E> |
fieldschema |
protected E |
payload |
protected E |
referencepayload
contains the last persisted value of the field before the current action.
|
Constructor and Description |
---|
Field(FieldSchema<E> fieldschema)
creates a new field for defined field schema
|
Modifier and Type | Method and Description |
---|---|
FieldSchema<E> |
getFieldSchema() |
E |
getPayload() |
void |
setPayload(E payload)
updates the payload compared to what is stored as a reference in the database persistent storage
|
void |
setReferencePayload(E referencepayload)
updates the payload and mentions this is the payload in the database persistent storage
|
boolean |
updated()
specifies if the value has been updated compared to reference payload stored in the persistent storage
|
changeName, cleanName, equals, getName
protected FieldSchema<E> fieldschema
protected E referencepayload
protected E payload
public Field(FieldSchema<E> fieldschema)
fieldschema
- the field schema to use for this fieldpublic E getPayload()
public FieldSchema<E> getFieldSchema()
public void setPayload(E payload)
payload
- new payloadpublic void setReferencePayload(E referencepayload)
referencepayload
- public boolean updated()