public static final class ObjectIdGenerators.IntSequenceGenerator extends ObjectIdGenerator<T>
int
s (starting with value 1) as Object Identifiers.ObjectIdGenerator.IdKey
Modifier and Type | Field and Description |
---|---|
protected int |
_nextValue |
Constructor and Description |
---|
ObjectIdGenerators.IntSequenceGenerator() |
ObjectIdGenerators.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, maySerializeAsObject
public ObjectIdGenerators.IntSequenceGenerator()
public ObjectIdGenerators.IntSequenceGenerator(Class<?> scope, int fv)
protected int initialValue()
public ObjectIdGenerator<Integer> forScope(Class<?> scope)
ObjectIdGenerator
forScope
in class ObjectIdGenerator<Integer>
public ObjectIdGenerator<Integer> newForSerialization(Object context)
ObjectIdGenerator
Note that actual type of 'context' is
com.fasterxml.jackson.databind.SerializerProvider
,
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
com.fasterxml.jackson.databind.SerializerProvider
;
may be needed by more complex generators to access contextual
information such as configuration.public ObjectIdGenerator.IdKey key(Object key)
ObjectIdGenerator
key
in class ObjectIdGenerator<Integer>
public Integer generateId(Object forPojo)
ObjectIdGenerator
forPojo
- POJO for which identifier is neededCopyright © 2014-2015 FasterXML. All Rights Reserved.