Class PropertyIdentitySerializationInfo<T,V>
java.lang.Object
org.dominokit.jacksonapt.ser.bean.HasSerializer<V,JsonSerializer<V>>
org.dominokit.jacksonapt.ser.bean.BeanPropertySerializer<T,V>
org.dominokit.jacksonapt.ser.bean.PropertyIdentitySerializationInfo<T,V>
- All Implemented Interfaces:
IdentitySerializationInfo<T>
public abstract class PropertyIdentitySerializationInfo<T,V> extends BeanPropertySerializer<T,V> implements IdentitySerializationInfo<T>
Contains identity informations for serialization process.
- Version:
- $Id: $
- Author:
- Nicolas Morel
-
Field Summary
Fields inherited from class org.dominokit.jacksonapt.ser.bean.BeanPropertySerializer
propertyName -
Constructor Summary
Constructors Constructor Description PropertyIdentitySerializationInfo(boolean alwaysAsId, java.lang.String propertyName)Constructor for PropertyIdentitySerializationInfo. -
Method Summary
Modifier and Type Method Description ObjectIdSerializer<?>getObjectId(T bean, JsonSerializationContext ctx)getObjectIdbooleanisAlwaysAsId()isAlwaysAsIdbooleanisProperty()isPropertyMethods inherited from class org.dominokit.jacksonapt.ser.bean.BeanPropertySerializer
getParameters, getPropertyName, getValue, newParameters, serialize, serializePropertyNameMethods 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, waitMethods inherited from interface org.dominokit.jacksonapt.ser.bean.IdentitySerializationInfo
getPropertyName
-
Constructor Details
-
PropertyIdentitySerializationInfo
public PropertyIdentitySerializationInfo(boolean alwaysAsId, java.lang.String propertyName)Constructor for PropertyIdentitySerializationInfo.
- 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
-
getObjectId
getObjectId
- Specified by:
getObjectIdin interfaceIdentitySerializationInfo<T>- Parameters:
bean- a T object.ctx- aJsonSerializationContextobject.- Returns:
- a
ObjectIdSerializerobject.
-