T - the type of the object containing the changed fieldV - the type of the changed fieldpublic class SimpleFieldChange<T,V> extends FieldChange<T>
@OnChange-annotated methods
when a simple field changes.| Constructor and Description |
|---|
SimpleFieldChange(T jobj,
int storageId,
String fieldName,
V oldValue,
V newValue)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(JTransaction jtx,
JObject jobj)
Apply this change to the given object in the given transaction.
|
boolean |
equals(Object obj) |
V |
getNewValue()
Get the value of the field after the change.
|
V |
getOldValue()
Get the value of the field before the change.
|
int |
hashCode() |
String |
toString() |
<R> R |
visit(ChangeSwitch<R> target)
Apply visitor pattern.
|
getFieldName, getStorageIdpublic SimpleFieldChange(T jobj, int storageId, String fieldName, V oldValue, V newValue)
jobj - Java object containing the field that changedstorageId - the storage ID of the affected fieldfieldName - the name of the field that changedoldValue - the old field valuenewValue - the new field valueIllegalArgumentException - if jobj or fieldName is nullpublic <R> R visit(ChangeSwitch<R> target)
Changetarget corresponding to this instance's type.public void apply(JTransaction jtx, JObject jobj)
Changepublic V getOldValue()
public V getNewValue()
public boolean equals(Object obj)
equals in class FieldChange<T>public int hashCode()
hashCode in class FieldChange<T>Copyright © 2017. All rights reserved.