Record Class ModelFlags
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.descriptor.model.part.ModelFlags
- Record Components:
editable- whether generated stubs are editablecrudCraftEntity- whether this model is a CrudCraft entityembeddable- 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
ConstructorsConstructorDescriptionModelFlags(boolean editable, boolean crudCraftEntity, boolean embeddable) Creates an instance of aModelFlagsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecrudCraftEntityrecord component.booleaneditable()Returns the value of theeditablerecord component.booleanReturns the value of theembeddablerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns true if this model is a CrudCraft entity.booleanReturns true if the generated stubs are editable.booleanReturns true if this model is marked as embeddable.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelFlags
public ModelFlags(boolean editable, boolean crudCraftEntity, boolean embeddable) Creates an instance of aModelFlagsrecord class.- Parameters:
editable- the value for theeditablerecord componentcrudCraftEntity- the value for thecrudCraftEntityrecord componentembeddable- the value for theembeddablerecord 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
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 '=='. -
editable
public boolean editable()Returns the value of theeditablerecord component.- Returns:
- the value of the
editablerecord component
-
crudCraftEntity
public boolean crudCraftEntity()Returns the value of thecrudCraftEntityrecord component.- Returns:
- the value of the
crudCraftEntityrecord component
-
embeddable
public boolean embeddable()Returns the value of theembeddablerecord component.- Returns:
- the value of the
embeddablerecord component
-