Package tenapull.data.deserialize
Class AbstractContextualPojoDeserializer<POJO extends DbPojo,DAO extends Dao<POJO>>
java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<T>
tenapull.data.deserialize.AbstractContextualDeserializer<POJO>
tenapull.data.deserialize.AbstractContextualPojoDeserializer<POJO,DAO>
- Type Parameters:
POJO
- the type parameterDAO
- the type parameter
- All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.ContextualDeserializer
,com.fasterxml.jackson.databind.deser.NullValueProvider
- Direct Known Subclasses:
Lookup.Deserializer
public abstract class AbstractContextualPojoDeserializer<POJO extends DbPojo,DAO extends Dao<POJO>> extends AbstractContextualDeserializer<POJO>
Further implementation of AbstractContextualDeserializer that is specific to POJOs,
and which also obtains the appropriate Dao for the pojo type provided
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractContextualPojoDeserializer()
-
Method Summary
Modifier and Type Method Description com.fasterxml.jackson.databind.JsonDeserializer<POJO>
createContextual(com.fasterxml.jackson.databind.DeserializationContext deserializationContext, com.fasterxml.jackson.databind.BeanProperty beanProperty)
First invokes super.createContextual, which obtains the target deserialization type.void
setType(java.lang.Class<POJO> pojoType)
First invokes the super's setType, then also sets its own pojoType and finds the appropriate Dao for the typeMethods inherited from class tenapull.data.deserialize.AbstractContextualDeserializer
getJavaType, getLogger, getType
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserialize, deserializeWithType, deserializeWithType, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
Field Details
-
Constructor Details
-
AbstractContextualPojoDeserializer
public AbstractContextualPojoDeserializer()
-
-
Method Details
-
setType
First invokes the super's setType, then also sets its own pojoType and finds the appropriate Dao for the type- Overrides:
setType
in classAbstractContextualDeserializer<POJO extends DbPojo>
- Parameters:
pojoType
-
-
createContextual
public com.fasterxml.jackson.databind.JsonDeserializer<POJO> createContextual(com.fasterxml.jackson.databind.DeserializationContext deserializationContext, com.fasterxml.jackson.databind.BeanProperty beanProperty) throws com.fasterxml.jackson.databind.JsonMappingExceptionFirst invokes super.createContextual, which obtains the target deserialization type. Then obtains the type's Dao through calling the fetchDao() method- Specified by:
createContextual
in interfacecom.fasterxml.jackson.databind.deser.ContextualDeserializer
- Overrides:
createContextual
in classAbstractContextualDeserializer<POJO extends DbPojo>
- Parameters:
deserializationContext
-beanProperty
-- Returns:
- this, since it serves a dual-purpose as both the contextual parser and the deserializer
- Throws:
com.fasterxml.jackson.databind.JsonMappingException
-