|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunity.query.ResultRowData
public class ResultRowData
Constructor Summary | |
---|---|
ResultRowData(GlobalQuery gq,
int rsType)
The constructor initializes most of the instance variables with defaults |
Method Summary | |
---|---|
boolean |
absolute(int row)
Moves the cursor to the given row number in the ResultSet
object. |
void |
afterLast()
Moves the cursor to the end of this ResultSet object, just
after the last row. |
boolean |
appendTuple(Tuple row)
This method is currently not supported in the UnityJDBC driver. |
void |
beforeFirst()
Moves the cursor to the front of this ResultSet object,
just before the first row. |
void |
close()
Releases resources immediately instead of waiting for this to happen when it is automatically closed. |
void |
deleteRow()
This method is currently not supported in the UnityJDBC driver. |
boolean |
first()
Moves the cursor to the first row |
int |
getFetchSize()
|
GlobalQuery |
getGlobalQuery()
|
java.lang.Object |
getObject(int columnIndex)
Gets the value of the designated column in the current row as an Object in the Java programming language. |
int |
getRow()
|
void |
insertRow()
Inserts the contents of the insert row into this ResultSet
object and into the database. |
boolean |
isAfterLast()
Retrieves whether the cursor is after the last row. |
boolean |
isBeforeFirst()
Moves the cursor to the front, just before the first row. |
boolean |
isFirst()
Retrieves whether the cursor is on the first row. |
boolean |
isLast()
Retrieves whether the cursor is on the last row. |
boolean |
last()
Moves the cursor to the last row. |
void |
moveToInsertRow()
Moves the cursor to the insert row. |
boolean |
next()
Moves the cursor down one row from its current position. |
boolean |
previous()
Moves the cursor to the previous row. |
boolean |
relative(int index)
|
void |
setFetchSize(int _fetchsize)
|
void |
updateArray(int columnIndex,
java.sql.Array x)
Updates the designated column with a java.sql.Array value. |
void |
updateAsciiStream(int columnIndex,
java.io.InputStream x,
int length)
This method is currently not supported. |
void |
updateBigDecimal(int columnIndex,
java.math.BigDecimal x)
Updates the designated column with a java.math.BigDecimal
value. |
void |
updateBinaryStream(int columnIndex,
java.io.InputStream x,
int length)
Updates the designated column with a binary stream value. |
void |
updateBlob(int columnIndex,
java.sql.Blob x)
Updates the designated column with a java.sql.Blob value. |
void |
updateBoolean(int columnIndex,
boolean x)
Updates the designated column with a boolean value. |
void |
updateByte(int columnIndex,
byte x)
Updates the designated column with a Byte value. |
void |
updateBytes(int columnIndex,
byte[] x)
Updates the designated column with a Byte array value. |
void |
updateCharacterStream(int columnIndex,
java.io.Reader x,
int length)
This method is currently not supported. |
void |
updateClob(int columnIndex,
java.sql.Clob x)
Updates the designated column with a java.sql.Clob value. |
void |
updateDate(int columnIndex,
java.sql.Date x)
Updates the designated column with a java.sql.Date value. |
void |
updatedouble(int columnIndex,
double x)
Updates the designated column with a double value. |
void |
updateFloat(int columnIndex,
float x)
Updates the designated column with a float value. |
void |
updateInt(int columnIndex,
int x)
Updates the designated column with an int value. |
void |
updateLong(int columnIndex,
long x)
Updates the designated column with a long value. |
void |
updateNull(int columnIndex)
Updates the designated column with a null value. |
void |
updateObject(int columnIndex,
java.lang.Object x)
Updates the designated column with an Object value. |
void |
updateObject(int columnIndex,
java.lang.Object x,
int scale)
This method is currently not supported. |
void |
updateRef(int columnIndex,
java.sql.Ref x)
Updates the designated column with a java.sql.Ref value. |
void |
updateRow()
Updates the underlying database with the new contents of the current row of this ResultSet object. |
void |
updateShort(int columnIndex,
short x)
Updates the designated column with a short value. |
void |
updateString(int columnIndex,
java.lang.String x)
Updates the designated column with a String value. |
void |
updateTime(int columnIndex,
java.sql.Time x)
Updates the designated column with a java.sql.Time value. |
void |
updateTimeStamp(int columnIndex,
java.sql.Timestamp x)
Updates the designated column with a Timestamp value. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResultRowData(GlobalQuery gq, int rsType) throws java.sql.SQLException
gq
- requires a GlobalQuery
objectrsType
- requires the type of ResultSet
created.
java.sql.SQLException
Method Detail |
---|
public GlobalQuery getGlobalQuery()
public int getRow()
ResultSet
Results are numbered 1...n for the user.public boolean absolute(int row) throws java.sql.SQLException
ResultSet
object.
If the row number is positive, the cursor moves to the given row number with respect to the beginning of the result set. The first row is row 1, the second is row 2, and so on.
If the given row number is negative, the cursor moves to an absolute row
position with respect to the end of the result set. For example, calling
the method absolute(-1)
positions the cursor on the last
row; calling the method absolute(-2)
moves the cursor to
the next-to-last row, and so on.
An attempt to position the cursor beyond the first/last row in the result set leaves the cursor before the first row or after the last row.
Note: Calling absolute(1)
is the same as calling
first()
. Calling absolute(-1)
is the same
as calling last()
.
row
- the number of the row to which the cursor should move. A
positive number indicates the row number counting from the
beginning of the result set; a negative number indicates the
row number counting from the end of the result set
true
if the cursor is on the result set;
false
otherwise
java.sql.SQLException
- if a database access error occurs, or the result set type
is TYPE_FORWARD_ONLY
public boolean next() throws java.sql.SQLException
Moves the cursor down one row from its current position. A
ResultSet
cursor is initially positioned before the first
row; the first call to the method next
makes the first row
the current row; the second call makes the second row the current row,
and so on.
Also handles cases when the next tuples are already cached on disk.
Note: While this method has a similar footprint to
UnityResultSet.next()
, it is this method that does
the actual progression through the ResultSet
.
true
if the new current row is valid;
false
if there are no more rows
java.sql.SQLException
- if a database access error occurspublic void afterLast()
ResultSet
object, just
after the last row. This method has no effect if the result set contains
no rows.
java.sql.SQLException
- if a database access error occurs or the result set type
is ResultSet.TYPE_FORWARD_ONLY
public void beforeFirst() throws java.sql.SQLException
ResultSet
object,
just before the first row. This method has no effect if the result set
contains no rows.
java.sql.SQLException
- if a database access error occurs or the result set type
is ResultSet.TYPE_FORWARD_ONLY
public void deleteRow() throws java.sql.SQLException
java.sql.SQLException
- because method is not supported.public boolean first() throws java.sql.SQLException
true
if the cursor is on a valid row;
false
if there are no rows in the result set
java.sql.SQLException
- if a database access error occurs or the result set type
is TYPE_FORWARD_ONLY
public boolean appendTuple(Tuple row) throws java.sql.SQLException
java.sql.SQLException
- because method is not supported.public java.lang.Object getObject(int columnIndex)
Gets the value of the designated column in the current row as an
Object
in the Java programming language.
This method will return the value of the given column as a Java object.
The type of the Java object will be the default Java object type
corresponding to the column's SQL type, following the mapping for
built-in types specified in the JDBC specification. If the value is an
SQL NULL
, the driver returns a Java null
.
This method may also be used to read datatabase-specific abstract data types.
columnIndex
- the first column is 1, the second is 2, ...
java.lang.Object
holding the column value or
null if called before next()
using a scrollable
ResultSet
java.sql.SQLException
- if a database access error occurspublic boolean isAfterLast()
true
if the cursor is after the last row;
false
if the cursor is at any other position or
the result set contains no rows
java.sql.SQLException
- if a database access error occurspublic boolean isBeforeFirst()
java.sql.SQLException
- if a database access error occurs or the result set type
is TYPE_FORWARD_ONLY
public boolean isFirst()
true
if the cursor is on the first row;
false
otherwise
java.sql.SQLException
- if a database access error occurspublic boolean isLast()
isLast
may be expensive because the JDBC driver might need
to fetch ahead one row in order to determine whether the current row is
the last row in the result set.
true
if the cursor is on the last row;
false
otherwise
java.sql.SQLException
- if a database access error occurspublic boolean last() throws java.sql.SQLException
true
if the cursor is on a valid row;
false
if there are no rows in the result set
java.sql.SQLException
- if a database access error occurs or the result set type
is ResultSet.TYPE_FORWARD_ONLY
public void close() throws java.io.IOException
Releases resources immediately instead of waiting for this to happen when it is automatically closed.
Also deletes all temporary files/folders created to cache the results.
Note: A ResultSet
object is automatically closed
by the Statement
object that generated it when that
Statement
object is closed, re-executed, or is used to
retrieve the next result from a sequence of multiple results. A
ResultSet
object is also automatically closed when it is
garbage collected.
java.sql.SQLException
- if a database access error occurs
java.io.IOException
public boolean previous() throws java.sql.SQLException
true
if the cursor is on a valid row;
false
if it is off the result set
java.sql.SQLException
- if a database access error occurs or the result set type
is ResultSet.TYPE_FORWARD_ONLY
public boolean relative(int index) throws java.sql.SQLException
java.sql.SQLException
public void setFetchSize(int _fetchsize)
public int getFetchSize()
public void updateString(int columnIndex, java.lang.String x) throws java.sql.SQLException
String
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateArray(int columnIndex, java.sql.Array x) throws java.sql.SQLException
java.sql.Array
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException
columnIndex
- x
- length
-
java.sql.SQLException
- Throws SQLException because this version of the driver does
not support this method.public void updateBigDecimal(int columnIndex, java.math.BigDecimal x) throws java.sql.SQLException
java.math.BigDecimal
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 updateRow
or
insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateBinaryStream(int columnIndex, java.io.InputStream x, int length) throws java.sql.SQLException
updateRow
or insertRow
methods are
called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column valuelength
- the length of the stream
java.sql.SQLException
- if a database access error occurspublic void updateBlob(int columnIndex, java.sql.Blob x) throws java.sql.SQLException
java.sql.Blob
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateBoolean(int columnIndex, boolean x) throws java.sql.SQLException
boolean
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateByte(int columnIndex, byte x) throws java.sql.SQLException
Byte
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateBytes(int columnIndex, byte[] x) throws java.sql.SQLException
Byte
array 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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateCharacterStream(int columnIndex, java.io.Reader x, int length) throws java.sql.SQLException
columnIndex
- x
- length
-
java.sql.SQLException
- Throws SQLException because this version of the driver does
not support this method.public void updateClob(int columnIndex, java.sql.Clob x) throws java.sql.SQLException
java.sql.Clob
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateDate(int columnIndex, java.sql.Date x) throws java.sql.SQLException
java.sql.Date
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updatedouble(int columnIndex, double x) throws java.sql.SQLException
double
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateFloat(int columnIndex, float x) throws java.sql.SQLException
float
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateInt(int columnIndex, int x) throws java.sql.SQLException
int
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateLong(int columnIndex, long x) throws java.sql.SQLException
long
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateNull(int columnIndex) throws java.sql.SQLException
null
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateObject(int columnIndex, java.lang.Object x) throws java.sql.SQLException
Object
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateObject(int columnIndex, java.lang.Object x, int scale) throws java.sql.SQLException
columnIndex
- x
- scale
-
java.sql.SQLException
- Throws SQLException because this version of the driver does
not support this method.public void updateRef(int columnIndex, java.sql.Ref x) throws java.sql.SQLException
java.sql.Ref
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateRow() throws java.sql.SQLException
ResultSet
object. This method cannot be called
when the cursor is on the insert row.
java.sql.SQLException
- if a database access error occurs or if this method is
called when the cursor is on the insert rowpublic void updateShort(int columnIndex, short x) throws java.sql.SQLException
short
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateTime(int columnIndex, java.sql.Time x) throws java.sql.SQLException
java.sql.Time
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void updateTimeStamp(int columnIndex, java.sql.Timestamp x) throws java.sql.SQLException
Timestamp
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 updateRow
or insertRow
methods are called to update the database.
columnIndex
- the first column is 1, the second is 2, ...x
- the new column value
java.sql.SQLException
- if a database access error occurspublic void moveToInsertRow()
insertRow
methods may be
called when the cursor is on the insert row. All of the columns in a
result set must be given a value each time this method is called before
calling insertRow
. An updater method must be called
before a getter method can be called on a column value.
java.sql.SQLException
- if a database access error occurs or the result set is not
updatablepublic void insertRow() throws java.sql.SQLException
ResultSet
object and into the database. The cursor must be on the insert row when
this method is called.
java.sql.SQLException
- if a database access error occurs, if this method is
called when the cursor is not on the insert row, or if not
all of non-nullable columns in the insert row have been
given a value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |