Class DozerClassMappingMetadata
- java.lang.Object
-
- com.github.dozermapper.core.metadata.DozerClassMappingMetadata
-
- All Implemented Interfaces:
ClassMappingMetadata
public final class DozerClassMappingMetadata extends Object implements ClassMappingMetadata
Internal use only.
-
-
Constructor Summary
Constructors Constructor Description DozerClassMappingMetadata(ClassMap classMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDateFormat()Obtains the date format that is used during date conversions.Class<?>getDestinationClass()Obtains the Class object that represents the destination class in the mapping definition.StringgetDestinationClassName()Obtains the name of the destination class in the mapping definition.FieldMappingMetadatagetFieldMappingByDestination(String destinationFieldName)Gets a single field mapping definition by looking up the name of the destination field.FieldMappingMetadatagetFieldMappingBySource(String sourceFieldName)Gets a single field mapping definition by looking up the name of the source field.List<FieldMappingMetadata>getFieldMappings()Gets a list of all field mapping definitions that are used for the mapping of the classes.StringgetMapId()Returns the map id of this mapping definition used for contextual mapping selection.MappingDirectiongetMappingDirection()Used to check if a mapping is bi- or unidirectional.Class<?>getSourceClass()Obtains the Class object that represents the source class in the mapping definition.StringgetSourceClassName()Obtains the name of the source class in the mapping definition.booleanisDestinationMapEmptyString()Whether destination should map empty stringsbooleanisDestinationMapNull()Whether destination should map nullbooleanisSourceMapEmptyString()Whether source should map empty stringsbooleanisSourceMapNull()Whether source should map nullbooleanisStopOnErrors()Whether to stop if an exception occurs while mappingbooleanisTrimStrings()Whether strings should be trimmedbooleanisWildcard()Whether wildcard policy is enabled
-
-
-
Constructor Detail
-
DozerClassMappingMetadata
public DozerClassMappingMetadata(ClassMap classMap)
-
-
Method Detail
-
getSourceClassName
public String getSourceClassName()
Description copied from interface:ClassMappingMetadataObtains the name of the source class in the mapping definition.- Specified by:
getSourceClassNamein interfaceClassMappingMetadata- Returns:
- The name of the source class.
-
getDestinationClassName
public String getDestinationClassName()
Description copied from interface:ClassMappingMetadataObtains the name of the destination class in the mapping definition.- Specified by:
getDestinationClassNamein interfaceClassMappingMetadata- Returns:
- The name of the destination class.
-
getSourceClass
public Class<?> getSourceClass()
Description copied from interface:ClassMappingMetadataObtains the Class object that represents the source class in the mapping definition.- Specified by:
getSourceClassin interfaceClassMappingMetadata- Returns:
- The Class object of the source class.
-
getDestinationClass
public Class<?> getDestinationClass()
Description copied from interface:ClassMappingMetadataObtains the Class object that represents the destination class in the mapping definition.- Specified by:
getDestinationClassin interfaceClassMappingMetadata- Returns:
- The Class object of the destination class.
-
isStopOnErrors
public boolean isStopOnErrors()
Description copied from interface:ClassMappingMetadataWhether to stop if an exception occurs while mapping- Specified by:
isStopOnErrorsin interfaceClassMappingMetadata- Returns:
- true if the mapping will be stopped upon errors.
-
isTrimStrings
public boolean isTrimStrings()
Description copied from interface:ClassMappingMetadataWhether strings should be trimmed- Specified by:
isTrimStringsin interfaceClassMappingMetadata- Returns:
- true if strings are trimmed during mapping.
-
isWildcard
public boolean isWildcard()
Description copied from interface:ClassMappingMetadataWhether wildcard policy is enabled- Specified by:
isWildcardin interfaceClassMappingMetadata- Returns:
- The wildcard policy. True means that fields with the same name are automatically mapped.
-
isSourceMapNull
public boolean isSourceMapNull()
Description copied from interface:ClassMappingMetadataWhether source should map null- Specified by:
isSourceMapNullin interfaceClassMappingMetadata- Returns:
- true if null values are mapped from the source class.
-
isDestinationMapNull
public boolean isDestinationMapNull()
Description copied from interface:ClassMappingMetadataWhether destination should map null- Specified by:
isDestinationMapNullin interfaceClassMappingMetadata- Returns:
- true if null values are mapped from the destination class.
-
isSourceMapEmptyString
public boolean isSourceMapEmptyString()
Description copied from interface:ClassMappingMetadataWhether source should map empty strings- Specified by:
isSourceMapEmptyStringin interfaceClassMappingMetadata- Returns:
- true if empty are mapped from the source class.
-
isDestinationMapEmptyString
public boolean isDestinationMapEmptyString()
Description copied from interface:ClassMappingMetadataWhether destination should map empty strings- Specified by:
isDestinationMapEmptyStringin interfaceClassMappingMetadata- Returns:
- true if empty are mapped from the destination class.
-
getDateFormat
public String getDateFormat()
Description copied from interface:ClassMappingMetadataObtains the date format that is used during date conversions.- Specified by:
getDateFormatin interfaceClassMappingMetadata- Returns:
- The date format as a string.
-
getMappingDirection
public MappingDirection getMappingDirection()
Description copied from interface:ClassMappingMetadataUsed to check if a mapping is bi- or unidirectional.- Specified by:
getMappingDirectionin interfaceClassMappingMetadata- Returns:
- The
MappingDirectionobject that specifies the direction of the map.
-
getMapId
public String getMapId()
Description copied from interface:ClassMappingMetadataReturns the map id of this mapping definition used for contextual mapping selection.- Specified by:
getMapIdin interfaceClassMappingMetadata- Returns:
- The identifier as a string.
-
getFieldMappings
public List<FieldMappingMetadata> getFieldMappings()
Description copied from interface:ClassMappingMetadataGets a list of all field mapping definitions that are used for the mapping of the classes.- Specified by:
getFieldMappingsin interfaceClassMappingMetadata- Returns:
- The list of
FieldMappingMetadataobjects.
-
getFieldMappingBySource
public FieldMappingMetadata getFieldMappingBySource(String sourceFieldName)
Description copied from interface:ClassMappingMetadataGets a single field mapping definition by looking up the name of the source field.- Specified by:
getFieldMappingBySourcein interfaceClassMappingMetadata- Parameters:
sourceFieldName- The name of the source field.- Returns:
- A
FieldMappingMetadataobject.
-
getFieldMappingByDestination
public FieldMappingMetadata getFieldMappingByDestination(String destinationFieldName)
Description copied from interface:ClassMappingMetadataGets a single field mapping definition by looking up the name of the destination field.- Specified by:
getFieldMappingByDestinationin interfaceClassMappingMetadata- Parameters:
destinationFieldName- The name of the destination field.- Returns:
- A
FieldMappingMetadataobject.
-
-