Author: mes
Date: 2011-09-24 09:32:02 -0700 (Sat, 24 Sep 2011)
New Revision: 26961

Modified:
   
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CyRowProjection.java
   
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CyTableProjection.java
Log:
updates for CyTable change

Modified: 
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CyRowProjection.java
===================================================================
--- 
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CyRowProjection.java
       2011-09-24 00:43:23 UTC (rev 26960)
+++ 
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CyRowProjection.java
       2011-09-24 16:32:02 UTC (rev 26961)
@@ -58,6 +58,20 @@
                return underlyingRow.get(columnName, type);
        }
 
+       /**
+        * Returns the value found for this row in the specified column
+        * with the specified type.
+        * @param columnName The name identifying the attribute.
+        * @param type The type of the column.
+        * @param defValue A default value to be returned if the row has not 
been set. 
+        * @return the value found for this row in the specified column
+        * Please not that this method cannot be used to retrieve values that 
are Lists!
+        */
+       public <T> T get(final String columnName, final Class<?extends T> type, 
T defValue) {
+               checkColumnName(columnName);
+               return underlyingRow.get(columnName, type,defValue);
+       }
+
        private void checkColumnName(final String columnName) {
                if (!tableProjection.getColumnNames().contains(columnName))
                        throw new IllegalArgumentException("\"" + columnName
@@ -79,6 +93,20 @@
        }
 
        /**
+        * Returns the value found for this row in the specified column
+        * with the specified type.
+        * @param columnName The name identifying the attribute.
+        * @param listElementType  The type of the elements of the list that we 
wish to retrieve.
+        * @param defValue A default value to be returned if the row has not 
been set. 
+        * @return the value found for this row in the specified column
+        * Please not that this method can only be used to retrieve values that 
are Lists!
+        */
+       public <T> List<T> getList(final String columnName, final Class<T> 
listElementType, final List<T> defValue) {
+               checkColumnName(columnName);
+               return underlyingRow.getList(columnName, 
listElementType,defValue);
+       }
+
+       /**
         * Set the specified column for this row to the specified value.
         * To unset a column entry use null for value.
         * @param columnName The name identifying the attribute.
@@ -138,4 +166,4 @@
        public CyTable getTable() {
                return  tableProjection;
        }
-}
\ No newline at end of file
+}

Modified: 
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CyTableProjection.java
===================================================================
--- 
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CyTableProjection.java
     2011-09-24 00:43:23 UTC (rev 26960)
+++ 
core3/impl/trunk/table-browser-impl/src/main/java/org/cytoscape/browser/internal/CyTableProjection.java
     2011-09-24 16:32:02 UTC (rev 26961)
@@ -188,6 +188,21 @@
        }
 
        /**
+        * Create a column of the specified name and the specified type. The 
column
+        * type is limited to Integer, Long, Double, String, and Boolean.
+        * @param columnName The name identifying the attribute.
+        * @param type The type of the column.
+        * @param isImmutable  if true, this column can never be deleted
+        * @param defValue Default value for column 
+        */
+       @Override
+       public <T> void createColumn(String columnName, Class<?extends T> type,
+                                    boolean isImmutable, T defValue)
+       {
+               throw new UnsupportedOperationException("createColumn() method 
not supported!");
+       }
+
+       /**
         * Create a column of Lists with the specified name and the specified 
element type.
         * The column type is limited to Integer, Long, Double, String, and 
Boolean.
         * @param columnName The name identifying the attribute.
@@ -202,6 +217,21 @@
        }
 
        /**
+        * Create a column of Lists with the specified name and the specified 
element type.
+        * The column type is limited to Integer, Long, Double, String, and 
Boolean.
+        * @param columnName The name identifying the attribute.
+        * @param listElementType The type of the elements of the list.
+        * @param isImmutable  if true, this column can never be deleted
+        * @param defValue Default value for column 
+        */
+       @Override
+       public <T> void createListColumn(String columnName, Class<T> 
listElementType,
+                                        boolean isImmutable, List<T> defValue)
+       {
+               throw new UnsupportedOperationException("createListColumn() 
method not supported!");
+       }
+
+       /**
         * Returns the row specified by the primary key object and if a row
         * for the specified key does not yet exist in the table, a new row
         * will be created and the new row will be returned.

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to