forked from apache/hop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial metadata conversion and XML cleanup. apache#2012
- Loading branch information
Showing
5 changed files
with
144 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...tech/neo4j/src/main/java/org/apache/hop/neo4j/transforms/loginfo/GetLoggingInfoField.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package org.apache.hop.neo4j.transforms.loginfo; | ||
|
||
import java.util.Objects; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.hop.metadata.api.HopMetadataProperty; | ||
|
||
@Getter | ||
@Setter | ||
public class GetLoggingInfoField { | ||
|
||
public GetLoggingInfoField() {} | ||
|
||
public GetLoggingInfoField( | ||
String fieldName, GetLoggingInfoTypes 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 = "argument", injectionKey = "FIELD_ARGUMENT") | ||
private String fieldArgument; | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) return true; | ||
if (obj == null || getClass() != obj.getClass()) return false; | ||
GetLoggingInfoField that = (GetLoggingInfoField) obj; | ||
return fieldType.equals(that.fieldType) | ||
&& fieldName.equals(that.fieldName) | ||
&& fieldArgument.equals(that.fieldArgument); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(fieldName, fieldType, fieldArgument); | ||
} | ||
|
||
public GetLoggingInfoTypes getFieldType() { | ||
return fieldType; | ||
} | ||
|
||
public void setFieldType(GetLoggingInfoTypes fieldType) { | ||
this.fieldType = fieldType; | ||
} | ||
} |
Oops, something went wrong.