|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.fasterxml.jackson.annotation.ObjectIdGenerator<T>
com.fasterxml.jackson.annotation.ObjectIdGenerators.UUIDGenerator
public static final class ObjectIdGenerators.UUIDGenerator
Implementation that just uses UUIDs as reliably
unique identifiers: downside is that resulting String is
36 characters long.
One difference to other generators is that scope is always
set as Object.class (regardless of arguments): this
because UUIDs are globally unique, and scope has no meaning.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.fasterxml.jackson.annotation.ObjectIdGenerator |
|---|
ObjectIdGenerator.IdKey |
| Constructor Summary | |
|---|---|
ObjectIdGenerators.UUIDGenerator()
|
|
| Method Summary | |
|---|---|
boolean |
canUseFor(ObjectIdGenerator<?> gen)
Since UUIDs are always unique, let's fully ignore scope definition |
ObjectIdGenerator<UUID> |
forScope(Class<?> scope)
Can just return base instance since this is essentially scopeless |
UUID |
generateId(Object forPojo)
Method used for generating a new Object Identifier to serialize for given POJO. |
ObjectIdGenerator.IdKey |
key(Object key)
Method for constructing key to use for ObjectId-to-POJO maps. |
ObjectIdGenerator<UUID> |
newForSerialization(Object context)
Can just return base instance since this is essentially scopeless |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ObjectIdGenerators.UUIDGenerator()
| Method Detail |
|---|
public ObjectIdGenerator<UUID> forScope(Class<?> scope)
forScope in class ObjectIdGenerator<UUID>public ObjectIdGenerator<UUID> newForSerialization(Object context)
newForSerialization in class ObjectIdGenerator<UUID>context - Serialization context object used (of type
com.fasterxml.jackson.databind.SerializerProvider;
may be needed by more complex generators to access contextual
information such as configuration.public UUID generateId(Object forPojo)
ObjectIdGenerator
forPojo - POJO for which identifier is needed
public ObjectIdGenerator.IdKey key(Object key)
ObjectIdGenerator
key in class ObjectIdGenerator<UUID>public boolean canUseFor(ObjectIdGenerator<?> gen)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||