Package ch.so.agi.mcp.constraint
Record Class SemanticConstraint.Unique
java.lang.Object
java.lang.Record
ch.so.agi.mcp.constraint.SemanticConstraint.Unique
- All Implemented Interfaces:
SemanticConstraint
- Enclosing interface:
SemanticConstraint
public static record SemanticConstraint.Unique(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, boolean local, boolean perBasket, @Nullable ConstraintExpression preCondition, @Nullable SemanticConstraint.ConstraintPath prefix, List<SemanticConstraint.ConstraintPath> elements)
extends Record
implements SemanticConstraint
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.so.agi.mcp.constraint.SemanticConstraint
SemanticConstraint.AllObjects, SemanticConstraint.ConstraintPath, SemanticConstraint.Existence, SemanticConstraint.Kind, SemanticConstraint.Mandatory, SemanticConstraint.NavigatedObjects, SemanticConstraint.ObjectCountSetCondition, SemanticConstraint.ObjectSetExpression, SemanticConstraint.Plausibility, SemanticConstraint.PlausibilityDirection, SemanticConstraint.Set, SemanticConstraint.SetCondition, SemanticConstraint.Unique, SemanticConstraint.UntranslatedSetCondition, SemanticConstraint.ValueSetCondition -
Constructor Summary
ConstructorsConstructorDescriptionUnique(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, boolean local, boolean perBasket, @Nullable ConstraintExpression preCondition, @Nullable SemanticConstraint.ConstraintPath prefix, List<SemanticConstraint.ConstraintPath> elements) Creates an instance of aUniquerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconstraintNamerecord component.Returns the value of theconstraintScopedNamerecord component.Returns the value of thecontextFqnrecord component.elements()Returns the value of theelementsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()booleanlocal()Returns the value of thelocalrecord component.booleanReturns the value of theperBasketrecord component.@Nullable ConstraintExpressionReturns the value of thepreConditionrecord component.@Nullable SemanticConstraint.ConstraintPathprefix()Returns the value of theprefixrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
Unique
public Unique(String constraintName, String constraintScopedName, String contextFqn, ConstraintExpression.IliVersion version, boolean local, boolean perBasket, @Nullable ConstraintExpression preCondition, @Nullable SemanticConstraint.ConstraintPath prefix, List<SemanticConstraint.ConstraintPath> elements) Creates an instance of aUniquerecord class.- Parameters:
constraintName- the value for theconstraintNamerecord componentconstraintScopedName- the value for theconstraintScopedNamerecord componentcontextFqn- the value for thecontextFqnrecord componentversion- the value for theversionrecord componentlocal- the value for thelocalrecord componentperBasket- the value for theperBasketrecord componentpreCondition- the value for thepreConditionrecord componentprefix- the value for theprefixrecord componentelements- the value for theelementsrecord component
-
-
Method Details
-
kind
- Specified by:
kindin interfaceSemanticConstraint
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
constraintName
Returns the value of theconstraintNamerecord component.- Specified by:
constraintNamein interfaceSemanticConstraint- Returns:
- the value of the
constraintNamerecord component
-
constraintScopedName
Returns the value of theconstraintScopedNamerecord component.- Specified by:
constraintScopedNamein interfaceSemanticConstraint- Returns:
- the value of the
constraintScopedNamerecord component
-
contextFqn
Returns the value of thecontextFqnrecord component.- Specified by:
contextFqnin interfaceSemanticConstraint- Returns:
- the value of the
contextFqnrecord component
-
version
Returns the value of theversionrecord component.- Specified by:
versionin interfaceSemanticConstraint- Returns:
- the value of the
versionrecord component
-
local
public boolean local()Returns the value of thelocalrecord component.- Returns:
- the value of the
localrecord component
-
perBasket
public boolean perBasket()Returns the value of theperBasketrecord component.- Returns:
- the value of the
perBasketrecord component
-
preCondition
Returns the value of thepreConditionrecord component.- Returns:
- the value of the
preConditionrecord component
-
prefix
Returns the value of theprefixrecord component.- Returns:
- the value of the
prefixrecord component
-
elements
Returns the value of theelementsrecord component.- Returns:
- the value of the
elementsrecord component
-