Package org.umlg.sqlg.structure
Record Class Multiplicity
java.lang.Object
java.lang.Record
org.umlg.sqlg.structure.Multiplicity
-
Constructor Summary
ConstructorsConstructorDescriptionMultiplicity(long lower, long upper, boolean unique, boolean ordered) Creates an instance of aMultiplicityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static MultiplicityfromNotifyJson(com.fasterxml.jackson.databind.JsonNode jsonNode) final inthashCode()Returns a hash code value for this object.booleanbooleanisMany()booleanisOne()booleanlonglower()Returns the value of thelowerrecord component.static Multiplicityof()static Multiplicityof(long lower, long higher) static Multiplicityof(long lower, long higher, boolean unique) booleanordered()Returns the value of theorderedrecord component.toCheckConstraint(String column) com.fasterxml.jackson.databind.node.ObjectNodetoString()Returns a string representation of this record class.booleanunique()Returns the value of theuniquerecord component.longupper()Returns the value of theupperrecord component.
-
Constructor Details
-
Multiplicity
public Multiplicity(long lower, long upper, boolean unique, boolean ordered) Creates an instance of aMultiplicityrecord class.- Parameters:
lower- the value for thelowerrecord componentupper- the value for theupperrecord componentunique- the value for theuniquerecord componentordered- the value for theorderedrecord component
-
-
Method Details
-
of
-
of
-
of
-
isMany
public boolean isMany() -
isOne
public boolean isOne() -
isRequired
public boolean isRequired() -
hasLimits
public boolean hasLimits() -
toCheckConstraint
-
toNotifyJson
public com.fasterxml.jackson.databind.node.ObjectNode toNotifyJson() -
fromNotifyJson
-
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 with '=='. -
lower
public long lower()Returns the value of thelowerrecord component.- Returns:
- the value of the
lowerrecord component
-
upper
public long upper()Returns the value of theupperrecord component.- Returns:
- the value of the
upperrecord component
-
unique
public boolean unique()Returns the value of theuniquerecord component.- Returns:
- the value of the
uniquerecord component
-
ordered
public boolean ordered()Returns the value of theorderedrecord component.- Returns:
- the value of the
orderedrecord component
-