T
- The data format that this upcaster uses to represent the eventpublic abstract class AbstractSingleEntryUpcaster<T> extends Object implements Upcaster<T>
Constructor and Description |
---|
AbstractSingleEntryUpcaster() |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
doUpcast(SerializedObject<T> intermediateRepresentation,
UpcastingContext context)
Upcasts the given
intermediateRepresentation into zero or more other representations. |
protected abstract SerializedType |
doUpcast(SerializedType serializedType)
Upcast the given
serializedType into its new format. |
List<SerializedObject<?>> |
upcast(SerializedObject<T> intermediateRepresentation,
List<SerializedType> expectedTypes,
UpcastingContext context)
Upcasts the given
intermediateRepresentation into zero or more other representations. |
List<SerializedType> |
upcast(SerializedType serializedType)
Upcast the given
serializedType into its new format. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canUpcast, expectedRepresentationType
public final List<SerializedObject<?>> upcast(SerializedObject<T> intermediateRepresentation, List<SerializedType> expectedTypes, UpcastingContext context)
Upcaster
intermediateRepresentation
into zero or more other representations. The returned
list of Serialized Objects must match the given list of serialized types.upcast
in interface Upcaster<T>
intermediateRepresentation
- The representation of the object to upcastexpectedTypes
- The expected types of the returned serialized objects.context
- An instance describing the context of the object to upcastpublic final List<SerializedType> upcast(SerializedType serializedType)
Upcaster
serializedType
into its new format. Generally, this involves increasing the
revision. Sometimes, it is also necessary to alter the type's name (in case of a renamed class, for example).
The order and the size of the list returned has to match with the order and size of the list of the upcast
IntermediateRepresentations by this upcaster.
To base the type on the actual contents of the Serialized Object, implement the ExtendedUpcaster
interface instead.upcast
in interface Upcaster<T>
serializedType
- The serialized type to upcastExtendedUpcaster.upcast(org.axonframework.serializer.SerializedType,
org.axonframework.serializer.SerializedObject)
protected abstract T doUpcast(SerializedObject<T> intermediateRepresentation, UpcastingContext context)
intermediateRepresentation
into zero or more other representations. The returned
list of Serialized Objects must match the given list of serialized types.
This method may return null
to indicate a deprecated object.intermediateRepresentation
- The representation of the object to upcastcontext
- An instance describing the context of the object to upcastprotected abstract SerializedType doUpcast(SerializedType serializedType)
serializedType
into its new format. Generally, this involves increasing the
revision. Sometimes, it is also necessary to alter the type's name (in case of a renamed class, for example).
If null
is returned, the Serialized object of this type is considered deprecated and will not be
subject to upcasting.serializedType
- The serialized type to upcastCopyright © 2010-2014. All Rights Reserved.