Updated ColumnReferences

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@98330 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2014-07-02 17:45:32 +00:00
parent e83bfd0b52
commit fdb29a8aa6
3 changed files with 21 additions and 4 deletions

View File

@ -107,7 +107,12 @@ public class OpExecution4ChangeColumnType extends OpExecutionBuilder {
ColumnLocalId cId = new ColumnLocalId(col.getColumnId());
TRId trId = col.getTrId();
logger.debug("trID: " + trId);
long tabId = new Long(trId.getTableId());
long tabId;
if(trId.isViewTable()){
tabId = new Long(trId.getReferenceTargetTableId());
} else {
tabId = new Long(trId.getTableId());
}
TableId tId = new TableId(tabId);
ColumnReference columnReference = new ColumnReference(tId, cId);
map.put(Constants.PARAMETER_REFERENCE_COLUMN, columnReference);

View File

@ -54,7 +54,14 @@ public class OpExecution4CodelistMapping extends OpExecutionBuilder {
map.put(Constants.PARAMETER_URL, importUrl);
ColumnData columnData=codelistMappingSession.getConnectedColumn();
TableId tableId=new TableId(new Long(columnData.getTrId().getTableId()));
long tabId;
if(columnData.getTrId().isViewTable()){
tabId = new Long(columnData.getTrId().getReferenceTargetTableId());
} else {
tabId = new Long(columnData.getTrId().getTableId());
}
TableId tableId=new TableId(new Long(tabId));
ColumnLocalId columnId=new ColumnLocalId(columnData.getColumnId());
ColumnReference colRef=new ColumnReference(tableId, columnId);

View File

@ -220,8 +220,13 @@ public class ExpressionGenerator {
String validationColumnColumnId = occurrencesSession
.getValidationColumnColumnId();
ColumnData column = occurrencesSession.getColumnData();
TableId tableId = new TableId(Long.valueOf(column.getTrId()
.getTableId()));
String tdId;
if(column.getTrId().isViewTable()){
tdId=column.getTrId().getReferenceTargetTableId();
} else {
tdId=column.getTrId().getTableId();
}
TableId tableId = new TableId(Long.valueOf(tdId));
if (validationColumnColumnId == null
|| validationColumnColumnId.isEmpty()) {