Record Class CtxDtoDiscriminator
java.lang.Object
java.lang.Record
dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxDtoDiscriminator
- Record Components:
propertyBaseName
- the name of the property with the selector stringmappedModels
- the list of mapped models
public record CtxDtoDiscriminator(String propertyBaseName, List<CtxDtoDiscriminator.ModelMapping> mappedModels)
extends Record
Custom extensions. In separate (mada.) context so they are easier to spot in the templates.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Defines a mapping between a model (DTO) name and a name used in the serialization stream. -
Constructor Summary
ConstructorsConstructorDescriptionCtxDtoDiscriminator
(String propertyBaseName, List<CtxDtoDiscriminator.ModelMapping> mappedModels) Creates an instance of aCtxDtoDiscriminator
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themappedModels
record component.Returns the value of thepropertyBaseName
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
CtxDtoDiscriminator
public CtxDtoDiscriminator(String propertyBaseName, List<CtxDtoDiscriminator.ModelMapping> mappedModels) Creates an instance of aCtxDtoDiscriminator
record class.- Parameters:
propertyBaseName
- the value for thepropertyBaseName
record componentmappedModels
- the value for themappedModels
record 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)
. -
propertyBaseName
Returns the value of thepropertyBaseName
record component.- Returns:
- the value of the
propertyBaseName
record component
-
mappedModels
Returns the value of themappedModels
record component.- Returns:
- the value of the
mappedModels
record component
-