Add some unit testing of the CfbSchema.
[cfb.git] / prod / net / jaekl / cfb / db / Row.java
index c5d5478954ce08468daf90074b035624eda52ead..fa3de9948ebb721a18da45230caaadd0131fc02b 100644 (file)
@@ -12,6 +12,7 @@ public class Row {
        }
        
        public int getNumColumns() { return m_columns.length; }
+       public Column getColumn(int idx) { return m_columns[idx]; }
        
        public String getString(int index) throws TypeMismatchException {
                checkType(index, Column.Type.VARCHAR);
@@ -32,6 +33,14 @@ public class Row {
                return num.longValue();
        }
        
+       public java.util.Date getDate(int index) throws TypeMismatchException
+       {
+               checkType(index, Column.Type.INTEGER);
+               long milliseconds = (Long)m_values[index];
+               java.util.Date date = new java.util.Date(milliseconds);
+               return date;
+       }
+       
        protected void checkType(int index, Column.Type type) throws TypeMismatchException {
                Column column = m_columns[index];
                if (column.getType().equals(type)) {