Record Class EntityConfig
java.lang.Object
java.lang.Record
com.pragma.archetype.domain.model.entity.EntityConfig
- Record Components:
name- Entity name (e.g., "User", "Product")fields- List of entity fieldshasId- Whether entity has an ID fieldidType- Type of ID field (String, Long, UUID)packageName- Package where entity will be generated
public record EntityConfig(String name, List<EntityField> fields, boolean hasId, String idType, String packageName)
extends Record
Configuration for generating a domain entity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCustom builder class to provide default values. -
Constructor Summary
ConstructorsConstructorDescriptionEntityConfig(String name, List<EntityField> fields, boolean hasId, String idType, String packageName) Compact constructor with defaults. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.final inthashCode()Returns a hash code value for this object.booleanhasId()Returns the value of thehasIdrecord component.idType()Returns the value of theidTyperecord component.name()Returns the value of thenamerecord component.Returns the value of thepackageNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
EntityConfig
public EntityConfig(String name, List<EntityField> fields, boolean hasId, String idType, String packageName) Compact constructor with defaults.
-
-
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
-
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-
hasId
public boolean hasId()Returns the value of thehasIdrecord component.- Returns:
- the value of the
hasIdrecord component
-
idType
Returns the value of theidTyperecord component.- Returns:
- the value of the
idTyperecord component
-
packageName
Returns the value of thepackageNamerecord component.- Returns:
- the value of the
packageNamerecord component
-