Record Class OavDescriptor
java.lang.Object
java.lang.Record
com.smeup.kokos.sdk.entity.model.descriptors.OavDescriptor
- Record Components:
id- the OAV identifier (e.g. "I/01")type- the Smeup object type (e.g. "J1")parameter- the Smeup object parameter (e.g. "STR")description- the human-readable description (e.g. "Full name")isId- whether this OAV represents the entity identifierisDescription- whether this OAV is also annotated withDescription
public record OavDescriptor(String id, String type, String parameter, String description, boolean isId, boolean isDescription)
extends Record
Describes a single OAV (Object Attribute Value) from the
SmeupOav
annotation metadata of an entity class.
This is a pure metadata descriptor — it carries no instance data, only the structural definition of the OAV as declared on the entity field.
-
Constructor Summary
ConstructorsConstructorDescriptionOavDescriptor(String id, String type, String parameter, String description, boolean isId, boolean isDescription) Creates an instance of aOavDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.static OavDescriptorfromAnnotation(SmeupOav ann) Returns the value of the given attribute by name.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanReturns the value of theisDescriptionrecord component.booleanisId()Returns the value of theisIdrecord component.booleanDetermines whether a tooltip is necessary for this entity, based on the types of its OAVs.Returns the value of theparameterrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
OavDescriptor
public OavDescriptor(String id, String type, String parameter, String description, boolean isId, boolean isDescription) Creates an instance of aOavDescriptorrecord class.- Parameters:
id- the value for theidrecord componenttype- the value for thetyperecord componentparameter- the value for theparameterrecord componentdescription- the value for thedescriptionrecord componentisId- the value for theisIdrecord componentisDescription- the value for theisDescriptionrecord component
-
-
Method Details
-
get
Returns the value of the given attribute by name. SupportsSmeupOav.ATTRSplus the derived flagisDescription. -
fromAnnotation
-
isTooltipEnabled
public boolean isTooltipEnabled()Determines whether a tooltip is necessary for this entity, based on the types of its OAVs.- Returns:
- true if at least one OAV has a non-primitive type that would benefit from a tooltip; false if all OAVs are of primitive types
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
parameter
Returns the value of theparameterrecord component.- Returns:
- the value of the
parameterrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
isId
public boolean isId()Returns the value of theisIdrecord component.- Returns:
- the value of the
isIdrecord component
-
isDescription
public boolean isDescription()Returns the value of theisDescriptionrecord component.- Returns:
- the value of the
isDescriptionrecord component
-