public abstract class PersistentObjectIdResolver<E extends PersistentObject,D extends GenericHibernateDao<E,Integer>,S extends AbstractCrudService<E,D>>
extends com.fasterxml.jackson.annotation.SimpleObjectIdResolver
PersistentObjects when deserializing only on the
base of ID values. Based on a given ID, this resolver will load the whole
entity from the database. Extends the default implementation.| Modifier and Type | Field and Description |
|---|---|
protected static org.apache.logging.log4j.Logger |
logger |
protected S |
service |
| Constructor and Description |
|---|
PersistentObjectIdResolver()
Default Constructor that injects beans automatically.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bindItem(com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey id,
Object ob) |
S |
getService() |
com.fasterxml.jackson.annotation.ObjectIdResolver |
newForDeserialization(Object context) |
E |
resolveId(com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey idKey) |
abstract void |
setService(S service)
Has to be implemented by subclasses to autowire and set the correct
service class.
|
protected static final org.apache.logging.log4j.Logger logger
protected S extends AbstractCrudService<E,D> service
public PersistentObjectIdResolver()
public void bindItem(com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey id,
Object ob)
bindItem in interface com.fasterxml.jackson.annotation.ObjectIdResolverbindItem in class com.fasterxml.jackson.annotation.SimpleObjectIdResolverpublic E resolveId(com.fasterxml.jackson.annotation.ObjectIdGenerator.IdKey idKey)
resolveId in interface com.fasterxml.jackson.annotation.ObjectIdResolverresolveId in class com.fasterxml.jackson.annotation.SimpleObjectIdResolverpublic com.fasterxml.jackson.annotation.ObjectIdResolver newForDeserialization(Object context)
newForDeserialization in interface com.fasterxml.jackson.annotation.ObjectIdResolvernewForDeserialization in class com.fasterxml.jackson.annotation.SimpleObjectIdResolverpublic S getService()
public abstract void setService(S service)
service - the service to setCopyright © 2020 terrestris GmbH & Co. KG. All rights reserved.