Record Class SerializedAssociation
java.lang.Object
java.lang.Record
io.axoniq.framework.workflow.runtime.association.SerializedAssociation
- Record Components:
qualifier- association source qualifier, maps toValueRetriever.qualifier()path- source-specific path, maps toValueRetriever.path()operator- comparison operator namevalue- serialized comparison value
public record SerializedAssociation(String qualifier, String path, String operator, String value)
extends Record
Canonical serialized representation of an event association.
- Since:
- 5.4.0
- Author:
- Simon Zambrovski
-
Constructor Summary
ConstructorsConstructorDescriptionSerializedAssociation(String qualifier, String path, String operator, String value) Creates an instance of aSerializedAssociationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionDelivers a predicate that can be used to filter event messages.final booleanIndicates whether some other object is "equal to" this one.static SerializedAssociationfrom(ValueRetriever retriever, String operator, Object value) Creates a serialized association from the given retriever and matcher details.final inthashCode()Returns a hash code value for this object.operator()Returns the value of theoperatorrecord component.static SerializedAssociationparse(ValueComparisonOperatorRegistry registry, String serializedCondition) Parses a serialized association string.path()Returns the value of thepathrecord component.Returns the value of thequalifierrecord component.Serializes the association.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
SerializedAssociation
Creates an instance of aSerializedAssociationrecord class.
-
-
Method Details
-
from
Creates a serialized association from the given retriever and matcher details.- Parameters:
retriever- value retrieveroperator- comparison operator namevalue- comparison value- Returns:
- serialized association
-
parse
public static SerializedAssociation parse(ValueComparisonOperatorRegistry registry, String serializedCondition) Parses a serialized association string.- Parameters:
registry- operator registry used to resolve operatorsserializedCondition- serialized association- Returns:
- parsed serialized association
-
asEventMessagePredicate
public BiPredicate<EventMessage,ProcessingContext> asEventMessagePredicate(ValueComparisonOperatorRegistry registry) Delivers a predicate that can be used to filter event messages.- Parameters:
registry- value comparison operator registry- Returns:
- bi predicate that can be used to filter event messages
-
serialize
Serializes the association.- Returns:
- serialized association
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
qualifier
Returns the value of thequalifierrecord component.- Returns:
- the value of the
qualifierrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
operator
Returns the value of theoperatorrecord component.- Returns:
- the value of the
operatorrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-