Record Class ModelFlags

java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.descriptor.model.part.ModelFlags
Record Components:
editable - whether generated stubs are editable
crudCraftEntity - whether this model is a CrudCraft entity
embeddable - whether this model is marked as embeddable

public record ModelFlags(boolean editable, boolean crudCraftEntity, boolean embeddable) extends Record
Represents boolean flags that describe model characteristics.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModelFlags(boolean editable, boolean crudCraftEntity, boolean embeddable)
    Creates an instance of a ModelFlags record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns the value of the crudCraftEntity record component.
    boolean
    Returns the value of the editable record component.
    boolean
    Returns the value of the embeddable record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns true if this model is a CrudCraft entity.
    boolean
    Returns true if the generated stubs are editable.
    boolean
    Returns true if this model is marked as embeddable.
    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

    • ModelFlags

      public ModelFlags(boolean editable, boolean crudCraftEntity, boolean embeddable)
      Creates an instance of a ModelFlags record class.
      Parameters:
      editable - the value for the editable record component
      crudCraftEntity - the value for the crudCraftEntity record component
      embeddable - the value for the embeddable record component
  • Method Details

    • isEditable

      public boolean isEditable()
      Returns true if the generated stubs are editable.
      Returns:
      true if editable
    • isCrudCraftEntity

      public boolean isCrudCraftEntity()
      Returns true if this model is a CrudCraft entity.
      Returns:
      true if CrudCraft entity
    • isEmbeddable

      public boolean isEmbeddable()
      Returns true if this model is marked as embeddable.
      Returns:
      true if embeddable
    • 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 '=='.
      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.
    • editable

      public boolean editable()
      Returns the value of the editable record component.
      Returns:
      the value of the editable record component
    • crudCraftEntity

      public boolean crudCraftEntity()
      Returns the value of the crudCraftEntity record component.
      Returns:
      the value of the crudCraftEntity record component
    • embeddable

      public boolean embeddable()
      Returns the value of the embeddable record component.
      Returns:
      the value of the embeddable record component