Class AbstractIdentityDeserializationInfo<T,V>
java.lang.Object
org.dominokit.jacksonapt.deser.bean.HasDeserializer<V,JsonDeserializer<V>>
org.dominokit.jacksonapt.deser.bean.AbstractIdentityDeserializationInfo<T,V>
- All Implemented Interfaces:
IdentityDeserializationInfo<T>
public abstract class AbstractIdentityDeserializationInfo<T,V> extends HasDeserializer<V,JsonDeserializer<V>> implements IdentityDeserializationInfo<T>
Abstract AbstractIdentityDeserializationInfo class.
- Version:
- $Id: $
- Author:
- Nicolas Morel
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIdentityDeserializationInfo(java.lang.String propertyName, java.lang.Class<?> type, java.lang.Class<?> scope)Constructor for AbstractIdentityDeserializationInfo. -
Method Summary
Modifier and Type Method Description java.lang.StringgetPropertyName()getPropertyNamebooleanisProperty()isPropertyObjectIdGenerator.IdKeynewIdKey(java.lang.Object id)newIdKeyjava.lang.ObjectreadId(JsonReader reader, JsonDeserializationContext ctx)Reads the id and returns it.Methods inherited from class org.dominokit.jacksonapt.deser.bean.HasDeserializer
getDeserializer, newDeserializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AbstractIdentityDeserializationInfo
protected AbstractIdentityDeserializationInfo(java.lang.String propertyName, java.lang.Class<?> type, java.lang.Class<?> scope)Constructor for AbstractIdentityDeserializationInfo.
- Parameters:
propertyName- aStringobject.type- aClassobject.scope- aClassobject.
-
-
Method Details
-
getPropertyName
public final java.lang.String getPropertyName()getPropertyName
- Specified by:
getPropertyNamein interfaceIdentityDeserializationInfo<T>- Returns:
- name of the identifier property
-
isProperty
public final boolean isProperty()isProperty
- Specified by:
isPropertyin interfaceIdentityDeserializationInfo<T>- Returns:
- true if the identifier is also a property of the bean
-
newIdKey
newIdKey
- Specified by:
newIdKeyin interfaceIdentityDeserializationInfo<T>- Parameters:
id- Identifier- Returns:
- a new
ObjectIdGenerator.IdKey
-
readId
Reads the id and returns it.- Specified by:
readIdin interfaceIdentityDeserializationInfo<T>- Parameters:
reader- readerctx- context of the deserialization process- Returns:
- the identifier
-