Record Class ModelRef.Custom

java.lang.Object
java.lang.Record
com.axelor.ai.governance.access.ModelRef.Custom
All Implemented Interfaces:
ModelRef
Enclosing interface:
ModelRef

public static record ModelRef.Custom(MetaJsonModel model) extends Record implements ModelRef
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.axelor.ai.governance.access.ModelRef

    ModelRef.Custom, ModelRef.Entity
  • Field Summary

    Fields inherited from interface com.axelor.ai.governance.access.ModelRef

    AUDIT_FIELDS, RECORD_FIELDS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an instance of a Custom record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    How a refusal names the model: an entity's simple name, a custom model's name.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the model record component.
    The model as permissions name it: an entity's full name, a custom model's name.
    Class<? extends Model>
    The entity the records are stored in, which the platform's model permissions name.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Custom

      public Custom(MetaJsonModel model)
      Creates an instance of a Custom record class.
      Parameters:
      model - the value for the model record component
  • Method Details

    • storage

      public Class<? extends Model> storage()
      Description copied from interface: ModelRef
      The entity the records are stored in, which the platform's model permissions name.
      Specified by:
      storage in interface ModelRef
    • name

      public String name()
      Description copied from interface: ModelRef
      The model as permissions name it: an entity's full name, a custom model's name.
      Specified by:
      name in interface ModelRef
    • displayName

      public String displayName()
      Description copied from interface: ModelRef
      How a refusal names the model: an entity's simple name, a custom model's name.
      Specified by:
      displayName in interface ModelRef
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • model

      public MetaJsonModel model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component