diff --git a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfo.java b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfo.java index 84a1a26055..ffe787997d 100644 --- a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfo.java +++ b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfo.java @@ -75,7 +75,7 @@ private Object[] getLoggingInfo(IRowMeta inputRowMeta, Object[] inputRowData) th argument = resolve(argument); } - switch (meta.getFields().get(i).getFieldType()) { + switch (GetLoggingInfoTypes.getTypeFromString(meta.getFields().get(i).getFieldType())) { case TYPE_SYSTEM_INFO_PIPELINE_DATE_FROM: { Date previousSuccess = getPreviousPipelineSuccess(argument); diff --git a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoDialog.java b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoDialog.java index 0a63b4fe67..ad0acb26bb 100644 --- a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoDialog.java +++ b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoDialog.java @@ -220,8 +220,7 @@ public void getData() { TableItem item = wFields.table.getItem(i); item.setText(1, Const.NVL(input.getFields().get(i).getFieldName(), "")); - GetLoggingInfoTypes type = input.getFields().get(i).getFieldType(); - item.setText(2, Const.NVL(type.getDescription(), "")); + item.setText(2, Const.NVL(input.getFields().get(i).getFieldType(), "")); item.setText(3, Const.NVL(input.getFields().get(i).getFieldArgument(), "")); } @@ -266,8 +265,7 @@ private void getInfo(GetLoggingInfoMeta in) throws HopException { TableItem item = wFields.getNonEmpty(i); GetLoggingInfoField field = new GetLoggingInfoField(); field.setFieldName(item.getText(1)); - GetLoggingInfoTypes type = GetLoggingInfoTypes.getTypeFromString(item.getText(2)); - field.setFieldType(type); + field.setFieldType(item.getText(2)); field.setFieldArgument(item.getText(3)); in.getFields().add(field); } diff --git a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoField.java b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoField.java index 446f66b11b..65dcdff8ea 100644 --- a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoField.java +++ b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoField.java @@ -11,27 +11,17 @@ public class GetLoggingInfoField { public GetLoggingInfoField() {} - public GetLoggingInfoField( - String fieldName, GetLoggingInfoTypes fieldType, String fieldArgument) { + public GetLoggingInfoField(String fieldName, String fieldType, String fieldArgument) { this.fieldName = fieldName; this.fieldType = fieldType; this.fieldArgument = fieldArgument; } - public GetLoggingInfoField(GetLoggingInfoField f) { - this.fieldName = f.getFieldName(); - this.fieldType = f.getFieldType(); - this.fieldArgument = f.getFieldArgument(); - } - @HopMetadataProperty(key = "name", injectionKey = "FIELD_NAME") private String fieldName; - @HopMetadataProperty( - key = "type", - injectionKey = "FIELD_TYPE", - injectionConverter = GetLoggingInfoMetaInjectionTypeConverter.class) - private GetLoggingInfoTypes fieldType; + @HopMetadataProperty(key = "type", injectionKey = "FIELD_TYPE") + private String fieldType; @HopMetadataProperty(key = "argument", injectionKey = "FIELD_ARGUMENT") private String fieldArgument; @@ -50,12 +40,4 @@ public boolean equals(Object obj) { public int hashCode() { return Objects.hash(fieldName, fieldType, fieldArgument); } - - public GetLoggingInfoTypes getFieldType() { - return fieldType; - } - - public void setFieldType(GetLoggingInfoTypes fieldType) { - this.fieldType = fieldType; - } } diff --git a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoMeta.java b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoMeta.java index 3750dfe649..8429cbef3c 100644 --- a/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoMeta.java +++ b/plugins/tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoMeta.java @@ -62,6 +62,7 @@ public class GetLoggingInfoMeta extends BaseTransformMeta(); } @Override @@ -78,22 +79,22 @@ public void setDefault() { GetLoggingInfoField f1 = new GetLoggingInfoField(); f1.setFieldName("startOfPipelineDelta"); - f1.setFieldType(GetLoggingInfoTypes.TYPE_SYSTEM_INFO_PIPELINE_DATE_FROM); + f1.setFieldType(GetLoggingInfoTypes.TYPE_SYSTEM_INFO_PIPELINE_DATE_FROM.getCode()); fields.add(f1); GetLoggingInfoField f2 = new GetLoggingInfoField(); - f2.setFieldName(""); - f2.setFieldType(GetLoggingInfoTypes.TYPE_SYSTEM_INFO_PIPELINE_DATE_TO); + f2.setFieldName("endOfPipelineDelta"); + f2.setFieldType(GetLoggingInfoTypes.TYPE_SYSTEM_INFO_PIPELINE_DATE_TO.getCode()); fields.add(f2); GetLoggingInfoField f3 = new GetLoggingInfoField(); f3.setFieldName("startOfWorkflowDelta"); - f3.setFieldType(GetLoggingInfoTypes.TYPE_SYSTEM_INFO_WORKFLOW_DATE_TO); + f3.setFieldType(GetLoggingInfoTypes.TYPE_SYSTEM_INFO_WORKFLOW_DATE_TO.getCode()); fields.add(f3); GetLoggingInfoField f4 = new GetLoggingInfoField(); f4.setFieldName("endOfWorkflowDelta"); - f4.setFieldType(GetLoggingInfoTypes.TYPE_SYSTEM_INFO_WORKFLOW_DATE_TO); + f4.setFieldType(GetLoggingInfoTypes.TYPE_SYSTEM_INFO_WORKFLOW_DATE_TO.getCode()); fields.add(f4); } @@ -109,7 +110,7 @@ public void getFields( for (int i = 0; i < fields.size(); i++) { IValueMeta v; - switch (fields.get(i).getFieldType()) { + switch (GetLoggingInfoTypes.getTypeFromString(fields.get(i).getFieldType())) { case TYPE_SYSTEM_INFO_PIPELINE_DATE_FROM, TYPE_SYSTEM_INFO_PIPELINE_DATE_TO, TYPE_SYSTEM_INFO_WORKFLOW_DATE_FROM, @@ -143,7 +144,7 @@ public void check( // See if we have input streams leading to this transform! int nrRemarks = remarks.size(); for (int i = 0; i < fields.size(); i++) { - if (fields.get(i).getFieldType().ordinal() + if (GetLoggingInfoTypes.getTypeFromString(fields.get(i).getFieldType()).ordinal() <= GetLoggingInfoTypes.TYPE_SYSTEM_INFO_NONE.ordinal()) { CheckResult cr = new CheckResult(