Record Class CtxDtoDiscriminator.ModelMapping
java.lang.Object
java.lang.Record
dk.mada.jaxrs.generator.mpclient.dto.tmpl.CtxDtoDiscriminator.ModelMapping
- Record Components:
modelName
- the name of the modelmappingName
- the way it is referred to in the streamvendorExtensions
- map of vendor extensions
- Enclosing interface:
- CtxDtoDiscriminator
public static record CtxDtoDiscriminator.ModelMapping(String modelName, String mappingName, @Nullable Map<String,String> vendorExtensions)
extends Record
Defines a mapping between a model (DTO) name and a name used in the serialization stream.
-
Constructor Summary
-
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 themappingName
record component.Returns the value of themodelName
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thevendorExtensions
record component.
-
Constructor Details
-
ModelMapping
public ModelMapping(String modelName, String mappingName, @Nullable Map<String, String> vendorExtensions) Creates an instance of aModelMapping
record class.- Parameters:
modelName
- the value for themodelName
record componentmappingName
- the value for themappingName
record componentvendorExtensions
- the value for thevendorExtensions
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)
. -
modelName
Returns the value of themodelName
record component.- Returns:
- the value of the
modelName
record component
-
mappingName
Returns the value of themappingName
record component.- Returns:
- the value of the
mappingName
record component
-
vendorExtensions
Returns the value of thevendorExtensions
record component.- Returns:
- the value of the
vendorExtensions
record component
-