Tidy only - no functional change to MutableHash and BeanPropertyJsonMapper

This commit is contained in:
rbygrave committed 2021-07-29 11:49:01 +12:00
1 parent 52fe3cf3c8
commit 92d7a7562f
2 files changed
+11 -10

No files matched your search

@@ -4,25 +4,26 @@ package io.ebean.bean;
* Interface to for mutable information in EntityBeanIntercept.
*/
public interface MutableHash {
/**
* Compares the given json to an internal value. Can be a MD5 hash or a plain JSON string.
* Compares the given json to an internal value. Can be a MD5 hash or a plain JSON string.
*
* @return true if the value matches the hash.
*/
boolean isEqualToJson(String json);
/**
* Compares the given object to an internal value. This is an optional method, but required for proper changelog/beanState support.
* Compares the given object to an internal value. Required for proper changelog/beanState support.
* The implementation can serialize the object and compare it against the original json.
*/
default boolean isEqualToObject(Object obj) {
return true;
}
boolean isEqualToObject(Object obj);
/**
* Creates a new instance from the internal json string. This is an optional method.
* Creates a new instance from the internal json string.
* <p>
* This is used to provide an original/old value for change logging / persist listeners.
*/
default Object get() {
return null;
}
}