Class DJsonBeanReader<T>
- java.lang.Object
-
- io.ebeaninternal.server.text.json.DJsonBeanReader<T>
-
- All Implemented Interfaces:
JsonBeanReader<T>
public class DJsonBeanReader<T> extends Object implements JsonBeanReader<T>
A 'context' for reading entity beans from JSON.This is used such that a load context and persistence context can be used to span multiple marshalling requests.
-
-
Constructor Summary
Constructors Constructor Description DJsonBeanReader(BeanDescriptor<T> desc, SpiJsonReader readJson)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonBeanReader<T>
forJson(com.fasterxml.jackson.core.JsonParser moreJson, boolean resetContext)
Create a new reader taking the context from the existing one but using a new JsonParser.PersistenceContext
getPersistenceContext()
Return the persistence context if one is being used.void
persistenceContextPut(Object beanId, T currentBean)
Add a bean explicitly to the persistence context.T
read()
Read the JSON returning a bean.
-
-
-
Constructor Detail
-
DJsonBeanReader
public DJsonBeanReader(BeanDescriptor<T> desc, SpiJsonReader readJson)
-
-
Method Detail
-
persistenceContextPut
public void persistenceContextPut(Object beanId, T currentBean)
Description copied from interface:JsonBeanReader
Add a bean explicitly to the persistence context.- Specified by:
persistenceContextPut
in interfaceJsonBeanReader<T>
-
getPersistenceContext
public PersistenceContext getPersistenceContext()
Description copied from interface:JsonBeanReader
Return the persistence context if one is being used.- Specified by:
getPersistenceContext
in interfaceJsonBeanReader<T>
-
read
public T read()
Description copied from interface:JsonBeanReader
Read the JSON returning a bean.- Specified by:
read
in interfaceJsonBeanReader<T>
-
forJson
public JsonBeanReader<T> forJson(com.fasterxml.jackson.core.JsonParser moreJson, boolean resetContext)
Description copied from interface:JsonBeanReader
Create a new reader taking the context from the existing one but using a new JsonParser.- Specified by:
forJson
in interfaceJsonBeanReader<T>
-
-