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 recordDefines 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 aCtxDtoDiscriminatorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themappedModelsrecord component.Returns the value of thepropertyBaseNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CtxDtoDiscriminator
public CtxDtoDiscriminator(String propertyBaseName, List<CtxDtoDiscriminator.ModelMapping> mappedModels) Creates an instance of aCtxDtoDiscriminatorrecord class.- Parameters:
propertyBaseName- the value for thepropertyBaseNamerecord componentmappedModels- the value for themappedModelsrecord 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 thepropertyBaseNamerecord component.- Returns:
- the value of the
propertyBaseNamerecord component
-
mappedModels
Returns the value of themappedModelsrecord component.- Returns:
- the value of the
mappedModelsrecord component
-