| biz.hammurapi.web.util.DynaSQLProcessor
DynaSQLProcessor | public class DynaSQLProcessor extends SQLProcessor implements Context(Code) | | |
Method Summary | |
public int | delete(String tableName, Context criteriaCtx) Deletes data. | public static Class | generateResultSetInterface(String interfaceName, Map columnMap, InterfacePool interfacePool, InjectingClassLoader injectingClassLoader) | public Object | get(String sql) Executes SQL and returns single object. | public void | insert(String tableName, Context ctx) Inserts data into table. | public void | processDatabaseMetaData(DatabaseMetaDataProcessor processor) Processes database metadata. | public List | project(ResultSet rs) | public static Object | project(ResultSet rs, Class resultInterface, Map columnMap) | public Collection | select(String sql) Executes SQL query, projects results to dynamically generated interface
implementation. | public Collection | select(String sql, List params) Executes SQL query, projects results to dynamically generated interface
implementation. | public Collection | select(String sql, Context params) Executes SQL query, projects results to dynamically generated interface
implementation. | public Object | selectSingleObject(String sql) Executes SQL query, projects first row to dynamically generated interface
implementation. | public Object | selectSingleObject(String sql, List params) Executes SQL query, projects first row to dynamically generated interface
implementation. | public Object | selectSingleObject(String sql, Context params) Executes SQL query, projects first row to dynamically generated interface
implementation. | public int | update(String tableName, Context ctx, Context criteriaCtx) Updated table data. | public int | update(String sql, List parameters) | public int | update(String sql, Context params) |
DynaSQLProcessor | public DynaSQLProcessor(DataSource dataSource, Context nameMap)(Code) | | |
DynaSQLProcessor | public DynaSQLProcessor(Connection connection, Context nameMap)(Code) | | |
delete | public int delete(String tableName, Context criteriaCtx) throws SQLException(Code) | | Deletes data. WHERE clause is built from criteriaCtx
Parameters: tableName - Parameters: criteriaCtx - |
generateResultSetInterface | public static Class generateResultSetInterface(String interfaceName, Map columnMap, InterfacePool interfacePool, InjectingClassLoader injectingClassLoader) throws GenerationException, ClassNotFoundException(Code) | | |
get | public Object get(String sql)(Code) | | Executes SQL and returns single object.
Typical usage for this method retrieving scalar values
from the database.
|
insert | public void insert(String tableName, Context ctx) throws SQLException(Code) | | Inserts data into table. Values are taken from context.
Parameters: tableName - Parameters: ctx - |
project | public List project(ResultSet rs) throws SQLException(Code) | | This method generates dynamic interface from result set metadata and projects
result set to this collection
Parameters: rsmd - |
select | public Collection select(String sql) throws SQLException(Code) | | Executes SQL query, projects results to dynamically generated interface
implementation. Results are put to ArrayList. If result set has one column then
string value of this column is put to resulting collection.
Parameters: sql - ArrayList of dynamic proxies. throws: SQLException - |
select | public Collection select(String sql, List params) throws SQLException(Code) | | Executes SQL query, projects results to dynamically generated interface
implementation. Results are put to ArrayList. If result set has one column then
string value of this column is put to resulting collection.
Parameters: sql - Parameters: params - Array of query parameters. ArrayList of dynamic proxies. throws: SQLException - |
select | public Collection select(String sql, Context params) throws SQLException(Code) | | Executes SQL query, projects results to dynamically generated interface
implementation. Results are put to ArrayList. If result set has one column then
string value of this column is put to resulting collection.
Parameters: sql - Parameters: params - Context to retrieve parameters from. In SQL parameters shall be present in a form ${param name}. This callpreprocesses SQL and replaces ${...} with a question mark. At the same time it retrieves parameter value from the context ArrayList of dynamic proxies. throws: SQLException - |
selectSingleObject | public Object selectSingleObject(String sql) throws SQLException(Code) | | Executes SQL query, projects first row to dynamically generated interface
implementation. If result set has one column then
string value of this column is returned.
Parameters: sql - Dynamic proxy representing the first row in result set or null. throws: SQLException - |
selectSingleObject | public Object selectSingleObject(String sql, List params) throws SQLException(Code) | | Executes SQL query, projects first row to dynamically generated interface
implementation. If result set has one column then
string value of this column is returned.
Parameters: sql - Dynamic proxy representing the first row in result set or null. throws: SQLException - |
selectSingleObject | public Object selectSingleObject(String sql, Context params) throws SQLException(Code) | | Executes SQL query, projects first row to dynamically generated interface
implementation. If result set has one column then
string value of this column is returned.
Parameters: sql - Dynamic proxy representing the first row in result set or null. throws: SQLException - |
update | public int update(String tableName, Context ctx, Context criteriaCtx) throws SQLException(Code) | | Updated table data. WHERE clause is built from criteriaCtx
Parameters: tableName - Parameters: ctx - Parameters: criteriaCtx - |
|
|