public final class NitriteId extends java.lang.Object implements java.lang.Comparable<NitriteId>, java.io.Serializable
An unique identifier across the Nitrite database. Each document in
a nitrite collection is associated with a NitriteId.
During insertion if an unique object is supplied in the '_id' field
of the document, then the value of the '_id' field will be used to
create a new NitriteId. If that is not supplied, then nitrite
will auto generate one and supply it in the '_id' field of the document.
PersistentCollection.getById(NitriteId),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(NitriteId other) |
static NitriteId |
createId(java.lang.Long value)
Creates a
NitriteId from a long value. |
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getIdValue()
Gets the underlying id object.
|
int |
hashCode() |
static NitriteId |
newId()
Gets a new auto-generated
NitriteId. |
java.lang.String |
toString() |
public static NitriteId newId()
Gets a new auto-generated NitriteId.
NitriteId.public static NitriteId createId(java.lang.Long value)
Creates a NitriteId from a long value.
value - the valueNitriteIdpublic int compareTo(NitriteId other)
compareTo in interface java.lang.Comparable<NitriteId>public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Long getIdValue()
Gets the underlying id object.
@Generated(value="lombok") public boolean equals(java.lang.Object o)
equals in class java.lang.Object@Generated(value="lombok") public int hashCode()
hashCode in class java.lang.Object