Class AbstractIdentitySerializationInfo<T,I>
java.lang.Object
org.dominokit.jacksonapt.ser.bean.HasSerializer<I,JsonSerializer<I>>
org.dominokit.jacksonapt.ser.bean.AbstractIdentitySerializationInfo<T,I>
- All Implemented Interfaces:
IdentitySerializationInfo<T>
public abstract class AbstractIdentitySerializationInfo<T,I> extends HasSerializer<I,JsonSerializer<I>> implements IdentitySerializationInfo<T>
Contains identity informations for serialization process.
- Version:
- $Id: $
- Author:
- Nicolas Morel
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIdentitySerializationInfo(boolean alwaysAsId, java.lang.String propertyName)Constructor for AbstractIdentitySerializationInfo. -
Method Summary
Modifier and Type Method Description abstract ObjectIdSerializer<I>getObjectId(T bean, JsonSerializationContext ctx)getObjectIdjava.lang.StringgetPropertyName()getPropertyNamebooleanisAlwaysAsId()isAlwaysAsIdbooleanisProperty()isPropertyMethods inherited from class org.dominokit.jacksonapt.ser.bean.HasSerializer
getSerializer, newSerializerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AbstractIdentitySerializationInfo
protected AbstractIdentitySerializationInfo(boolean alwaysAsId, java.lang.String propertyName)Constructor for AbstractIdentitySerializationInfo.
- Parameters:
alwaysAsId- a boolean.propertyName- aStringobject.
-
-
Method Details
-
isAlwaysAsId
public boolean isAlwaysAsId()isAlwaysAsId
- Specified by:
isAlwaysAsIdin interfaceIdentitySerializationInfo<T>- Returns:
- true if we should always serialize the bean as an identifier even if it has not been seralized yet
-
isProperty
public boolean isProperty()isProperty
- Specified by:
isPropertyin interfaceIdentitySerializationInfo<T>- Returns:
- true if the identifier is also a property of the bean
-
getPropertyName
public java.lang.String getPropertyName()getPropertyName
- Specified by:
getPropertyNamein interfaceIdentitySerializationInfo<T>- Returns:
- name of the identifier property
-
getObjectId
getObjectId
- Specified by:
getObjectIdin interfaceIdentitySerializationInfo<T>- Parameters:
bean- a T object.ctx- aJsonSerializationContextobject.- Returns:
- a
ObjectIdSerializerobject.
-