K
- type of entity keyT
- entity typepublic final class Id<T extends Entity<K>,K>
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Class<T> |
getEntityClass() |
K |
getValue() |
int |
hashCode() |
static <T extends Entity<K>,K> |
of(K id,
java.lang.Class<T> entityClass) |
static <T extends Entity<K>,K> |
of(T entity) |
public K getValue()
public java.lang.Class<T> getEntityClass()
public static <T extends Entity<K>,K> Id<T,K> of(T entity)
K
- type of entity keyT
- entity typeentity
- entity instancepublic static <T extends Entity<K>,K> Id<T,K> of(K id, java.lang.Class<T> entityClass)
K
- type of entity keyT
- entity typeid
- entity identityClass
- entity classpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object