| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.upcasting.AbstractSingleEntryUpcaster<T>
T - The data format that this upcaster uses to represent the eventpublic abstract class AbstractSingleEntryUpcaster<T>
Abstract implementation of an upcaster that only needs to convert one serialized object to another using the same representation.
This class is not suitable when an upcaster needs to convert a single serialized object to multiple new serialized objects, or when the output representation type is not the same as the expected input representation type.
| Constructor Summary | |
|---|---|
AbstractSingleEntryUpcaster()
 | 
|
| Method Summary | |
|---|---|
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. | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.axonframework.upcasting.Upcaster | 
|---|
canUpcast, expectedRepresentationType | 
| Constructor Detail | 
|---|
public AbstractSingleEntryUpcaster()
| Method Detail | 
|---|
public final List<SerializedObject<?>> upcast(SerializedObject<T> intermediateRepresentation,
                                              List<SerializedType> expectedTypes,
                                              UpcastingContext context)
UpcasterintermediateRepresentation 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 upcast
public final List<SerializedType> upcast(SerializedType serializedType)
UpcasterserializedType 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 upcast
ExtendedUpcaster.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 upcast
protected 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 upcast
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||