Uses of Class
com.fasterxml.jackson.annotation.ObjectIdGenerator
-
-
Uses of ObjectIdGenerator in com.fasterxml.jackson.annotation
Subclasses of ObjectIdGenerator in com.fasterxml.jackson.annotation Modifier and Type Class Description private static classObjectIdGenerators.Base<T>Shared base class for concrete implementations.static classObjectIdGenerators.IntSequenceGeneratorSimple sequence-number based generator, which uses basic Javaints (starting with value 1) as Object Identifiers.static classObjectIdGenerators.NoneAbstract marker class used to allow explicitly specifying that no generator is used; which also implies that no Object Id is to be included or used.static classObjectIdGenerators.PropertyGeneratorAbstract place-holder class which is used to denote case where Object Identifier to use comes from a POJO property (getter method or field).static classObjectIdGenerators.StringIdGeneratorImplementation that will accept arbitrary (but unique) String Ids on deserialization, and (by default) use random UUID generation similar toObjectIdGenerators.UUIDGeneratorfor generation ids.static classObjectIdGenerators.UUIDGeneratorImplementation that just usesUUIDs as reliably unique identifiers: downside is that resulting String is 36 characters long.Methods in com.fasterxml.jackson.annotation that return ObjectIdGenerator Modifier and Type Method Description abstract ObjectIdGenerator<T>ObjectIdGenerator. forScope(java.lang.Class<?> scope)Factory method to create a blueprint instance for specified scope.ObjectIdGenerator<java.lang.Integer>ObjectIdGenerators.IntSequenceGenerator. forScope(java.lang.Class<?> scope)ObjectIdGenerator<java.lang.String>ObjectIdGenerators.StringIdGenerator. forScope(java.lang.Class<?> scope)ObjectIdGenerator<java.util.UUID>ObjectIdGenerators.UUIDGenerator. forScope(java.lang.Class<?> scope)Can just return base instance since this is essentially scopelessabstract ObjectIdGenerator<T>ObjectIdGenerator. newForSerialization(java.lang.Object context)Factory method called to create a new instance to use for serialization: needed since generators may have state (next id to produce).ObjectIdGenerator<java.lang.Integer>ObjectIdGenerators.IntSequenceGenerator. newForSerialization(java.lang.Object context)ObjectIdGenerator<java.lang.String>ObjectIdGenerators.StringIdGenerator. newForSerialization(java.lang.Object context)ObjectIdGenerator<java.util.UUID>ObjectIdGenerators.UUIDGenerator. newForSerialization(java.lang.Object context)Can just return base instance since this is essentially scopelessMethods in com.fasterxml.jackson.annotation that return types with arguments of type ObjectIdGenerator Modifier and Type Method Description java.lang.Class<? extends ObjectIdGenerator<?>>generator()Generator to use for producing Object Identifier for objects: either one of pre-defined generators fromObjectIdGenerator, or a custom generator.Methods in com.fasterxml.jackson.annotation with parameters of type ObjectIdGenerator Modifier and Type Method Description abstract booleanObjectIdGenerator. canUseFor(ObjectIdGenerator<?> gen)Method called to check whether this generator instance can be used for Object Ids of specific generator type and scope; determination is based by passing a configured "blueprint" (prototype) instance; from which the actual instances are created (usingnewForSerialization(java.lang.Object)).booleanObjectIdGenerators.Base. canUseFor(ObjectIdGenerator<?> gen)booleanObjectIdGenerators.StringIdGenerator. canUseFor(ObjectIdGenerator<?> gen)booleanObjectIdGenerators.UUIDGenerator. canUseFor(ObjectIdGenerator<?> gen)Since UUIDs are always unique, let's fully ignore scope definition
-