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 aDtoOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.String[]
Returns the names of additional response DTO variants this field participates in.final int
hashCode()
Returns a hash code value for this object.boolean
inDto()
Returns the value of theinDto
record component.boolean
inRef()
Returns the value of theinRef
record component.boolean
Returns the value of theinRequest
record component.boolean
isInDto()
Returns whether the field should be included in the DTO.boolean
isInRef()
Returns whether the field should be included in the reference DTO.boolean
Returns whether the field should be included in the request DTO.String[]
Returns the value of theresponseDtos
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
DtoOptions
Creates an instance of aDtoOptions
record class.- Parameters:
inDto
- the value for theinDto
record componentinRequest
- the value for theinRequest
record componentinRef
- the value for theinRef
record componentresponseDtos
- the value for theresponseDtos
record 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 theinDto
record component.- Returns:
- the value of the
inDto
record component
-
inRequest
public boolean inRequest()Returns the value of theinRequest
record component.- Returns:
- the value of the
inRequest
record component
-
inRef
public boolean inRef()Returns the value of theinRef
record component.- Returns:
- the value of the
inRef
record component
-
responseDtos
Returns the value of theresponseDtos
record component.- Returns:
- the value of the
responseDtos
record component
-