|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jenkov.mrpersister.impl.ObjectReader
public class ObjectReader
The default implementation of the IObjectReader
interface.
Field Summary | |
---|---|
protected Database |
database
|
Constructor Summary | |
---|---|
ObjectReader()
|
Method Summary | |
---|---|
java.lang.Object |
createNoArgumentInstance(java.lang.Class persistentObjectClass)
|
java.lang.Object |
createResultSetArgumentInstance(java.lang.Class persistentObjectClass,
java.sql.ResultSet result,
java.lang.reflect.Constructor constructor)
|
protected java.lang.Object |
newInstance(java.lang.Class persistentObjectClass,
java.sql.ResultSet result)
UTILTY METHODS BELOW |
java.lang.Object |
read(IObjectMapping mapping,
java.sql.PreparedStatement preparedStatement)
Reads an object from the database using the given object mapping and PreparedStatement . |
java.lang.Object |
read(IObjectMapping mapping,
java.sql.PreparedStatement preparedStatement,
java.lang.Object persistentObject)
|
java.lang.Object |
read(IObjectMapping mapping,
java.sql.ResultSet result)
Reads an object from the given ResultSet using the given object mapping. |
java.lang.Object |
read(IObjectMapping mapping,
java.sql.ResultSet result,
java.lang.Object persistentObject)
|
java.lang.Object |
read(IObjectMapping mapping,
java.sql.Statement statement,
java.lang.String sql)
Reads an object using the provided object mapping, SQL and Statement instance. |
java.lang.Object |
read(IObjectMapping mapping,
java.lang.String sql,
java.util.Collection parameters,
java.sql.Connection connection)
Reads an object from the database using the given object mapping, SQL string, and parameters. |
java.lang.Object |
read(IObjectMapping mapping,
java.lang.String sql,
java.sql.Connection connection)
Reads an object using the given object mappping, SQL, and the Connection instance. |
java.lang.Object |
read(IObjectMapping mapping,
java.lang.String sql,
java.lang.Object[] parameters,
java.sql.Connection connection)
Reads an object from the database using the given object mapping, SQL string, and parameters. |
java.lang.Object |
readByPrimaryKey(IObjectMapping mapping,
IKeyValue primaryKey,
java.lang.Object persistentObject,
java.lang.String sql,
java.sql.Connection connection)
|
java.lang.Object |
readByPrimaryKey(IObjectMapping mapping,
IKeyValue primaryKey,
java.lang.String sql,
java.sql.Connection connection)
Reads an object from the database using an object mapping, the primary key, an SQL string (explained below) and a database connection. |
java.lang.Object |
readByPrimaryKey(IObjectMapping mapping,
java.lang.Object primaryKey,
java.lang.String sql,
java.sql.Connection connection)
Reads an object from the database using an object mapping, the primary key, an SQL string (explained below) and a database connection. |
java.util.List |
readList(IObjectMapping mapping,
java.sql.PreparedStatement preparedStatement)
Reads a list of objects from the database using the given object mapping and PreparedStatement . |
java.util.List |
readList(IObjectMapping mapping,
java.sql.PreparedStatement preparedStatement,
IReadFilter filter)
Reads a list of objects from the database using the given object mapping and PreparedStatement . |
java.util.List |
readList(IObjectMapping mapping,
java.sql.PreparedStatement preparedStatement,
IReadFilter filter,
java.util.Collection persistentObjects)
|
java.util.List |
readList(IObjectMapping mapping,
java.sql.ResultSet result)
LIST READ METHODS BELOW |
java.util.List |
readList(IObjectMapping mapping,
java.sql.ResultSet result,
IReadFilter filter)
FILTERED READ LIST METHODS BELOW |
java.util.List |
readList(IObjectMapping mapping,
java.sql.ResultSet result,
IReadFilter filter,
java.util.Collection persistentObjects)
|
java.util.List |
readList(IObjectMapping mapping,
java.sql.ResultSet result,
IReadFilter filter,
java.util.Map persistentObjects)
|
java.util.List |
readList(IObjectMapping mapping,
java.sql.Statement statement,
java.lang.String sql)
Reads a list of objects from the database using the given object mapping, Statement and
SQL string. |
java.util.List |
readList(IObjectMapping mapping,
java.sql.Statement statement,
java.lang.String sql,
IReadFilter filter)
Reads a list of objects from the database using the given object mapping, Statement and
SQL string. |
java.util.List |
readList(IObjectMapping mapping,
java.lang.String sql,
java.util.Collection parameters,
java.sql.Connection connection)
Reads a list of objects from the database using the given object mapping, SQL string, and parameters. |
java.util.List |
readList(IObjectMapping mapping,
java.lang.String sql,
java.util.Collection parameters,
java.sql.Connection connection,
IReadFilter filter)
Reads a list of objects from the database using the given object mapping, SQL string, and parameters. |
java.util.List |
readList(IObjectMapping mapping,
java.lang.String sql,
java.sql.Connection connection)
Reads a list of objects from the database using the given object mapping, SQL string, and Connection . |
java.util.List |
readList(IObjectMapping mapping,
java.lang.String sql,
java.sql.Connection connection,
IReadFilter filter)
Reads a list of objects from the database using the given object mapping, SQL string, and Connection . |
java.util.List |
readList(IObjectMapping mapping,
java.lang.String sql,
java.lang.Object[] parameters,
java.sql.Connection connection)
Reads a list of objects from the database using the given object mapping, SQL string, and parameters. |
java.util.List |
readList(IObjectMapping mapping,
java.lang.String sql,
java.lang.Object[] parameters,
java.sql.Connection connection,
IReadFilter filter)
Reads a list of objects from the database using the given object mapping, SQL string, and parameters. |
java.util.List |
readListByPrimaryKeys(IObjectMapping mapping,
java.util.Collection primaryKeys,
java.lang.String sql,
java.sql.Connection connection)
Reads a list of objects from the database using an object mapping, the primary keys of the objects to read, an SQL string (explained below) and a database connection. |
java.util.List |
readListByPrimaryKeys(IObjectMapping mapping,
java.util.Collection primaryKeys,
java.lang.String sql,
java.sql.Connection connection,
IReadFilter filter)
Reads a list of objects from the database using an object mapping, the primary keys of the objects to read, an SQL string (explained below) and a database connection. |
void |
setDatabase(Database database)
Sets the database that this IObjectReader is supposed to read objects from. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Database database
Constructor Detail |
---|
public ObjectReader()
Method Detail |
---|
public void setDatabase(Database database)
IObjectReader
setDatabase
in interface IObjectReader
database
- The database to set on this object reader.public java.lang.Object readByPrimaryKey(IObjectMapping mapping, java.lang.Object primaryKey, java.lang.String sql, java.sql.Connection connection) throws PersistenceException
IObjectReader
select [field1], [field2], [field3] (etc.) from [table] where [fieldPrimaryKey] = ?
. The
primary key value must be a ? for use with a PreparedStatement. The object reader will insert the
value in a PreparedStatement internally. The SQLGenerator class can generate a suitable SQL string for
use with the object reader, so you don't have to do it yourself.
Connection
yourself when you are done with it.
readByPrimaryKey
in interface IObjectReader
mapping
- The object mapping to use to read this object.primaryKey
- The primary key value of the object to read from the database.sql
- The SQL generated by the SQLGenerator class (or by you if you prefer).connection
- The database connection to use for reading the object. Remember that
you must close this connection yourself afterwards. The object reader only closes objects
it opens itself.
List
containing the objects read by the given primary keys. If
no records were found matching the given primary keys the list returned will be empty.
An empty list will also be returned if the list of primary keys is empty.
PersistenceException
- If something goes wrong during the read.public java.lang.Object readByPrimaryKey(IObjectMapping mapping, IKeyValue primaryKey, java.lang.Object persistentObject, java.lang.String sql, java.sql.Connection connection) throws PersistenceException
PersistenceException
public java.lang.Object readByPrimaryKey(IObjectMapping mapping, IKeyValue primaryKey, java.lang.String sql, java.sql.Connection connection) throws PersistenceException
IObjectReader
select [field1], [field2], [field3] (etc.) from [table]
where [fieldPrimaryKey1] = ? and [fieldPrimaryKey2] = ? (etc.)
. The
primary key value must be a ? for use with a PreparedStatement. The object reader will insert the
value in a PreparedStatement internally. The SQLGenerator class can generate a suitable SQL string for
use with the object reader, so you don't have to do it yourself.
Connection
yourself when you are done with it.
readByPrimaryKey
in interface IObjectReader
mapping
- The object mapping to use to read this object.primaryKey
- The primary key value of the object to read from the database.sql
- The SQL generated by the SQLGenerator class (or by you if you prefer).connection
- The database connection to use for reading the object. Remember that
you must close this connection yourself afterwards. The object reader only closes objects
it opens itself.
List
containing the objects read by the given primary keys. If
no records were found matching the given primary keys the list returned will be empty.
An empty list will also be returned if the list of primary keys is empty.
PersistenceException
- If something goes wrong during the read.public java.lang.Object read(IObjectMapping mapping, java.sql.ResultSet result, java.lang.Object persistentObject) throws PersistenceException
PersistenceException
public java.lang.Object read(IObjectMapping mapping, java.sql.ResultSet result) throws PersistenceException
IObjectReader
ResultSet
using the given object mapping.
The ResultSet
has to be positioned at the record to read the object from. Not before.
If the ResultSet
has just been opened, you will have to call the ResultSet.next()
or the ResultSet.first()
before calling this method.
ResultSet
yourself when you are done with it.
read
in interface IObjectReader
mapping
- The object mapping to use to read the object.result
- The ResultSet
to read the object from. Remember to close this yourself when you are
done with it.
ResultSet
PersistenceException
- If anything goes wrong during the read.public java.lang.Object read(IObjectMapping mapping, java.sql.Statement statement, java.lang.String sql) throws PersistenceException
IObjectReader
Statement
instance. The SQL can be
written freely as long as it is valid, and your database understands it.
If the ResultSet
returned by the Statement
instance returns more than one record, the first one is used to read the object.
If the ResultSet
is empty null is returned.
Statement
object yourself when you are done with it.
read
in interface IObjectReader
mapping
- The object mapping to use to read the object.statement
- The Statement
instance to use to execute the SQL.sql
- The SQL that locates the record to use to read as an object.
ResultSet
.
Null if the ResultSet
is empty.
PersistenceException
- If anything goes wrong during the read.public java.lang.Object read(IObjectMapping mapping, java.lang.String sql, java.sql.Connection connection) throws PersistenceException
IObjectReader
Connection
instance.
The SQL can be freely written as long as it is valid and your database understands it.
Connection
instance yourself when you are done with it.
read
in interface IObjectReader
mapping
- The object mapping to use to read the object.sql
- The SQL that locates the record in the database to read the object from.connection
- The database connection to use to read this object.
Remember to close the Connection
instance yourself when you are done with it.
PersistenceException
- If anything goes wrong during the read.public java.lang.Object read(IObjectMapping mapping, java.sql.PreparedStatement preparedStatement, java.lang.Object persistentObject) throws PersistenceException
PersistenceException
public java.lang.Object read(IObjectMapping mapping, java.sql.PreparedStatement preparedStatement) throws PersistenceException
IObjectReader
PreparedStatement
.
You must have set all values on the PreparedStatement
instance before calling this method
(using the appropriate PreparedStatement.setXXX(int index, XXX value) methods ).
Remember to close the PreparedStatement
instance yourself when you are done with it.
- Specified by:
read
in interface IObjectReader
- Parameters:
mapping
- The object mapping to use to read this object.preparedStatement
- The PreparedStatement
that locates the record that this
object is to be read from.
- Returns:
- The object read from the database using the given object mapping and
PreparedStatement
- Throws:
PersistenceException
- If anything goes wrong during the read.
public java.lang.Object read(IObjectMapping mapping, java.lang.String sql, java.util.Collection parameters, java.sql.Connection connection) throws PersistenceException
IObjectReader
PreparedStatement
instance will be created using the
given SQL string, and the parameters collection will be inserted into it.
Therefore the SQL string should have the same format as those used with a
PreparedStatement
. The parameters will be inserted in the
sequence returned by the parameter collection's iterator.
ResultSet
generated
by the PreparedStatement
instance contains
more than one record, only the first record in the
ResultSet
will be read into an object and returned.
read
in interface IObjectReader
mapping
- The object mapping to use to read this object.sql
- The SQL string to use for the PreparedStatement
.parameters
- The parameters to insert into the PreparedStatement
.connection
- The database connection to use to create the PreparedStatement
instance.
PersistenceException
- If anything goes wrong during the read.public java.lang.Object read(IObjectMapping mapping, java.lang.String sql, java.lang.Object[] parameters, java.sql.Connection connection) throws PersistenceException
IObjectReader
PreparedStatement
instance will be created using the
given SQL string, and the parameters in the array will be inserted into it.
Therefore the SQL string should have the same format as those used with a
PreparedStatement
. The parameters will be inserted in the
sequence of their indexes in the array, meaning parameters[0] will be inserted first.
ResultSet
generated
by the PreparedStatement
instance contains
more than one record, only the first record in the
ResultSet
will be read into an object and returned.
read
in interface IObjectReader
mapping
- The object mapping to use to read this object.sql
- The SQL string to use for the PreparedStatement
.parameters
- The parameters to insert into the PreparedStatement
.connection
- The database connection to use to create the PreparedStatement
instance.
PersistenceException
- If anything goes wrong during the read.public java.util.List readListByPrimaryKeys(IObjectMapping mapping, java.util.Collection primaryKeys, java.lang.String sql, java.sql.Connection connection) throws PersistenceException
IObjectReader
select [field1], [field2], [field3] ... from [table] where [fieldPrimaryKey] in (?, ?, ? ...)
.
The primary key values must be ?-marks for use with a PreparedStatement. The object reader will insert the
values in a PreparedStatement internally. The SQLGenerator class can generate a suitable SQL string for
use with the object reader, so you don't have to do it yourself.
Connection
yourself when you are done with it.
readListByPrimaryKeys
in interface IObjectReader
mapping
- The object mapping to use to read the objects.primaryKeys
- The primary key values of the objects to read from the database.sql
- The SQL generated by the SQLGenerator class (or by you if you prefer).connection
- The database connection to use for reading the object. Remember that
you must close this connection yourself afterwards. The object reader only closes objects
it opens itself.
PersistenceException
- If something goes wrong during the read.public java.util.List readListByPrimaryKeys(IObjectMapping mapping, java.util.Collection primaryKeys, java.lang.String sql, java.sql.Connection connection, IReadFilter filter) throws PersistenceException
IObjectReader
IReadFilter
instance to this method. If the filter parameter is null, no filtering will
be done.
select [field1], [field2], [field3] ... from [table] where [fieldPrimaryKey] in (?, ?, ? ...)
.
The primary key values must be ?-marks for use with a PreparedStatement. The object reader will insert the
values in a PreparedStatement internally. The SQLGenerator class can generate a suitable SQL string for
use with the object reader, so you don't have to do it yourself.
Connection
yourself when you are done with it.
readListByPrimaryKeys
in interface IObjectReader
mapping
- The object mapping to use to read the objects.primaryKeys
- The primary key values of the objects to read from the database.sql
- The SQL generated by the SQLGenerator class (or by you if you prefer).connection
- The database connection to use for reading the object. Remember that
you must close this connection yourself afterwards. The object reader only closes objects
it opens itself.
PersistenceException
- If something goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.sql.ResultSet result) throws PersistenceException
readList
in interface IObjectReader
mapping
- The object mapping to use to read the objects.result
- The ResultSet
to read the objects from.
ResultSet
in the same sequence as the
coresponding records appear in the ResultSet
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.sql.Statement statement, java.lang.String sql) throws PersistenceException
IObjectReader
Statement
and
SQL string. The objects will appear in the list in the same sequence as they appear in the
ResultSet
generated by the SQL string.
Statement
instance when you are done with it. This method will not
close it.
readList
in interface IObjectReader
mapping
- The object mapping to use to read the objects.statement
- The Statement
instance to use to execute the SQL string.sql
- The SQL string locating the records in the database to read into objects.
ResultSet
generated on the base of the SQL string.
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.lang.String sql, java.sql.Connection connection) throws PersistenceException
IObjectReader
Connection
. The objects will appear in the list in the same sequence
as they appear in the ResultSet
generated by the SQL string.
Connection
instance when you are done with it. This method will not
close it.
readList
in interface IObjectReader
mapping
- The object mapping to use to read the objects.sql
- The SQL string locating the records in the database to read into objects.connection
- The database connection to use to execute the SQL via.
ResultSet
generated by executing the
SQL string.
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.sql.PreparedStatement preparedStatement) throws PersistenceException
IObjectReader
PreparedStatement
.
You must have set all values on the PreparedStatement
instance before calling this method
(using the appropriate PreparedStatement.setXXX(int index, XXX value) methods ).
The objects will appear in the list in the same sequence
as they appear in the ResultSet
generated by the SQL string.
Remember to close the Connection
instance when you are done with it. This method will not
close it.
- Specified by:
readList
in interface IObjectReader
- Parameters:
mapping
- The object mapping to use to read the objects.preparedStatement
- The PreparedStatement
that locates the record that this
object is to be read from.
- Returns:
- A list of objects read from the
ResultSet
generated by executing the
PreparedStatement
.
- Throws:
PersistenceException
- If anything goes wrong during the read.
public java.util.List readList(IObjectMapping mapping, java.lang.String sql, java.util.Collection parameters, java.sql.Connection connection) throws PersistenceException
IObjectReader
PreparedStatement
instance will be created using the
given SQL string, and the parameters collection will be inserted into it.
Therefore the SQL string should have the same format as those used with a
PreparedStatement
. The parameters will be inserted in the
sequence returned by the parameter collection's iterator.
ResultSet
generated by the SQL string.
Connection
instance when you are done with it. This method will not
close it.
readList
in interface IObjectReader
mapping
- The object mapping to use to read the list of objects.sql
- The SQL string to use for the PreparedStatement
.parameters
- The parameters to insert into the PreparedStatement
.connection
- The database connection to use to create the PreparedStatement
instance.
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.lang.String sql, java.lang.Object[] parameters, java.sql.Connection connection) throws PersistenceException
IObjectReader
PreparedStatement
instance will be created using the
given SQL string, and the parameters in the array will be inserted into it.
Therefore the SQL string should have the same format as those used with a
PreparedStatement
. The parameters will be inserted in the
sequence of their indexes in the array, meaning parameters[0] will be inserted first.
ResultSet
generated by the SQL string.
Connection
instance when you are done with it. This method will not
close it.
readList
in interface IObjectReader
mapping
- The object mapping to use to read the list of objects.sql
- The SQL string to use for the PreparedStatement
.parameters
- The parameters to insert into the PreparedStatement
.connection
- The database connection to use to create the PreparedStatement
instance.
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.sql.ResultSet result, IReadFilter filter) throws PersistenceException
readList
in interface IObjectReader
mapping
- The object mapping to use to read the objects.result
- The ResultSet
to read the objects from.filter
- The filter to apply to the ResultSet
.
Passing null in this parameter will result in no filtering.
ResultSet
according to the object mapping.
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.sql.ResultSet result, IReadFilter filter, java.util.Collection persistentObjects) throws PersistenceException
PersistenceException
public java.util.List readList(IObjectMapping mapping, java.sql.ResultSet result, IReadFilter filter, java.util.Map persistentObjects) throws PersistenceException
PersistenceException
public java.util.List readList(IObjectMapping mapping, java.sql.Statement statement, java.lang.String sql, IReadFilter filter) throws PersistenceException
IObjectReader
Statement
and
SQL string. The objects will appear in the list in the same sequence as they appear in the
ResultSet
generated by the SQL string.
The read filter can either accept or reject records in the
ResultSet
, and can also signal that it won't accept anymore records at all,
so the object reader can stop the ResultSet
iteration.
Statement
instance when you are done with it. This method will not
close it.
readList
in interface IObjectReader
mapping
- The object mapping to use to read the objects.statement
- The Statement
instance to use to execute the SQL string.sql
- The SQL string locating the records in the database to read into objects.filter
- The filter to apply to the ResultSet
generated from the SQL string.
Passing null in this parameter will result in no filtering.
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.lang.String sql, java.sql.Connection connection, IReadFilter filter) throws PersistenceException
IObjectReader
Connection
. The objects will appear in the list in the same sequence
as they appear in the ResultSet
generated by the SQL string.
The read filter can either accept or reject records in the
ResultSet
, and can also signal that it won't accept anymore records at all,
so the object reader can stop the ResultSet
iteration.
Connection
instance when you are done with it. This method will not
close it.
readList
in interface IObjectReader
mapping
- The object mapping to use to read the objects.sql
- The SQL string locating the records in the database to read into objects.connection
- The database connection to use to execute the SQL via.filter
- The filter to apply to the ResultSet
generated from the SQL string.
Passing null in this parameter will result in no filtering.
ResultSet
generated by executing the
SQL string.
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.sql.PreparedStatement preparedStatement, IReadFilter filter) throws PersistenceException
IObjectReader
PreparedStatement
.
You must have set all values on the PreparedStatement
instance before calling this method
(using the appropriate PreparedStatement.setXXX(int index, XXX value) methods ).
The objects will appear in the list in the same sequence
as they appear in the ResultSet
generated by the SQL string.
The read filter can either accept or reject records in the
ResultSet
, and can also signal that it won't accept anymore records at all,
so the object reader can stop the ResultSet
iteration.
Remember to close the Connection
instance when you are done with it. This method will not
close it.
- Specified by:
readList
in interface IObjectReader
- Parameters:
mapping
- The object mapping to use to read the objects.preparedStatement
- The PreparedStatement
that locates the record that this
object is to be read from.filter
- The filter to apply to the ResultSet
generated from the SQL string.
Passing null in this parameter will result in no filtering.
- Returns:
- A list of objects read from the
ResultSet
generated by executing the
PreparedStatement
.
- Throws:
PersistenceException
- If anything goes wrong during the read.
public java.util.List readList(IObjectMapping mapping, java.sql.PreparedStatement preparedStatement, IReadFilter filter, java.util.Collection persistentObjects) throws PersistenceException
PersistenceException
public java.util.List readList(IObjectMapping mapping, java.lang.String sql, java.util.Collection parameters, java.sql.Connection connection, IReadFilter filter) throws PersistenceException
IObjectReader
PreparedStatement
instance will be created using the
given SQL string, and the parameters collection will be inserted into it.
Therefore the SQL string should have the same format as those used with a
PreparedStatement
. The parameters will be inserted in the
sequence returned by the parameter collection's iterator.
ResultSet
generated by the SQL string.
ResultSet
, and can also signal that it won't accept anymore records at all,
so the object reader can stop the ResultSet
iteration.
Connection
instance when you are done with it. This method will not
close it.
readList
in interface IObjectReader
mapping
- The object mapping to use to read the list of objects.sql
- The SQL string to use for the PreparedStatement
.parameters
- The parameters to insert into the PreparedStatement
.connection
- The database connection to use to create the PreparedStatement
instance.
PersistenceException
- If anything goes wrong during the read.public java.util.List readList(IObjectMapping mapping, java.lang.String sql, java.lang.Object[] parameters, java.sql.Connection connection, IReadFilter filter) throws PersistenceException
IObjectReader
PreparedStatement
instance will be created using the
given SQL string, and the parameters in the array will be inserted into it.
Therefore the SQL string should have the same format as those used with a
PreparedStatement
. The parameters will be inserted in the
sequence of their indexes in the array, meaning parameters[0] will be inserted first.
ResultSet
generated by the SQL string.
ResultSet
, and can also signal that it won't accept anymore records at all,
so the object reader can stop the ResultSet
iteration.
Connection
instance when you are done with it. This method will not
close it.
readList
in interface IObjectReader
mapping
- The object mapping to use to read the list of objects.sql
- The SQL string to use for the PreparedStatement
.parameters
- The parameters to insert into the PreparedStatement
.connection
- The database connection to use to create the PreparedStatement
instance.
PersistenceException
- If anything goes wrong during the read.protected java.lang.Object newInstance(java.lang.Class persistentObjectClass, java.sql.ResultSet result) throws PersistenceException
PersistenceException
public java.lang.Object createNoArgumentInstance(java.lang.Class persistentObjectClass) throws PersistenceException
PersistenceException
public java.lang.Object createResultSetArgumentInstance(java.lang.Class persistentObjectClass, java.sql.ResultSet result, java.lang.reflect.Constructor constructor) throws PersistenceException
PersistenceException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |