java.lang.Object
java.lang.Record
org.litebridgedb.orm.api.spec.DtoTableSpec
- Record Components:
dtoClass- the class of the Data Transfer Object to be registered; must not be null.tableSpec- the table specification defining the mapping of the DTO class to the database table; must not be null.dtoInterfaces- list of additional superinterfaces of the DTO class; may be empty if not needed
public record DtoTableSpec(Class<?> dtoClass, TableSpec tableSpec, List<Class<?>> dtoInterfaces)
extends Record
DTO-to-table mapping details, used for registering a DTO class as an entity with the Litebridge ORM.
-
Constructor Summary
ConstructorsConstructorDescriptionDtoTableSpec(Class<?> dtoClass, TableSpec tableSpec) Constructs a DtoTableSpec instance using the specified DTO class and table specification.DtoTableSpec(Class<?> dtoClass, TableSpec tableSpec, List<Class<?>> dtoInterfaces) Creates an instance of aDtoTableSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionClass<?> dtoClass()Returns the value of thedtoClassrecord component.Returns the value of thedtoInterfacesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thetableSpecrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DtoTableSpec
Constructs a DtoTableSpec instance using the specified DTO class and table specification. The list of DTO interfaces is initialized as an empty list.- Parameters:
dtoClass- the class of the Data Transfer Object to be registered; must not be null.tableSpec- the table specification defining the mapping of the DTO class to the database table; must not be null.
-
DtoTableSpec
Creates an instance of aDtoTableSpecrecord class.- Parameters:
dtoClass- the value for thedtoClassrecord componenttableSpec- the value for thetableSpecrecord componentdtoInterfaces- the value for thedtoInterfacesrecord component
-
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
dtoClass
Returns the value of thedtoClassrecord component.- Returns:
- the value of the
dtoClassrecord component
-
tableSpec
Returns the value of thetableSpecrecord component.- Returns:
- the value of the
tableSpecrecord component
-
dtoInterfaces
Returns the value of thedtoInterfacesrecord component.- Returns:
- the value of the
dtoInterfacesrecord component
-