1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
|
/*-------------------------------------------------------------------------
*
* Copyright (c) 2004-2008, PostgreSQL Global Development Group
*
* IDENTIFICATION
* $PostgreSQL: pgjdbc/org/postgresql/jdbc3/AbstractJdbc3ResultSet.java,v 1.16 2008/01/08 06:56:29 jurka Exp $
*
*-------------------------------------------------------------------------
*/
package org.postgresql.jdbc3;
import java.sql.*;
import java.util.Vector;
import org.postgresql.core.*;
/**
* This class defines methods of the jdbc3 specification. This class extends
* org.postgresql.jdbc2.AbstractJdbc2ResultSet which provides the jdbc2
* methods. The real Statement class (for jdbc3) is org.postgresql.jdbc3.Jdbc3ResultSet
*/
public abstract class AbstractJdbc3ResultSet extends org.postgresql.jdbc2.AbstractJdbc2ResultSet
{
public AbstractJdbc3ResultSet(Query originalQuery, BaseStatement statement, Field[] fields, Vector tuples,
ResultCursor cursor, int maxRows, int maxFieldSize, int rsType, int rsConcurrency, int rsHoldability) throws SQLException
{
super (originalQuery, statement, fields, tuples, cursor, maxRows, maxFieldSize, rsType, rsConcurrency);
}
// Overrides JDBC2 version to support Types.BOOLEAN.
protected Object internalGetObject(int columnIndex, Field field) throws SQLException
{
switch (getSQLType(columnIndex)) {
case Types.BOOLEAN:
return new Boolean(getBoolean(columnIndex));
default:
return super.internalGetObject(columnIndex, field);
}
}
/**
* Retrieves the value of the designated column in the current row
* of this <code>ResultSet</code> object as a <code>java.net.URL</code>
* object in the Java programming language.
*
* @param columnIndex the index of the column 1 is the first, 2 is the second,...
* @return the column value as a <code>java.net.URL</code> object;
* if the value is SQL <code>NULL</code>,
* the value returned is <code>null</code> in the Java programming language
* @exception SQLException if a database access error occurs,
* or if a URL is malformed
* @since 1.4
*/
public java.net.URL getURL(int columnIndex) throws SQLException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "getURL(int)");
}
/**
* Retrieves the value of the designated column in the current row
* of this <code>ResultSet</code> object as a <code>java.net.URL</code>
* object in the Java programming language.
*
* @param columnName the SQL name of the column
* @return the column value as a <code>java.net.URL</code> object;
* if the value is SQL <code>NULL</code>,
* the value returned is <code>null</code> in the Java programming language
* @exception SQLException if a database access error occurs
* or if a URL is malformed
* @since 1.4
*/
public java.net.URL getURL(String columnName) throws SQLException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "getURL(String)");
}
/**
* Updates the designated column with a <code>java.sql.Ref</code> value.
* The updater methods are used to update column values in the
* current row or the insert row. The updater methods do not
* update the underlying database; instead the <code>updateRow</code> or
* <code>insertRow</code> methods are called to update the database.
*
* @param columnIndex the first column is 1, the second is 2, ...
* @param x the new column value
* @exception SQLException if a database access error occurs
* @since 1.4
*/
public void updateRef(int columnIndex, java.sql.Ref x) throws SQLException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateRef(int,Ref)");
}
/**
* Updates the designated column with a <code>java.sql.Ref</code> value.
* The updater methods are used to update column values in the
* current row or the insert row. The updater methods do not
* update the underlying database; instead the <code>updateRow</code> or
* <code>insertRow</code> methods are called to update the database.
*
* @param columnName the name of the column
* @param x the new column value
* @exception SQLException if a database access error occurs
* @since 1.4
*/
public void updateRef(String columnName, java.sql.Ref x) throws SQLException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateRef(String,Ref)");
}
/**
* Updates the designated column with a <code>java.sql.Blob</code> value.
* The updater methods are used to update column values in the
* current row or the insert row. The updater methods do not
* update the underlying database; instead the <code>updateRow</code> or
* <code>insertRow</code> methods are called to update the database.
*
* @param columnIndex the first column is 1, the second is 2, ...
* @param x the new column value
* @exception SQLException if a database access error occurs
* @since 1.4
*/
public void updateBlob(int columnIndex, java.sql.Blob x) throws SQLException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateBlob(int,Blob)");
}
/**
* Updates the designated column with a <code>java.sql.Blob</code> value.
* The updater methods are used to update column values in the
* current row or the insert row. The updater methods do not
* update the underlying database; instead the <code>updateRow</code> or
* <code>insertRow</code> methods are called to update the database.
*
* @param columnName the name of the column
* @param x the new column value
* @exception SQLException if a database access error occurs
* @since 1.4
*/
public void updateBlob(String columnName, java.sql.Blob x) throws SQLException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateBlob(String,Blob)");
}
/**
* Updates the designated column with a <code>java.sql.Clob</code> value.
* The updater methods are used to update column values in the
* current row or the insert row. The updater methods do not
* update the underlying database; instead the <code>updateRow</code> or
* <code>insertRow</code> methods are called to update the database.
*
* @param columnIndex the first column is 1, the second is 2, ...
* @param x the new column value
* @exception SQLException if a database access error occurs
* @since 1.4
*/
public void updateClob(int columnIndex, java.sql.Clob x) throws SQLException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateClob(int,Clob)");
}
/**
* Updates the designated column with a <code>java.sql.Clob</code> value.
* The updater methods are used to update column values in the
* current row or the insert row. The updater methods do not
* update the underlying database; instead the <code>updateRow</code> or
* <code>insertRow</code> methods are called to update the database.
*
* @param columnName the name of the column
* @param x the new column value
* @exception SQLException if a database access error occurs
* @since 1.4
*/
public void updateClob(String columnName, java.sql.Clob x) throws SQLException
{
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateClob(String,Clob)");
}
/**
* Updates the designated column with a <code>java.sql.Array</code> value.
* The updater methods are used to update column values in the
* current row or the insert row. The updater methods do not
* update the underlying database; instead the <code>updateRow</code> or
* <code>insertRow</code> methods are called to update the database.
*
* @param columnIndex the first column is 1, the second is 2, ...
* @param x the new column value
* @exception SQLException if a database access error occurs
* @since 1.4
*/
public void updateArray(int columnIndex, java.sql.Array x) throws SQLException
{
updateObject(columnIndex, x);
}
/**
* Updates the designated column with a <code>java.sql.Array</code> value.
* The updater methods are used to update column values in the
* current row or the insert row. The updater methods do not
* update the underlying database; instead the <code>updateRow</code> or
* <code>insertRow</code> methods are called to update the database.
*
* @param columnName the name of the column
* @param x the new column value
* @exception SQLException if a database access error occurs
* @since 1.4
*/
public void updateArray(String columnName, java.sql.Array x) throws SQLException
{
updateArray(findColumn(columnName), x);
}
}
|