001package gudusoft.gsqlparser.dlineage.dataflow.model.xml; 002 003import javax.xml.bind.annotation.XmlAttribute; 004import javax.xml.bind.annotation.XmlElement; 005import javax.xml.bind.annotation.XmlType; 006 007import gudusoft.gsqlparser.dlineage.dataflow.model.ModelBindingManager; 008 009@XmlType(propOrder = { "type", "coordinate", "code"}) 010public class transform implements Cloneable{ 011 012 private String type; 013 014 private String code; 015 016 private String coordinate; 017 018 public transform() { 019 } 020 021 @XmlAttribute(required = false) 022 public String getType() { 023 return this.type; 024 } 025 026 public void setType(String type) { 027 this.type = type; 028 } 029 030 @XmlElement(required = false) 031 public String getCode() { 032 return this.code; 033 } 034 035 public void setCode(String code) { 036 this.code = code; 037 } 038 039 @XmlAttribute(required = false) 040 public String getCoordinate() { 041 if (ModelBindingManager.getGlobalOption()==null || !ModelBindingManager.getGlobalOption().isTransformCoordinate()) { 042 return null; 043 } 044 return coordinate; 045 } 046 047 public String getCoordinate(boolean showCoordinate) { 048 if (!showCoordinate) { 049 return null; 050 } 051 return coordinate; 052 } 053 054 public void setCoordinate(String coordinate) { 055 if (ModelBindingManager.getGlobalOption()==null || !ModelBindingManager.getGlobalOption().isTransformCoordinate()) { 056 return; 057 } 058 this.coordinate = coordinate; 059 } 060 061 @Override 062 public int hashCode() { 063 final int prime = 31; 064 int result = 1; 065 result = prime * result + ((code == null) ? 0 : code.hashCode()); 066 result = prime * result + ((coordinate == null) ? 0 : coordinate.hashCode()); 067 result = prime * result + ((type == null) ? 0 : type.hashCode()); 068 return result; 069 } 070 071 @Override 072 public boolean equals(Object obj) { 073 if (this == obj) 074 return true; 075 if (obj == null) 076 return false; 077 if (getClass() != obj.getClass()) 078 return false; 079 transform other = (transform) obj; 080 if (code == null) { 081 if (other.code != null) 082 return false; 083 } else if (!code.equals(other.code)) 084 return false; 085 if (coordinate == null) { 086 if (other.coordinate != null) 087 return false; 088 } else if (!coordinate.equals(other.coordinate)) 089 return false; 090 if (type == null) { 091 if (other.type != null) 092 return false; 093 } else if (!type.equals(other.type)) 094 return false; 095 return true; 096 } 097 098 @Override 099 public String toString() { 100 return code; 101 } 102}