public static final class ObjectIdGenerators.IntSequenceGenerator extends ObjectIdGenerator<T>
ints (starting with value 1) as Object Identifiers.ObjectIdGenerator.IdKey| Modifier and Type | Field and Description |
|---|---|
protected int |
_nextValue |
| Constructor and Description |
|---|
IntSequenceGenerator() |
IntSequenceGenerator(Class<?> scope,
int fv) |
| Modifier and Type | Method and Description |
|---|---|
ObjectIdGenerator<Integer> |
forScope(Class<?> scope)
Factory method to create a blueprint instance for specified
scope.
|
Integer |
generateId(Object forPojo)
Method used for generating a new Object Identifier to serialize
for given POJO.
|
protected int |
initialValue() |
ObjectIdGenerator.IdKey |
key(Object key)
Method for constructing key to use for ObjectId-to-POJO maps.
|
ObjectIdGenerator<Integer> |
newForSerialization(Object context)
Factory method called to create a new instance to use for
serialization: needed since generators may have state
(next id to produce).
|
isValidReferencePropertyName, maySerializeAsObjectpublic IntSequenceGenerator()
public IntSequenceGenerator(Class<?> scope, int fv)
protected int initialValue()
public ObjectIdGenerator<Integer> forScope(Class<?> scope)
ObjectIdGeneratorforScope in class ObjectIdGenerator<Integer>public ObjectIdGenerator<Integer> newForSerialization(Object context)
ObjectIdGenerator
Note that actual type of 'context' is
SerializerProvider (2.x) / SerializationContext (3.x),
but can not be declared here as type itself (as well as call
to this object) comes from databind package.
newForSerialization in class ObjectIdGenerator<Integer>context - Serialization context object used (of type
SerializerProvider (2.x) / SerializationContext (3.x));
may be needed by more complex generators to access contextual
information such as configuration.public ObjectIdGenerator.IdKey key(Object key)
ObjectIdGeneratorkey in class ObjectIdGenerator<Integer>public Integer generateId(Object forPojo)
ObjectIdGeneratorforPojo - POJO for which identifier is neededCopyright © 2008–2026 FasterXML. All rights reserved.