Package io.jmix.dynmodel.meta
Record Class DynamicAttributeDefinition
java.lang.Object
java.lang.Record
io.jmix.dynmodel.meta.DynamicAttributeDefinition
- Record Components:
name- attribute namejavaClass- datatype Java classentityName- referenced entity nameenumeration- enumeration name or fully qualified class namelength- string or binary lengthlob- whether the attribute has LOB metadatarequired- whether the attribute is requiredunique- whether the attribute is uniqueinstanceName- whether the attribute participates in instance-name metadatacollection- whether the attribute is a collection compositioncalculated- calculated attribute definitionvalidation- validation definitionresourceRoles- attribute resource-role grantsmessages- localized attribute captions
public record DynamicAttributeDefinition(String name, @Nullable Class<?> javaClass, @Nullable String entityName, @Nullable String enumeration, @Nullable Integer length, boolean lob, boolean required, boolean unique, boolean instanceName, boolean collection, @Nullable DynamicCalculatedAttributeDefinition calculated, @Nullable DynamicValidationDefinition<DynamicAttributeConstraintDefinition> validation, @Nullable DynamicAttributeAccessDefinition resourceRoles, @Nullable Map<String,String> messages)
extends Record
Defines a runtime dynamic attribute.
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicAttributeDefinition(String name, @Nullable Class<?> javaClass, @Nullable String entityName, @Nullable String enumeration, @Nullable Integer length, boolean lob, boolean required, boolean unique, boolean instanceName, boolean collection, @Nullable DynamicCalculatedAttributeDefinition calculated, @Nullable DynamicValidationDefinition<DynamicAttributeConstraintDefinition> validation, @Nullable DynamicAttributeAccessDefinition resourceRoles, @Nullable Map<String, String> messages) Creates an instance of aDynamicAttributeDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable DynamicCalculatedAttributeDefinitionReturns the value of thecalculatedrecord component.booleanReturns the value of thecollectionrecord component.@Nullable StringReturns the value of theentityNamerecord component.@Nullable StringReturns the value of theenumerationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theinstanceNamerecord component.@Nullable Class<?> Returns the value of thejavaClassrecord component.@Nullable Integerlength()Returns the value of thelengthrecord component.booleanlob()Returns the value of thelobrecord component.messages()Returns the value of themessagesrecord component.name()Returns the value of thenamerecord component.booleanrequired()Returns the value of therequiredrecord component.@Nullable DynamicAttributeAccessDefinitionReturns the value of theresourceRolesrecord component.final StringtoString()Returns a string representation of this record class.booleanunique()Returns the value of theuniquerecord component.Returns the value of thevalidationrecord component.
-
Constructor Details
-
DynamicAttributeDefinition
public DynamicAttributeDefinition(String name, @Nullable Class<?> javaClass, @Nullable String entityName, @Nullable String enumeration, @Nullable Integer length, boolean lob, boolean required, boolean unique, boolean instanceName, boolean collection, @Nullable DynamicCalculatedAttributeDefinition calculated, @Nullable DynamicValidationDefinition<DynamicAttributeConstraintDefinition> validation, @Nullable DynamicAttributeAccessDefinition resourceRoles, @Nullable Map<String, String> messages) Creates an instance of aDynamicAttributeDefinitionrecord class.- Parameters:
name- the value for thenamerecord componentjavaClass- the value for thejavaClassrecord componententityName- the value for theentityNamerecord componentenumeration- the value for theenumerationrecord componentlength- the value for thelengthrecord componentlob- the value for thelobrecord componentrequired- the value for therequiredrecord componentunique- the value for theuniquerecord componentinstanceName- the value for theinstanceNamerecord componentcollection- the value for thecollectionrecord componentcalculated- the value for thecalculatedrecord componentvalidation- the value for thevalidationrecord componentresourceRoles- the value for theresourceRolesrecord componentmessages- the value for themessagesrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
javaClass
Returns the value of thejavaClassrecord component.- Returns:
- the value of the
javaClassrecord component
-
entityName
Returns the value of theentityNamerecord component.- Returns:
- the value of the
entityNamerecord component
-
enumeration
Returns the value of theenumerationrecord component.- Returns:
- the value of the
enumerationrecord component
-
length
Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-
lob
public boolean lob()Returns the value of thelobrecord component.- Returns:
- the value of the
lobrecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
unique
public boolean unique()Returns the value of theuniquerecord component.- Returns:
- the value of the
uniquerecord component
-
instanceName
public boolean instanceName()Returns the value of theinstanceNamerecord component.- Returns:
- the value of the
instanceNamerecord component
-
collection
public boolean collection()Returns the value of thecollectionrecord component.- Returns:
- the value of the
collectionrecord component
-
calculated
Returns the value of thecalculatedrecord component.- Returns:
- the value of the
calculatedrecord component
-
validation
Returns the value of thevalidationrecord component.- Returns:
- the value of the
validationrecord component
-
resourceRoles
Returns the value of theresourceRolesrecord component.- Returns:
- the value of the
resourceRolesrecord component
-
messages
Returns the value of themessagesrecord component.- Returns:
- the value of the
messagesrecord component
-