org.springframework.jdbc.object |
The classes in this package represent RDBMS queries, updates,
and stored procedures as threadsafe, reusable objects. This approach
is modelled by JDO, although of course objects returned by queries
are "disconnected" from the database.
This higher level of JDBC abstraction depends on the lower-level
abstraction in the org.springframework.jdbc.core package.
Exceptions thrown are as in the org.springframework.dao package,
meaning that code using this package does not need to implement JDBC or
RDBMS-specific error handling.
This package and related packages are discussed in Chapter 9 of
Expert One-On-One J2EE Design and Development
by Rod Johnson (Wrox, 2002).
|
Java Source File Name | Type | Comment |
BatchSqlUpdate.java | Class | SqlUpdate subclass that performs batch update operations. |
MappingSqlQuery.java | Class | Reusable query in which concrete subclasses must implement the abstract
mapRow(ResultSet, int) method to convert each row of the JDBC ResultSet
into an object.
Simplifies MappingSqlQueryWithParameters API by dropping parameters and
context. |
MappingSqlQueryWithParameters.java | Class | Reusable RDBMS query in which concrete subclasses must implement
the abstract mapRow(ResultSet, int) method to map each row of
the JDBC ResultSet into an object.
Such manual mapping is usually preferable to "automatic"
mapping using reflection, which can become complex in non-trivial
cases. |
RdbmsOperation.java | Class | An "RDBMS operation" is a multi-threaded, reusable object representing a query,
update, or stored procedure call. |
SqlCall.java | Class | RdbmsOperation using a JdbcTemplate and representing a SQL-based
call such as a stored procedure or a stored function. |
SqlFunction.java | Class | SQL "function" wrapper for a query that returns a single row of results. |
SqlOperation.java | Class | Operation object representing a SQL-based operation such as a query or update,
as opposed to a stored procedure. |
SqlQuery.java | Class | Reusable operation object representing a SQL query.
Subclasses must implement the
SqlQuery.newRowMapper method to provide
an object that can extract the results of iterating over the
ResultSet created during the execution of the query.
This class provides a number of public execute methods that are
analogous to the different convenient JDO query execute methods. |
SqlUpdate.java | Class | Reusable operation object representing a SQL update.
This class provides a number of update methods,
analogous to the execute methods of query objects.
This class is concrete. |
StoredProcedure.java | Class | Superclass for object abstractions of RDBMS stored procedures.
This class is abstract and it is intended that subclasses will provide
a typed method for invocation that delegates to the supplied
StoredProcedure.execute method.
The inherited sql property is the name of the stored
procedure in the RDBMS. |
UpdatableSqlQuery.java | Class | Reusable RDBMS query in which concrete subclasses must implement
the abstract updateRow(ResultSet, int, context) method to update each
row of the JDBC ResultSet and optionally map contents into an object.
Subclasses can be constructed providing SQL, parameter types
and a DataSource. |