Package com.fasterxml.jackson.annotation
Class ObjectIdGenerators.Base<T>
java.lang.Object
com.fasterxml.jackson.annotation.ObjectIdGenerator<T>
com.fasterxml.jackson.annotation.ObjectIdGenerators.Base<T>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ObjectIdGenerators.IntSequenceGenerator,ObjectIdGenerators.PropertyGenerator,ObjectIdGenerators.StringIdGenerator,ObjectIdGenerators.UUIDGenerator
- Enclosing class:
- ObjectIdGenerators
Shared base class for concrete implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.annotation.ObjectIdGenerator
ObjectIdGenerator.IdKey -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUseFor(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 (usingObjectIdGenerator.newForSerialization(java.lang.Object)).abstract TgenerateId(Object forPojo) Method used for generating a new Object Identifier to serialize for given POJO.final Class<?>getScope()Methods inherited from class com.fasterxml.jackson.annotation.ObjectIdGenerator
forScope, isValidReferencePropertyName, key, maySerializeAsObject, newForSerialization
-
Field Details
-
_scope
-
-
Constructor Details
-
Base
-
-
Method Details
-
getScope
- Specified by:
getScopein classObjectIdGenerator<T>
-
canUseFor
Description copied from class:ObjectIdGeneratorMethod 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 (usingObjectIdGenerator.newForSerialization(java.lang.Object)).- Specified by:
canUseForin classObjectIdGenerator<T>- Returns:
- True if this instance can be used as-is; false if not
-
generateId
Description copied from class:ObjectIdGeneratorMethod used for generating a new Object Identifier to serialize for given POJO.- Specified by:
generateIdin classObjectIdGenerator<T>- Parameters:
forPojo- POJO for which identifier is needed- Returns:
- Object Identifier to use.
-