T - the type@MappedSuperclass
public abstract class BaseEntity<T extends BaseEntity<T>>
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
BaseEntity() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
areEqual(java.util.Date d1,
java.util.Date d2)
Utility method for
equals() methods. |
protected boolean |
areEqual(float f1,
float f2)
Utility method for
equals() methods. |
protected boolean |
areEqual(java.lang.Object o1,
java.lang.Object o2)
Utility method for
equals() methods. |
protected boolean |
areEqual(java.lang.String s1,
java.lang.String s2,
boolean ignoreCase)
Utility method for
equals() methods. |
protected int |
calculateHashCode(java.lang.Object... values)
Utility method for
hashCode() methods. |
protected abstract boolean |
dataEquals(T other)
Compare data only; null, class, and pk have been checked.
|
boolean |
equals(java.lang.Object other) |
protected abstract java.lang.Object[] |
getHashCodeData()
Get the data used to calculate hash code; use getters not fields in case the instance is a
proxy.
|
abstract java.io.Serializable |
getPk()
Get the primary key.
|
protected abstract T |
getThis()
Allows type-specific "this".
|
int |
hashCode() |
protected boolean areEqual(java.lang.Object o1,
java.lang.Object o2)
equals() methods.o1 - one objecto2 - another objecttrue if they're both null or both equalprotected boolean areEqual(java.lang.String s1,
java.lang.String s2,
boolean ignoreCase)
equals() methods.s1 - one strings2 - another stringignoreCase - if false do case-sensitive comparisontrue if they're both null or both equalprotected boolean areEqual(java.util.Date d1,
java.util.Date d2)
equals() methods.d1 - one dated2 - another datetrue if they're both null or both equalprotected boolean areEqual(float f1,
float f2)
equals() methods.f1 - one floatf2 - another floattrue if they're equalprotected int calculateHashCode(java.lang.Object... values)
hashCode() methods.values - the values to use in calculationpublic final int hashCode()
hashCode in class java.lang.Objectprotected abstract java.lang.Object[] getHashCodeData()
protected abstract T getThis()
public abstract java.io.Serializable getPk()
null if not set or if not supportedpublic final boolean equals(java.lang.Object other)
equals in class java.lang.Objectprotected abstract boolean dataEquals(T other)
other - the other instancetrue if equal