public int getNumColumns() { return m_columns.length; }
public Column getColumn(int idx) { return m_columns[idx]; }
+ public Object getValue(int index) {
+ return m_values[index];
+ }
+
public String getString(int index) throws TypeMismatchException {
checkType(index, Column.Type.VARCHAR);
return (String)m_values[index];
return (java.util.Date)m_values[index];
}
+ @Override
+ public String toString()
+ {
+ StringBuilder sb = new StringBuilder("[");
+ for (int idx = 0; idx < m_columns.length; ++idx) {
+ if (idx > 0) {
+ sb.append(", ");
+ }
+ sb.append("" + m_columns[idx].getName() + "=" + m_values[idx]);
+ }
+ sb.append("]");
+ return sb.toString();
+ }
+
protected void checkType(int index, Column.Type type) throws TypeMismatchException {
Column column = m_columns[index];
Column.Type columnType = column.getType();