2424
2525public class ColDataType implements Serializable {
2626
27+ public enum Signedness {
28+ SIGNED , UNSIGNED
29+ }
30+
2731 private String dataType ;
2832 private List <String > argumentsStringList ;
2933 private String characterSet ;
3034 private IntervalQualifier intervalQualifier ;
3135 private List <Integer > arrayData = new ArrayList <Integer >();
36+ private Signedness signedness ;
37+ private boolean zerofill ;
3238
3339 public ColDataType () {
3440 // empty constructor
@@ -94,6 +100,22 @@ public void setArrayData(List<Integer> arrayData) {
94100 this .arrayData = arrayData ;
95101 }
96102
103+ public Signedness getSignedness () {
104+ return signedness ;
105+ }
106+
107+ public void setSignedness (Signedness signedness ) {
108+ this .signedness = signedness ;
109+ }
110+
111+ public boolean isZerofill () {
112+ return zerofill ;
113+ }
114+
115+ public void setZerofill (boolean zerofill ) {
116+ this .zerofill = zerofill ;
117+ }
118+
97119 @ Override
98120 public String toString () {
99121 StringBuilder arraySpec = new StringBuilder ();
@@ -109,6 +131,8 @@ public String toString() {
109131 + (argumentsStringList != null
110132 ? " " + PlainSelect .getStringList (argumentsStringList , true , true )
111133 : "" )
134+ + (signedness != null ? " " + signedness : "" )
135+ + (zerofill ? " ZEROFILL" : "" )
112136 + arraySpec .toString ()
113137 + (characterSet != null ? " CHARACTER SET " + characterSet : "" );
114138 }
@@ -138,6 +162,16 @@ public ColDataType withArrayData(List<Integer> arrayData) {
138162 return this ;
139163 }
140164
165+ public ColDataType withSignedness (Signedness signedness ) {
166+ setSignedness (signedness );
167+ return this ;
168+ }
169+
170+ public ColDataType withZerofill (boolean zerofill ) {
171+ setZerofill (zerofill );
172+ return this ;
173+ }
174+
141175 public ColDataType addArgumentsStringList (String ... argumentsStringList ) {
142176 List <String > collection =
143177 Optional .ofNullable (getArgumentsStringList ()).orElseGet (ArrayList ::new );
@@ -178,7 +212,9 @@ public final boolean equals(Object o) {
178212 && Objects .equals (argumentsStringList , that .argumentsStringList )
179213 && Objects .equals (characterSet , that .characterSet )
180214 && Objects .equals (intervalQualifier , that .intervalQualifier )
181- && Objects .equals (arrayData , that .arrayData );
215+ && Objects .equals (arrayData , that .arrayData )
216+ && signedness == that .signedness
217+ && zerofill == that .zerofill ;
182218 }
183219
184220 @ Override
@@ -188,6 +224,8 @@ public int hashCode() {
188224 result = 31 * result + Objects .hashCode (characterSet );
189225 result = 31 * result + Objects .hashCode (intervalQualifier );
190226 result = 31 * result + Objects .hashCode (arrayData );
227+ result = 31 * result + Objects .hashCode (signedness );
228+ result = 31 * result + Boolean .hashCode (zerofill );
191229 return result ;
192230 }
193231}
0 commit comments