else
this.warnings = warnings;
}
+ protected void checkResultSet( int column ) throws SQLException
+ {
+ if ( this_row == null ) throw new PSQLException("postgresql.res.nextrequired");
+ if ( column < 1 || column > fields.length ) throw new PSQLException("postgresql.res.colrange" );
+ }
}
postgresql.res.badtimestamp:Bad Timestamp Format at {0} in {1}
postgresql.res.colname:The column name {0} not found.
postgresql.res.colrange:The column index is out of range.
+postgresql.res.nextrequired:Result set not positioned properly, perhaps you need to call next().
postgresql.serial.interface:You cannot serialize an interface.
postgresql.serial.namelength:Class & Package name length cannot be longer than 32 characters. {0} is {1} characters.
postgresql.serial.noclass:No class found for {0}.
*/
public String getString(int columnIndex) throws SQLException
{
- if (columnIndex < 1 || columnIndex > fields.length)
- throw new PSQLException("postgresql.res.colrange");
-
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
return null;
*/
public byte[] getBytes(int columnIndex) throws SQLException
{
- if (columnIndex < 1 || columnIndex > fields.length)
- throw new PSQLException("postgresql.res.colrange");
-
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (!wasNullFlag)
{
*/
public InputStream getAsciiStream(int columnIndex) throws SQLException
{
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
return null;
*/
public InputStream getUnicodeStream(int columnIndex) throws SQLException
{
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
return null;
*/
public InputStream getBinaryStream(int columnIndex) throws SQLException
{
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
return null;
*/
public String getString(int columnIndex) throws SQLException
{
- if (columnIndex < 1 || columnIndex > fields.length)
- throw new PSQLException("postgresql.res.colrange");
-
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
return null;
*/
public byte[] getBytes(int columnIndex) throws SQLException
{
- if (columnIndex < 1 || columnIndex > fields.length)
- throw new PSQLException("postgresql.res.colrange");
-
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (!wasNullFlag)
{
*/
public InputStream getAsciiStream(int columnIndex) throws SQLException
{
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
return null;
*/
public InputStream getUnicodeStream(int columnIndex) throws SQLException
{
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
return null;
*/
public InputStream getBinaryStream(int columnIndex) throws SQLException
{
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
return null;
{
Field field;
- if (columnIndex < 1 || columnIndex > fields.length)
- throw new PSQLException("postgresql.res.colrange");
+ checkResultSet( columnIndex );
wasNullFlag = (this_row[columnIndex - 1] == null);
if (wasNullFlag)
public java.io.Reader getCharacterStream(int i) throws SQLException
{
+ checkResultSet( i );
wasNullFlag = (this_row[i - 1] == null);
if (wasNullFlag)
return null;