Class SimpleSerializedObject<T>
- java.lang.Object
-
- io.axoniq.dataprotection.serialization.SimpleSerializedObject<T>
-
- Type Parameters:
T- The data type representing the serialized object
- All Implemented Interfaces:
SerializedObject<T>
public class SimpleSerializedObject<T> extends Object implements SerializedObject<T>
SerializedObject implementation that takes all properties as constructor parameters.- Since:
- 2.0
- Author:
- Allard Buijze
-
-
Constructor Summary
Constructors Constructor Description SimpleSerializedObject(T data, Class<T> dataType, SerializedType serializedType)Initializes a SimpleSerializedObject using givendataandserializedType.SimpleSerializedObject(T data, Class<T> dataType, String type, String revision)Initializes a SimpleSerializedObject using givendataand a serialized type identified by giventypeandrevision.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Class<T>getContentType()Returns the type of this representation's data.TgetData()The actual data of the serialized object.SerializedTypegetType()Returns the description of the type of object contained in the data.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
SimpleSerializedObject
public SimpleSerializedObject(T data, Class<T> dataType, SerializedType serializedType)
Initializes a SimpleSerializedObject using givendataandserializedType.- Parameters:
data- The data of the serialized objectdataType- The type of dataserializedType- The type description of the serialized object
-
SimpleSerializedObject
public SimpleSerializedObject(T data, Class<T> dataType, String type, String revision)
Initializes a SimpleSerializedObject using givendataand a serialized type identified by giventypeandrevision.- Parameters:
data- The data of the serialized objectdataType- The type of datatype- The type identifying the serialized objectrevision- The revision of the serialized object
-
-
Method Detail
-
getData
public T getData()
Description copied from interface:SerializedObjectThe actual data of the serialized object.- Specified by:
getDatain interfaceSerializedObject<T>- Returns:
- the actual data of the serialized object
-
getContentType
public Class<T> getContentType()
Description copied from interface:SerializedObjectReturns the type of this representation's data.- Specified by:
getContentTypein interfaceSerializedObject<T>- Returns:
- the type of this representation's data
-
getType
public SerializedType getType()
Description copied from interface:SerializedObjectReturns the description of the type of object contained in the data.- Specified by:
getTypein interfaceSerializedObject<T>- Returns:
- the description of the type of object contained in the data
-
-