Package com.exedio.cope.pattern
Class HashConstraint
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.pattern.HashConstraint
-
- All Implemented Interfaces:
Serializable
public final class HashConstraint extends Pattern
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HashConstraint(StringField hash, String algorithm, DataField data)
HashConstraint(StringField hash, Supplier<String> algorithm, DataField data)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlgorithm()
DataField
getData()
StringField
getHash()
Condition
hashDoesNotMatchIfSupported()
The result may cause anUnsupportedQueryException
when used, if the field is stored in avault
, or thealgorithm
is not supported by the database.Condition
hashMatchesIfSupported()
The result may cause anUnsupportedQueryException
when used, if the field is stored in avault
, or thealgorithm
is not supported by the database.-
Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, onMount, registerSource
-
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
-
-
-
Constructor Detail
-
HashConstraint
public HashConstraint(StringField hash, String algorithm, DataField data)
-
HashConstraint
public HashConstraint(StringField hash, Supplier<String> algorithm, DataField data)
-
-
Method Detail
-
getHash
public StringField getHash()
-
getAlgorithm
public String getAlgorithm()
-
getData
public DataField getData()
-
hashMatchesIfSupported
@Nonnull public Condition hashMatchesIfSupported()
The result may cause anUnsupportedQueryException
when used, if the field is stored in avault
, or thealgorithm
is not supported by the database.
-
hashDoesNotMatchIfSupported
@Nonnull public Condition hashDoesNotMatchIfSupported()
The result may cause anUnsupportedQueryException
when used, if the field is stored in avault
, or thealgorithm
is not supported by the database.
-
-