Record Class ProjectionFieldResolver.FieldMapping
java.lang.Object
java.lang.Record
nl.datasteel.crudcraft.projection.mapping.ProjectionFieldResolver.FieldMapping
- Record Components:
path- entity attribute path relative to the current entitycollection- whether the field represents a collectionnestedType- nested DTO type for complex attributes, ornull
- Enclosing class:
ProjectionFieldResolver
public static record ProjectionFieldResolver.FieldMapping(String path, boolean collection, Class<?> nestedType)
extends Record
Describes a single field mapping for a DTO constructor parameter.
-
Constructor Summary
ConstructorsConstructorDescriptionFieldMapping(String path, boolean collection, Class<?> nestedType) Creates an instance of aFieldMappingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecollectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Class<?> Returns the value of thenestedTyperecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FieldMapping
Creates an instance of aFieldMappingrecord class.- Parameters:
path- the value for thepathrecord componentcollection- the value for thecollectionrecord componentnestedType- the value for thenestedTyperecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
collection
public boolean collection()Returns the value of thecollectionrecord component.- Returns:
- the value of the
collectionrecord component
-
nestedType
Returns the value of thenestedTyperecord component.- Returns:
- the value of the
nestedTyperecord component
-