use of io.atlasmap.java.v2.JavaField in project atlasmap by atlasmap.
the class JavaJavaFieldActionsTest method createField.
protected Field createField(String path) {
JavaField f = new JavaField();
f.setPath(path);
f.setFieldType(FieldType.STRING);
return f;
}
use of io.atlasmap.java.v2.JavaField in project atlasmap by atlasmap.
the class JavaJsonFlatMappingTest method generateJavaField.
protected JavaField generateJavaField(String path) {
JavaField javaField = AtlasJavaModelFactory.createJavaField();
javaField.setPath(path);
javaField.setModifiers(null);
return javaField;
}
use of io.atlasmap.java.v2.JavaField in project atlasmap by atlasmap.
the class JsonJavaFlatMappingTest method generateJavaField.
protected JavaField generateJavaField(String path) {
JavaField javaField = AtlasJavaModelFactory.createJavaField();
javaField.setPath(path);
javaField.setModifiers(null);
return javaField;
}
use of io.atlasmap.java.v2.JavaField in project atlasmap by atlasmap.
the class XmlJavaFlatMappingTest method generateJavaField.
protected JavaField generateJavaField(String path) {
JavaField javaField = AtlasJavaModelFactory.createJavaField();
javaField.setPath(path);
javaField.setModifiers(null);
return javaField;
}
use of io.atlasmap.java.v2.JavaField in project atlasmap by atlasmap.
the class JavaModule method merge.
private void merge(JavaClass inspectionClass, List<BaseMapping> mappings) {
if (inspectionClass == null || inspectionClass.getJavaFields() == null || inspectionClass.getJavaFields().getJavaField() == null) {
return;
}
if (mappings == null || mappings.size() == 0) {
return;
}
for (BaseMapping fm : mappings) {
if (fm instanceof Mapping && (((Mapping) fm).getOutputField() != null)) {
Field f = ((Mapping) fm).getOutputField().get(0);
if (f.getPath() != null) {
Field inspectField = findFieldByPath(inspectionClass, f.getPath());
if (inspectField != null && f instanceof JavaField && inspectField instanceof JavaField) {
String overrideClassName = ((JavaField) f).getClassName();
JavaField javaInspectField = (JavaField) inspectField;
// Support mapping overrides className
if (overrideClassName != null && !overrideClassName.equals(javaInspectField.getClassName())) {
javaInspectField.setClassName(overrideClassName);
}
}
}
}
}
}
Aggregations