mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
58 lines
946 B
Java
58 lines
946 B
Java
package com.avaje.ebean;
|
|
|
|
/**
|
|
* Holds two values as the result of a difference comparison.
|
|
*/
|
|
public class ValuePair {
|
|
|
|
protected Object newValue;
|
|
|
|
protected Object oldValue;
|
|
|
|
/**
|
|
* Default constructor for JSON tools.
|
|
*/
|
|
public ValuePair() {
|
|
}
|
|
|
|
/**
|
|
* Construct with the pair of new and old values.
|
|
*/
|
|
public ValuePair(Object newValue, Object oldValue) {
|
|
this.newValue = newValue;
|
|
this.oldValue = oldValue;
|
|
}
|
|
|
|
/**
|
|
* Return the new value.
|
|
*/
|
|
public Object getNewValue() {
|
|
return newValue;
|
|
}
|
|
|
|
/**
|
|
* Return the old value.
|
|
*/
|
|
public Object getOldValue() {
|
|
return oldValue;
|
|
}
|
|
|
|
/**
|
|
* Set the new value.
|
|
*/
|
|
public void setNewValue(Object newValue) {
|
|
this.newValue = newValue;
|
|
}
|
|
|
|
/**
|
|
* Set the old value.
|
|
*/
|
|
public void setOldValue(Object oldValue) {
|
|
this.oldValue = oldValue;
|
|
}
|
|
|
|
public String toString() {
|
|
return newValue + "," + oldValue;
|
|
}
|
|
}
|