- java.lang.Object
-
- com.orchestranetworks.addon.dint.mapping.TableMapping<SF,TF>
-
- Type Parameters:
SF
- Source field type.TF
- Target field type.
public abstract class TableMapping<SF extends Field,TF extends Field> extends java.lang.Object
Mapping between aSourceTable
and aTargetTable
.- Since:
- 4.1.0
- See Also:
MappingSpec.of(TableMapping...)
-
-
Constructor Summary
Constructors Constructor Description TableMapping()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ConstantTransformationMappingStep<SF,TF>
fromConstantStep(java.lang.String value)
Initializes a mapping from the specified constant transformation.abstract SourceFieldMappingStep<SF,TF>
fromSourceFieldStep(SF field)
Initializes a mapping from the specified source field.abstract TableMapping<SF,TF>
mapFields(SF sourceField, TF targetField)
Maps a source field and a target field.TableMapping<SF,TF>
mapFieldsWithMatcher(java.util.Collection<SF> sourceFields, java.util.Collection<TF> targetFields, FieldMatcher<SF,TF> fieldMatcher)
Maps automatically all source fields and target fields using the providedFieldMatcher
.static <ST extends Table<SF>,SF extends Field,TT extends Table<TF>,TF extends Field>
TableMapping<SF,TF>of(SourceTable<ST,SF> source, TargetTable<TT,TF>... targets)
Creates a new instance from a source table and one or many target tables.
-
-
-
Method Detail
-
of
@SafeVarargs public static <ST extends Table<SF>,SF extends Field,TT extends Table<TF>,TF extends Field> TableMapping<SF,TF> of(SourceTable<ST,SF> source, TargetTable<TT,TF>... targets)
Creates a new instance from a source table and one or many target tables.- Type Parameters:
ST
- Source table type.SF
- Source field type.TT
- Target table type.TF
- Target table type.- Parameters:
source
- The source table.targets
- The target tables.- Throws:
java.lang.IllegalArgumentException
- if any table isnull
or invalid.
-
mapFields
public abstract TableMapping<SF,TF> mapFields(SF sourceField, TF targetField)
Maps a source field and a target field.
-
mapFieldsWithMatcher
public final TableMapping<SF,TF> mapFieldsWithMatcher(java.util.Collection<SF> sourceFields, java.util.Collection<TF> targetFields, FieldMatcher<SF,TF> fieldMatcher)
Maps automatically all source fields and target fields using the providedFieldMatcher
.
-
fromSourceFieldStep
public abstract SourceFieldMappingStep<SF,TF> fromSourceFieldStep(SF field)
Initializes a mapping from the specified source field.
-
fromConstantStep
public abstract ConstantTransformationMappingStep<SF,TF> fromConstantStep(java.lang.String value)
Initializes a mapping from the specified constant transformation.
-
-