Code example for ResultSetMetaData

Methods: getColumnCount

0
    public void addConflictRow(CachedRow row, int rowIndex, int status) {
        conflictRows.add(new ConflictedRow(row, rowIndex, status));
    } 
 
    public Object getConflictValue(int index) throws SQLException {
        if (index <= 0 || index > metadata.getColumnCount()) {
            // sql.27=Invalid column index :{0} 
            throw new SQLException(Messages.getString("sql.27", Integer //$NON-NLS-1$
                    .valueOf(index)));
        } 
 
        if (currentIndex < 0 || currentIndex >= conflictRows.size()) {
            // rowset.7=Not a valid cursor 
            throw new SQLException(Messages.getString("rowset.7")); //$NON-NLS-1$
        } 
 
        return conflictRows.get(currentIndex).row.getObject(index);
    } 
 
    public Object getConflictValue(String columnName) throws SQLException {
        return getConflictValue(getIndexByName(columnName));