Top Fields Constructors Methods
com.fasterxml.jackson.databind.deser.impl

public Class PropertyBasedObjectIdGenerator

extends PropertyGenerator
Class Inheritance
Imports
com.fasterxml.jackson.annotation.ObjectIdGenerator, .ObjectIdGenerators

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ObjectIdGenerator<Object>
forScope(Class<?> scope)

Implements abstract com.fasterxml.jackson.annotation.ObjectIdGenerator.forScope.

Factory method to create a blueprint instance for specified scope.

public Object
generateId(Object
POJO for which identifier is needed
forPojo
)

Implements abstract com.fasterxml.jackson.annotation.ObjectIdGenerators.Base.generateId.

Method used for generating a new Object Identifier to serialize for given POJO.

public ObjectIdGenerator.IdKey
key(Object key)

Implements abstract com.fasterxml.jackson.annotation.ObjectIdGenerator.key.

Method for constructing key to use for ObjectId-to-POJO maps.

public ObjectIdGenerator<Object>
newForSerialization(Object
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.
context
)

Implements abstract com.fasterxml.jackson.annotation.ObjectIdGenerator.newForSerialization.

Factory method called to create a new instance to use for serialization: needed since generators may have state (next id to produce).

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.annotation.ObjectIdGenerators.PropertyGenerator.serialVersionUID.

Constructor Detail

PropertyBasedObjectIdGeneratorback to summary
public PropertyBasedObjectIdGenerator(Class<?> scope)

Method Detail

forScopeback to summary
public ObjectIdGenerator<Object> forScope(Class<?> scope)

Implements abstract com.fasterxml.jackson.annotation.ObjectIdGenerator.forScope.

Doc from com.fasterxml.jackson.annotation.ObjectIdGenerator.forScope.

Factory method to create a blueprint instance for specified scope. Generators that do not use scope may return 'this'.

Annotations
@Override
generateIdback to summary
public Object generateId(Object forPojo)

Implements abstract com.fasterxml.jackson.annotation.ObjectIdGenerators.Base.generateId.

Doc from com.fasterxml.jackson.annotation.ObjectIdGenerator.generateId.

Method used for generating a new Object Identifier to serialize for given POJO.

Parameters
forPojo:Object

POJO for which identifier is needed

Returns:Object

Object Identifier to use.

Annotations
@Override
keyback to summary
public ObjectIdGenerator.IdKey key(Object key)

Implements abstract com.fasterxml.jackson.annotation.ObjectIdGenerator.key.

Doc from com.fasterxml.jackson.annotation.ObjectIdGenerator.key.

Method for constructing key to use for ObjectId-to-POJO maps.

Annotations
@Override
newForSerializationback to summary
public ObjectIdGenerator<Object> newForSerialization(Object context)

Implements abstract com.fasterxml.jackson.annotation.ObjectIdGenerator.newForSerialization.

Doc from com.fasterxml.jackson.annotation.ObjectIdGenerator.newForSerialization.

Factory method called to create a new instance to use for serialization: needed since generators may have state (next id to produce).

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.

Parameters
context:Object

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.

Annotations
@Override