From 5859ccadb3c92ac16e348c448b936e5aa42a920e Mon Sep 17 00:00:00 2001 From: Giancarlo Panichi Date: Fri, 24 Oct 2014 15:53:03 +0000 Subject: [PATCH] Updated Flows git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widget-common-event@100982 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../td/widgetcommonevent/shared/TRId.java | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/TRId.java b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/TRId.java index 1b5b300..9f7b29d 100644 --- a/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/TRId.java +++ b/src/main/java/org/gcube/portlets/user/td/widgetcommonevent/shared/TRId.java @@ -19,12 +19,11 @@ public class TRId implements Serializable { * Tabular resource id */ private String id; - + /** * TabResourceType: Standard, Flow.... */ private TabResourceType tabResourceType; - /** * Tabular resource type: Generic, Codelist, Dataset... @@ -46,19 +45,27 @@ public class TRId implements Serializable { * reference to associated table */ private String referenceTargetTableId; - + /** * True if tableId identifies a View */ private boolean viewTable; + + public static TRId newInstance(TRId trId) { + return new TRId(trId.getId(), trId.getTabResourceType(), + trId.getTableTypeName(), trId.getTableId(), + trId.getTableType(), trId.getReferenceTargetTableId(), + trId.isViewTable()); + } + public TRId() { } public TRId(String id) { this.id = id; - tabResourceType=null; + tabResourceType = null; tableTypeName = null; tableId = null; tableType = null; @@ -69,7 +76,7 @@ public class TRId implements Serializable { public TRId(String id, TabResourceType tabResourceType, String tableId) { this.id = id; - this.tabResourceType=tabResourceType; + this.tabResourceType = tabResourceType; tableTypeName = null; this.tableId = tableId; tableType = null; @@ -78,8 +85,8 @@ public class TRId implements Serializable { } - public TRId(String id, TabResourceType tabResourceType, String tableTypeName, - String tableId, String tableType) { + public TRId(String id, TabResourceType tabResourceType, + String tableTypeName, String tableId, String tableType) { this.id = id; this.tableTypeName = tableTypeName; this.tableId = tableId; @@ -88,8 +95,9 @@ public class TRId implements Serializable { viewTable = false; } - public TRId(String id, TabResourceType tabResourceType, String tableTypeName, - String tableId, String tableType, String referenceTargetTableId, boolean viewTable) { + public TRId(String id, TabResourceType tabResourceType, + String tableTypeName, String tableId, String tableType, + String referenceTargetTableId, boolean viewTable) { this.id = id; this.tableTypeName = tableTypeName; this.tableId = tableId; @@ -105,8 +113,7 @@ public class TRId implements Serializable { public void setId(String id) { this.id = id; } - - + public TabResourceType getTabResourceType() { return tabResourceType; } @@ -175,7 +182,4 @@ public class TRId implements Serializable { + referenceTargetTableId + ", viewTable=" + viewTable + "]"; } - - - }