From 6bb10a74c8ae4021003807242628165be0f95b06 Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 29 Nov 2013 10:52:42 +0000 Subject: [PATCH] Minor updated git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@86351 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../gwtservice/server/TDGWTServiceImpl.java | 4 ++ .../td/gwtservice/shared/tr/ColumnData.java | 33 +++++++++---- .../td/gwtservice/shared/tr/TableData.java | 47 +++++++++++++------ 3 files changed, 60 insertions(+), 24 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java index 085917b..d546c05 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/server/TDGWTServiceImpl.java @@ -203,12 +203,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements ArrayList columns=new ArrayList(); List cols=table.getColumns(); + int i=0; for(Column c: cols){ ColumnData cData=new ColumnData(); + cData.setId(i); cData.setName(c.getName()); cData.setTypeCode(c.getColumnType().getCode()); cData.setTypeName(c.getColumnType().getName()); cData.setTrId(trId); + columns.add(cData); + i++; } return columns; diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ColumnData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ColumnData.java index e3b27ce..3064f2e 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ColumnData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/ColumnData.java @@ -2,51 +2,66 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr; import java.io.Serializable; - /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it - * + * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * */ public class ColumnData implements Serializable { private static final long serialVersionUID = 7614033455605898209L; + protected int id; // For insert in table only protected String name; protected String typeName; protected String typeCode; protected TRId trId; - + public String getName() { return name; } + public void setName(String name) { this.name = name; } + public String getTypeName() { return typeName; } + public void setTypeName(String typeName) { this.typeName = typeName; } + public String getTypeCode() { return typeCode; } + public void setTypeCode(String typeCode) { this.typeCode = typeCode; } + public TRId getTrId() { return trId; } + public void setTrId(TRId trId) { this.trId = trId; } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + @Override public String toString() { - return "ColumnData [name=" + name + ", typeName=" + typeName - + ", typeCode=" + typeCode + ", trId=" + trId + "]"; + return "ColumnData [id=" + id + ", name=" + name + ", typeName=" + + typeName + ", typeCode=" + typeCode + ", trId=" + trId + "]"; } - - + } diff --git a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TableData.java b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TableData.java index bfea053..2991f85 100644 --- a/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TableData.java +++ b/src/main/java/org/gcube/portlets/user/td/gwtservice/shared/tr/TableData.java @@ -3,70 +3,87 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr; import java.io.Serializable; import java.util.ArrayList; - /** * - * @author "Giancarlo Panichi" - * g.panichi@isti.cnr.it - * + * @author "Giancarlo Panichi" g.panichi@isti.cnr.it + * */ public class TableData implements Serializable { private static final long serialVersionUID = -6248251038277538555L; - + + protected int id; // For insert in table only protected String name; protected String typeName; protected String typeCode; protected String metaData; - + protected ArrayList listColumnData; protected TRId trId; - - + public String getName() { return name; } + public void setName(String name) { this.name = name; } + public String getTypeName() { return typeName; } + public void setTypeName(String typeName) { this.typeName = typeName; } + public String getTypeCode() { return typeCode; } + public void setTypeCode(String typeCode) { this.typeCode = typeCode; } + public ArrayList getListColumnData() { return listColumnData; } + public void setListColumnData(ArrayList listColumnData) { this.listColumnData = listColumnData; } + public TRId getTrId() { return trId; } + public void setTrId(TRId trId) { this.trId = trId; } + public String getMetaData() { return metaData; } + public void setMetaData(String metaData) { this.metaData = metaData; } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + @Override public String toString() { - return "TableData [name=" + name + ", typeName=" + typeName - + ", typeCode=" + typeCode + ", metaData=" + metaData - + ", listColumnData=" + listColumnData + ", trId=" + trId + "]"; + return "TableData [id=" + id + ", name=" + name + ", typeName=" + + typeName + ", typeCode=" + typeCode + ", metaData=" + + metaData + ", listColumnData=" + listColumnData + ", trId=" + + trId + "]"; } - - - - + }