|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.common.IdentifierValidator
public final class IdentifierValidator
Validates the structure of an object passed as Aggregate Identifier. These objects need to (properly) override
the toString method. Two equal identifiers must always produce the same toString values,
even between JVM restarts. Typically, this also means equals and hashCode need to be
implemented.
| Method Summary | |
|---|---|
static IdentifierValidator |
getInstance()
Returns the singleton instance of the IdentifierValidator. |
boolean |
isValidIdentifier(Class<?> identifierType)
Indicates whether or not the given identifierType is safe to use as aggregate identifier |
static void |
validateIdentifier(Class<?> aggregateIdentifierType)
Verifies whether the given aggregateIdentifier complies with the toString requirements
and throws IllegalArgumentException if that is not the case. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static IdentifierValidator getInstance()
public static void validateIdentifier(Class<?> aggregateIdentifierType)
aggregateIdentifier complies with the toString requirements
and throws IllegalArgumentException if that is not the case.
If a mere boolean is required, consider using getInstance().isValidIdentifier(Class).
aggregateIdentifierType - The identifier to validatepublic boolean isValidIdentifier(Class<?> identifierType)
identifierType is safe to use as aggregate identifier
identifierType - The class of the identifier
true if the identifier is valid, false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||