@Override public Object getObject( String columnLabel, Map<String,Class<?>> map ) throws SQLException { throwIfClosed(); return super.getObject( columnLabel, map ); }
@Override public Object getObject( String columnLabel ) throws SQLException { throwIfClosed(); return super.getObject( columnLabel ); }
@Override public <T> T getObject( int columnIndex, Class<T> type ) throws SQLException { throwIfClosed(); return super.getObject( columnIndex, type ); }
@Override public Object getObject( int columnIndex, Map<String, Class<?>> map ) throws SQLException { throwIfClosed(); return super.getObject( columnIndex, map ); }
@Override public <T> T getObject( String columnLabel, Class<T> type ) throws SQLException { throwIfClosed(); return super.getObject( columnLabel, type ); }
/** Returns whether a a statement is capable of updates and if so, * and the statement's {@code updateCount} is still -1, proceeds to * get updateCount value from statement's resultSet. * * <p>Handles "ROWCOUNT" object as Number or List * * @param statement Statement * @throws SQLException on error */ private void isUpdateCapable(final AvaticaStatement statement) throws SQLException { Meta.Signature signature = statement.getSignature(); if (signature == null || signature.statementType == null) { return; } if (signature.statementType.canUpdate() && statement.updateCount == -1) { statement.openResultSet.next(); Object obj = statement.openResultSet.getObject(ROWCOUNT_COLUMN_NAME); if (obj instanceof Number) { statement.updateCount = ((Number) obj).intValue(); } else if (obj instanceof List) { statement.updateCount = ((Number) ((List<Object>) obj).get(0)).intValue(); } else { throw helper.createException("Not a valid return result."); } statement.openResultSet = null; } }
/** Returns whether a a statement is capable of updates and if so, * and the statement's {@code updateCount} is still -1, proceeds to * get updateCount value from statement's resultSet. * * <p>Handles "ROWCOUNT" object as Number or List * * @param statement Statement * @throws SQLException on error */ private void isUpdateCapable(final AvaticaStatement statement) throws SQLException { Meta.Signature signature = statement.getSignature(); if (signature == null || signature.statementType == null) { return; } if (signature.statementType.canUpdate() && statement.updateCount == -1) { statement.openResultSet.next(); Object obj = statement.openResultSet.getObject(ROWCOUNT_COLUMN_NAME); if (obj instanceof Number) { statement.updateCount = ((Number) obj).intValue(); } else if (obj instanceof List) { @SuppressWarnings("unchecked") final List<Number> numbers = (List<Number>) obj; statement.updateCount = numbers.get(0).intValue(); } else { throw HELPER.createException("Not a valid return result."); } statement.openResultSet = null; } }
/** Returns whether a a statement is capable of updates and if so, * and the statement's {@code updateCount} is still -1, proceeds to * get updateCount value from statement's resultSet. * * <p>Handles "ROWCOUNT" object as Number or List * * @param statement Statement * @throws SQLException on error */ private void isUpdateCapable(final AvaticaStatement statement) throws SQLException { Meta.Signature signature = statement.getSignature(); if (signature == null || signature.statementType == null) { return; } if (signature.statementType.canUpdate() && statement.updateCount == -1) { statement.openResultSet.next(); Object obj = statement.openResultSet.getObject(ROWCOUNT_COLUMN_NAME); if (obj instanceof Number) { statement.updateCount = ((Number) obj).intValue(); } else if (obj instanceof List) { @SuppressWarnings("unchecked") final List<Number> numbers = (List<Number>) obj; statement.updateCount = numbers.get(0).intValue(); } else { throw HELPER.createException("Not a valid return result."); } statement.openResultSet = null; } }