|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.access.DefaultResultIterator
public class DefaultResultIterator
Default implementation of ResultIterator interface. Serves as a
factory that creates data rows from java.sql.ResultSet
.
For more information see Cayenne User Guide.
Field Summary | |
---|---|
protected boolean |
closingConnection
Deprecated. |
protected java.sql.Connection |
connection
Deprecated. |
protected ResultDescriptor |
descriptor
Deprecated. |
protected int |
fetchedSoFar
Deprecated. |
protected int |
fetchLimit
Deprecated. |
protected boolean |
isClosed
Deprecated. |
protected int |
mapCapacity
Deprecated. |
protected boolean |
nextRow
Deprecated. |
protected java.sql.ResultSet |
resultSet
Deprecated. |
protected java.sql.Statement |
statement
Deprecated. |
Constructor Summary | |
---|---|
DefaultResultIterator(java.sql.Connection connection,
java.sql.Statement statement,
java.sql.ResultSet resultSet,
ResultDescriptor descriptor,
int fetchLimit)
Deprecated. |
Method Summary | |
---|---|
protected void |
checkNextRow()
Deprecated. Moves internal ResultSet cursor position down one row. |
void |
close()
Deprecated. Closes ResultIterator and associated ResultSet. |
java.util.List |
dataRows(boolean close)
Deprecated. Returns all unread data rows from ResultSet, closing this iterator if needed. |
int |
getDataRowWidth()
Deprecated. Returns the number of columns in the result row. |
boolean |
hasNextRow()
Deprecated. Returns true if there is at least one more record that can be read from the iterator. |
boolean |
isClosingConnection()
Deprecated. Returns true if this iterator is responsible
for closing its connection, otherwise a user of the iterator
must close the connection after closing the iterator. |
java.util.Map |
nextDataRow()
Deprecated. Returns the next result row as a Map. |
java.util.Map |
nextObjectId(DbEntity entity)
Deprecated. Returns a map of ObjectId values from the next result row. |
protected java.util.Map |
readDataRow()
Deprecated. Reads a row from the internal ResultSet at the current cursor position. |
protected java.util.Map |
readIdRow(DbEntity entity)
Deprecated. Reads a row from the internal ResultSet at the current cursor position, processing only columns that are part of the ObjectId of a target class. |
static java.util.Map |
readProcedureOutParameters(java.sql.CallableStatement statement,
ResultDescriptor resultDescriptor)
Deprecated. Utility method to read stored procedure out parameters as a map. |
void |
setClosingConnection(boolean flag)
Deprecated. Sets the closingConnection property. |
void |
skipDataRow()
Deprecated. Skips current data row instead of reading it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.sql.Connection connection
protected java.sql.Statement statement
protected java.sql.ResultSet resultSet
protected ResultDescriptor descriptor
protected int mapCapacity
protected boolean closingConnection
protected boolean isClosed
protected boolean nextRow
protected int fetchedSoFar
protected int fetchLimit
Constructor Detail |
---|
public DefaultResultIterator(java.sql.Connection connection, java.sql.Statement statement, java.sql.ResultSet resultSet, ResultDescriptor descriptor, int fetchLimit) throws java.sql.SQLException, CayenneException
java.sql.SQLException
CayenneException
Method Detail |
---|
public static java.util.Map readProcedureOutParameters(java.sql.CallableStatement statement, ResultDescriptor resultDescriptor) throws java.sql.SQLException, java.lang.Exception
java.sql.SQLException
java.lang.Exception
protected void checkNextRow() throws java.sql.SQLException, CayenneException
java.sql.SQLException
CayenneException
public boolean hasNextRow()
hasNextRow
in interface ResultIterator
public java.util.Map nextDataRow() throws CayenneException
nextDataRow
in interface ResultIterator
CayenneException
public int getDataRowWidth()
getDataRowWidth
in interface ResultIterator
public java.util.List dataRows(boolean close) throws CayenneException
dataRows
in interface ResultIterator
CayenneException
protected java.util.Map readDataRow() throws java.sql.SQLException, CayenneException
java.sql.SQLException
CayenneException
protected java.util.Map readIdRow(DbEntity entity) throws java.sql.SQLException, CayenneException
java.sql.SQLException
CayenneException
public void close() throws CayenneException
close
in interface ResultIterator
CayenneException
public boolean isClosingConnection()
true
if this iterator is responsible
for closing its connection, otherwise a user of the iterator
must close the connection after closing the iterator.
public void setClosingConnection(boolean flag)
closingConnection
property.
public void skipDataRow() throws CayenneException
ResultIterator
skipDataRow
in interface ResultIterator
CayenneException
ResultIterator.skipDataRow()
public java.util.Map nextObjectId(DbEntity entity) throws CayenneException
nextObjectId
in interface ResultIterator
CayenneException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |