public class IdProxy<T extends java.lang.Number>
extends java.lang.Number
implements java.io.Serializable
If you need to create a proxy for an existing ID, use of(Number) method.
| Modifier and Type | Method and Description |
|---|---|
IdProxy<T> |
copy()
Returns a shared copy of this IdProxy cleaned from a reference to entity.
|
IdProxy<T> |
copy(boolean shared)
Returns a copy of this IdProxy cleaned from a reference to entity.
|
double |
doubleValue() |
boolean |
equals(java.lang.Object other) |
float |
floatValue() |
T |
get() |
T |
getNN() |
java.util.UUID |
getUuid()
INTERNAL
|
int |
hashCode() |
int |
intValue() |
long |
longValue() |
static <T extends java.lang.Number> |
of(T value)
Create proxy for the specified ID value.
|
void |
setUuid(java.util.UUID uuid)
INTERNAL
|
java.lang.String |
toString() |
public static <T extends java.lang.Number> IdProxy<T> of(T value)
EntityManager.find()
method.value - real ID valuepublic IdProxy<T> copy()
DO NOT use shared copies when assigning the same ID to another entity!
copy(boolean)public IdProxy<T> copy(boolean shared)
shared - if true, a shared instance of the copy will be returned to avoid creating new object.
DO NOT use shared copies when assigning the same ID to another entity!@Nullable public T get()
public T getNN()
java.lang.IllegalStateException - if it is not assigned yetpublic java.util.UUID getUuid()
public void setUuid(java.util.UUID uuid)
public int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic float floatValue()
floatValue in class java.lang.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object