You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2010/03/28 20:40:32 UTC

svn commit: r928472 - /cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/TableHelper.java

Author: aadamchik
Date: Sun Mar 28 18:40:32 2010
New Revision: 928472

URL: http://svn.apache.org/viewvc?rev=928472&view=rev
Log:
exapnding TableHelper with wrappers for DbHelper methods pertainaing to the current table

Modified:
    cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/TableHelper.java

Modified: cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/TableHelper.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/TableHelper.java?rev=928472&r1=928471&r2=928472&view=diff
==============================================================================
--- cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/TableHelper.java (original)
+++ cayenne/main/trunk/build-tools/cayenne-test-utilities/src/main/java/org/apache/cayenne/test/TableHelper.java Sun Mar 28 18:40:32 2010
@@ -19,6 +19,8 @@
 package org.apache.cayenne.test;
 
 import java.sql.SQLException;
+import java.sql.Time;
+import java.sql.Timestamp;
 
 /**
  * JDBC utilities class for setting up and analyzing the DB data sets for a single table.
@@ -64,4 +66,52 @@ public class TableHelper {
         return this;
     }
 
+    public int getRowCount() throws SQLException {
+        return dbHelper.getRowCount(tableName);
+    }
+
+    public Object getObject(String table, String column) throws SQLException {
+        return dbHelper.getObject(tableName, column);
+    }
+
+    public byte getByte(String table, String column) throws SQLException {
+        return dbHelper.getByte(tableName, column);
+    }
+
+    public byte[] getBytes(String table, String column) throws SQLException {
+        return dbHelper.getBytes(tableName, column);
+    }
+
+    public int getInt(String table, String column) throws SQLException {
+        return dbHelper.getInt(tableName, column);
+    }
+
+    public long getLong(String table, String column) throws SQLException {
+        return dbHelper.getLong(tableName, column);
+    }
+
+    public double getDouble(String table, String column) throws SQLException {
+        return dbHelper.getDouble(tableName, column);
+    }
+
+    public boolean getBoolean(String table, String column) throws SQLException {
+        return dbHelper.getBoolean(tableName, column);
+    }
+
+    public java.util.Date getUtilDate(String table, String column) throws SQLException {
+        return dbHelper.getUtilDate(tableName, column);
+    }
+
+    public java.sql.Date getSqlDate(String table, String column) throws SQLException {
+        return dbHelper.getSqlDate(tableName, column);
+    }
+
+    public Time getTime(String table, String column) throws SQLException {
+        return dbHelper.getTime(tableName, column);
+    }
+
+    public Timestamp getTimestamp(String table, String column) throws SQLException {
+        return dbHelper.getTimestamp(tableName, column);
+    }
+
 }