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
This commit is contained in:
Giancarlo Panichi 2013-11-29 10:52:42 +00:00
parent 161c2fedd6
commit 6bb10a74c8
3 changed files with 60 additions and 24 deletions

View File

@ -203,12 +203,16 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
ArrayList<ColumnData> columns=new ArrayList<ColumnData>(); ArrayList<ColumnData> columns=new ArrayList<ColumnData>();
List<Column> cols=table.getColumns(); List<Column> cols=table.getColumns();
int i=0;
for(Column c: cols){ for(Column c: cols){
ColumnData cData=new ColumnData(); ColumnData cData=new ColumnData();
cData.setId(i);
cData.setName(c.getName()); cData.setName(c.getName());
cData.setTypeCode(c.getColumnType().getCode()); cData.setTypeCode(c.getColumnType().getCode());
cData.setTypeName(c.getColumnType().getName()); cData.setTypeName(c.getColumnType().getName());
cData.setTrId(trId); cData.setTrId(trId);
columns.add(cData);
i++;
} }
return columns; return columns;

View File

@ -2,51 +2,66 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr;
import java.io.Serializable; import java.io.Serializable;
/** /**
* *
* @author "Giancarlo Panichi" * @author "Giancarlo Panichi" <a
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> * href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* *
*/ */
public class ColumnData implements Serializable { public class ColumnData implements Serializable {
private static final long serialVersionUID = 7614033455605898209L; private static final long serialVersionUID = 7614033455605898209L;
protected int id; // For insert in table only
protected String name; protected String name;
protected String typeName; protected String typeName;
protected String typeCode; protected String typeCode;
protected TRId trId; protected TRId trId;
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public String getTypeName() { public String getTypeName() {
return typeName; return typeName;
} }
public void setTypeName(String typeName) { public void setTypeName(String typeName) {
this.typeName = typeName; this.typeName = typeName;
} }
public String getTypeCode() { public String getTypeCode() {
return typeCode; return typeCode;
} }
public void setTypeCode(String typeCode) { public void setTypeCode(String typeCode) {
this.typeCode = typeCode; this.typeCode = typeCode;
} }
public TRId getTrId() { public TRId getTrId() {
return trId; return trId;
} }
public void setTrId(TRId trId) { public void setTrId(TRId trId) {
this.trId = trId; this.trId = trId;
} }
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Override @Override
public String toString() { public String toString() {
return "ColumnData [name=" + name + ", typeName=" + typeName return "ColumnData [id=" + id + ", name=" + name + ", typeName="
+ ", typeCode=" + typeCode + ", trId=" + trId + "]"; + typeName + ", typeCode=" + typeCode + ", trId=" + trId + "]";
} }
} }

View File

@ -3,70 +3,87 @@ package org.gcube.portlets.user.td.gwtservice.shared.tr;
import java.io.Serializable; import java.io.Serializable;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
* *
* @author "Giancarlo Panichi" * @author "Giancarlo Panichi" <a
* <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a> * href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
* *
*/ */
public class TableData implements Serializable { public class TableData implements Serializable {
private static final long serialVersionUID = -6248251038277538555L; private static final long serialVersionUID = -6248251038277538555L;
protected int id; // For insert in table only
protected String name; protected String name;
protected String typeName; protected String typeName;
protected String typeCode; protected String typeCode;
protected String metaData; protected String metaData;
protected ArrayList<ColumnData> listColumnData; protected ArrayList<ColumnData> listColumnData;
protected TRId trId; protected TRId trId;
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public String getTypeName() { public String getTypeName() {
return typeName; return typeName;
} }
public void setTypeName(String typeName) { public void setTypeName(String typeName) {
this.typeName = typeName; this.typeName = typeName;
} }
public String getTypeCode() { public String getTypeCode() {
return typeCode; return typeCode;
} }
public void setTypeCode(String typeCode) { public void setTypeCode(String typeCode) {
this.typeCode = typeCode; this.typeCode = typeCode;
} }
public ArrayList<ColumnData> getListColumnData() { public ArrayList<ColumnData> getListColumnData() {
return listColumnData; return listColumnData;
} }
public void setListColumnData(ArrayList<ColumnData> listColumnData) { public void setListColumnData(ArrayList<ColumnData> listColumnData) {
this.listColumnData = listColumnData; this.listColumnData = listColumnData;
} }
public TRId getTrId() { public TRId getTrId() {
return trId; return trId;
} }
public void setTrId(TRId trId) { public void setTrId(TRId trId) {
this.trId = trId; this.trId = trId;
} }
public String getMetaData() { public String getMetaData() {
return metaData; return metaData;
} }
public void setMetaData(String metaData) { public void setMetaData(String metaData) {
this.metaData = metaData; this.metaData = metaData;
} }
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
@Override @Override
public String toString() { public String toString() {
return "TableData [name=" + name + ", typeName=" + typeName return "TableData [id=" + id + ", name=" + name + ", typeName="
+ ", typeCode=" + typeCode + ", metaData=" + metaData + typeName + ", typeCode=" + typeCode + ", metaData="
+ ", listColumnData=" + listColumnData + ", trId=" + trId + "]"; + metaData + ", listColumnData=" + listColumnData + ", trId="
+ trId + "]";
} }
} }