public static final class ObjectIdGenerators.IntSequenceGenerator extends ObjectIdGenerators.Base<java.lang.Integer>
ints (starting with value 1) as Object Identifiers.ObjectIdGenerator.IdKey| Modifier and Type | Field and Description |
|---|---|
protected int |
_nextValue |
private static long |
serialVersionUID |
_scope| Constructor and Description |
|---|
IntSequenceGenerator() |
IntSequenceGenerator(java.lang.Class<?> scope,
int fv) |
| Modifier and Type | Method and Description |
|---|---|
ObjectIdGenerator<java.lang.Integer> |
forScope(java.lang.Class<?> scope)
Factory method to create a blueprint instance for specified
scope.
|
java.lang.Integer |
generateId(java.lang.Object forPojo)
Method used for generating a new Object Identifier to serialize
for given POJO.
|
protected int |
initialValue() |
ObjectIdGenerator.IdKey |
key(java.lang.Object key)
Method for constructing key to use for ObjectId-to-POJO maps.
|
ObjectIdGenerator<java.lang.Integer> |
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).
|
canUseFor, getScopeisValidReferencePropertyName, maySerializeAsObjectprivate static final long serialVersionUID
protected transient int _nextValue
public IntSequenceGenerator()
public IntSequenceGenerator(java.lang.Class<?> scope,
int fv)
protected int initialValue()
public ObjectIdGenerator<java.lang.Integer> forScope(java.lang.Class<?> scope)
ObjectIdGeneratorforScope in class ObjectIdGenerator<java.lang.Integer>public ObjectIdGenerator<java.lang.Integer> newForSerialization(java.lang.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<java.lang.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(java.lang.Object key)
ObjectIdGeneratorkey in class ObjectIdGenerator<java.lang.Integer>public java.lang.Integer generateId(java.lang.Object forPojo)
ObjectIdGeneratorgenerateId in class ObjectIdGenerators.Base<java.lang.Integer>forPojo - POJO for which identifier is needed