Record Class DtoOptions
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.codegen.descriptor.field.part.DtoOptions
- Record Components:
inDto- whether the field is included in the DTOinRequest- whether the field is included in the request DTOinRef- whether the field is included in the reference DTOresponseDtos- names of additional response DTO variants this field participates in
public record DtoOptions(boolean inDto, boolean inRequest, boolean inRef, String[] responseDtos)
extends Record
Represents the options for a field regarding Data Transfer Objects (DTOs).
This includes whether the field should be included in the DTO, request DTO, and reference DTO.
-
Constructor Summary
ConstructorsConstructorDescriptionDtoOptions(boolean inDto, boolean inRequest, boolean inRef, String[] responseDtos) Creates an instance of aDtoOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.String[]Returns the names of additional response DTO variants this field participates in.final inthashCode()Returns a hash code value for this object.booleaninDto()Returns the value of theinDtorecord component.booleaninRef()Returns the value of theinRefrecord component.booleanReturns the value of theinRequestrecord component.booleanisInDto()Returns whether the field should be included in the DTO.booleanisInRef()Returns whether the field should be included in the reference DTO.booleanReturns whether the field should be included in the request DTO.String[]Returns the value of theresponseDtosrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DtoOptions
Creates an instance of aDtoOptionsrecord class.- Parameters:
inDto- the value for theinDtorecord componentinRequest- the value for theinRequestrecord componentinRef- the value for theinRefrecord componentresponseDtos- the value for theresponseDtosrecord component
-
-
Method Details
-
isInDto
public boolean isInDto()Returns whether the field should be included in the DTO. -
isInRequest
public boolean isInRequest()Returns whether the field should be included in the request DTO. -
isInRef
public boolean isInRef()Returns whether the field should be included in the reference DTO. -
getResponseDtos
Returns the names of additional response DTO variants this field participates in. -
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 '=='. -
inDto
public boolean inDto()Returns the value of theinDtorecord component.- Returns:
- the value of the
inDtorecord component
-
inRequest
public boolean inRequest()Returns the value of theinRequestrecord component.- Returns:
- the value of the
inRequestrecord component
-
inRef
public boolean inRef()Returns the value of theinRefrecord component.- Returns:
- the value of the
inRefrecord component
-
responseDtos
Returns the value of theresponseDtosrecord component.- Returns:
- the value of the
responseDtosrecord component
-