Record Class GlobalUniqueConstraintContribution
java.lang.Object
java.lang.Record
ch.tocco.nice2.model.entity.api.schema.checks.GlobalUniqueConstraintContribution
Normally if an entity is bu-dependant, the field is only unique per business unit.
This contribution can be used to make a field unique overall business units
if an entity has a relation to the business unit (= bu-dependant).
-
Constructor Summary
ConstructorDescriptionGlobalUniqueConstraintContribution
(String modelName, String fieldName) Creates an instance of aGlobalUniqueConstraintContribution
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefieldName
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of themodelName
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
GlobalUniqueConstraintContribution
Creates an instance of aGlobalUniqueConstraintContribution
record class.- Parameters:
modelName
- the value for themodelName
record componentfieldName
- the value for thefieldName
record component
-
-
Method Details
-
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)
. -
modelName
Returns the value of themodelName
record component.- Returns:
- the value of the
modelName
record component
-
fieldName
Returns the value of thefieldName
record component.- Returns:
- the value of the
fieldName
record component
-