Package com.fasterxml.jackson.annotation
Class ObjectIdGenerators
- java.lang.Object
-
- com.fasterxml.jackson.annotation.ObjectIdGenerators
-
public class ObjectIdGenerators extends java.lang.ObjectContainer class for standardObjectIdGeneratorimplementations:ObjectIdGenerators.IntSequenceGeneratorObjectIdGenerators.PropertyGeneratorObjectIdGenerators.StringIdGenerator(since 2.7)ObjectIdGenerators.UUIDGenerator
NOTE:
ObjectIdGenerators.PropertyGeneratorapplicability is limited in one case: it can only be used on polymorphic base types (ones indicated usingJsonTypeInfoor default typing) via class annotations: property annotation will fail due to lack of access to property, needed to determine type of Object Id for deserialization. This limitation may be lifted in future versions but it is the limitation at least up to and including Jackson 2.9.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description 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.
-
Constructor Summary
Constructors Constructor Description ObjectIdGenerators()
-