diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/DefNewColumn.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/DefNewColumn.java index fa857d4..f213dbb 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/DefNewColumn.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/DefNewColumn.java @@ -15,6 +15,7 @@ public class DefNewColumn implements Serializable { private static final long serialVersionUID = 7467523779864189492L; + protected String id;// For grid and combo only; protected ColumnTypeCode columnType; protected ColumnDataType columnDataType; protected String defaultValue; @@ -28,7 +29,6 @@ public class DefNewColumn implements Serializable { } - /** * For Code, CodeDescription and Annotation Column * @@ -39,13 +39,12 @@ public class DefNewColumn implements Serializable { */ public DefNewColumn(String label, ColumnTypeCode columnType, String defaultValue) { + this.id = "1"; this.label = label; this.columnType = columnType; this.defaultValue = defaultValue; } - - /** * For Attribute and Measure Column * @@ -56,14 +55,13 @@ public class DefNewColumn implements Serializable { */ public DefNewColumn(String label, ColumnTypeCode columnType, ColumnDataType columnDataType, String defaultValue) { + this.id = "1"; this.label = label; this.columnType = columnType; this.columnDataType = columnDataType; this.defaultValue = defaultValue; } - - /** * For CodeName Column * @@ -74,13 +72,13 @@ public class DefNewColumn implements Serializable { */ public DefNewColumn(String label, ColumnTypeCode columnType, String localeName, String defaultValue) { + this.id = "1"; this.label = label; this.columnType = columnType; this.localeName = localeName; this.defaultValue = defaultValue; } - /** * For Dimension * @@ -92,13 +90,14 @@ public class DefNewColumn implements Serializable { */ public DefNewColumn(String label, ColumnTypeCode columnType, ColumnData codelistColumnReference, String defaultValue) { + this.id = "1"; this.label = label; this.columnType = columnType; - this.codelistColumnReference= codelistColumnReference; + this.codelistColumnReference = codelistColumnReference; this.defaultValue = defaultValue; - + } - + /** * For TimeDimension * @@ -110,11 +109,12 @@ public class DefNewColumn implements Serializable { */ public DefNewColumn(String label, ColumnTypeCode columnType, TimeDimensionType timeDimensionType, String defaultValue) { + this.id = "1"; this.label = label; this.columnType = columnType; - this.timeDimensionType=timeDimensionType; + this.timeDimensionType = timeDimensionType; this.defaultValue = defaultValue; - + } public String getLabel() { @@ -173,12 +173,20 @@ public class DefNewColumn implements Serializable { this.codelistColumnReference = codelistColumnReference; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + @Override public String toString() { - return "DefNewColumn [columnType=" + columnType + ", columnDataType=" - + columnDataType + ", defaultValue=" + defaultValue - + ", label=" + label + ", localeName=" + localeName - + ", timeDimensionType=" + timeDimensionType + return "DefNewColumn [id=" + id + ", columnType=" + columnType + + ", columnDataType=" + columnDataType + ", defaultValue=" + + defaultValue + ", label=" + label + ", localeName=" + + localeName + ", timeDimensionType=" + timeDimensionType + ", codelistColumnReference=" + codelistColumnReference + "]"; }