Java Doc for SQLProcessor.java in  » J2EE » hgcommons » biz » hammurapi » sql » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » hgcommons » biz.hammurapi.sql 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   biz.hammurapi.sql.SQLProcessor

SQLProcessor
public class SQLProcessor (Code)
This class contains methods to process SQL statements in more convenient way comparing to standard JDBC.
author:
   Pavel Vlasov
version:
   $Revision: 1.14 $

Inner Class :interface Person


Constructor Summary
public  SQLProcessor(DataSource dataSource, Context nameMap)
     If SQLProcessor constructed with this constructor then it obtains connection from the datasource, processes request and closes connection.
public  SQLProcessor(Connection connection, Context nameMap)
     If SQLProcessor created with this constructor then is doesn't close the connection after processing.

Method Summary
public  voidexecuteScript(Reader reader)
    
public  voidexecuteScript(Reader reader, char statementSeparator)
    
public  voidexecuteScript(Reader reader, char statementSeparator, ExceptionSink exceptionSink)
    
Parameters:
  reader - Script source
Parameters:
  statementSeparator - Statement separator
Parameters:
  exceptionSink - Exception sink.
public  voidexecuteTransaction(Transaction transaction)
    
public static  StringfindProjectSingleMethodName(String className)
     Finds projectSingleXXX method for a particular type.
public  ConnectiongetConnection()
    
protected  DataSourcegetDataSource()
    
public  ContextgetNameMap()
    
public  TimeIntervalCategorygetTimeIntervalCategory()
    
public  voidinject(String sql, Parameterizer parameterizer, Map columnMap, Object target)
     Executes query and injects values from the first row to target object.
public static  voidmain(String[] args)
    
public  intnextPK(String primaryKeysTable, String keyName)
     Generates primary key.
Parameters:
  primaryKeysTable - Table holding primary keys counters.
public  intnextPK(Connection con, String primaryKeysTable, String keyName)
    
public  Stringparse(String str)
     Replaces ${} with property value.
public  voidprocessResourceSelect(String resourceName, Parameterizer parameterizer, RowProcessor rowProcessor)
     Processes SELECT statement read from resource file.
public  intprocessResourceUpdate(String resourceName, Parameterizer parameterizer)
     Processes SELECT statement read from resource file.
public  voidprocessSelect(String sql, Parameterizer parameterizer, RowProcessor rowProcessor)
    
public  intprocessUpdate(String sql, Parameterizer parameterizer)
     Processes SQL INSERT, UPDATE or DELETE statement in the following way:
  • Obtains connection
  • If parameterizer==null creates Statement, creates PreparedStatement otherwise
  • Invokes parameterizer.parameterize() if parameterizer is not null
  • Executes update
  • ResultSet, Statement and connection are properly released

Parameters:
  sql - SQL statment to execute
Parameters:
  parameterizer - Parameterizer Number of updates.
public  Collectionproject(String sql, Parameterizer parameterizer, Projector projector)
     Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects.
public  Collectionproject(String sql, Parameterizer parameterizer)
     Executes SQL statement and returns collection backed by the database. Rows are projected to collection of field values.
public  Collectionproject(String sql)
     Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute Collection backed by the database.
public  Collectionproject(String sql, Parameterizer parameterizer, Class theInterface)
     Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Iterface to implement Collection backed by the database.
public  Collectionproject(String sql, Parameterizer parameterizer, Class theInterface, Object delegate)
     Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement Collection backed by the database.
public  Collectionproject(String sql, Parameterizer parameterizer, Projector projector, int pageNum, int pageSize)
     Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects.
public  Collectionproject(String sql, Parameterizer parameterizer, Class theInterface, int pageNum, int pageSize)
     Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement
Parameters:
  pageSize - Maximum number of records to return
Parameters:
  pageNum - Number of page.
public  Collectionproject(String sql, Parameterizer parameterizer, Class theInterface, Object delegate, int pageNum, int pageSize)
     Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement
Parameters:
  delegate - Object to delegate invocations which didn't match field getters/setters
Parameters:
  pageSize - Maximum number of records to return
Parameters:
  pageNum - Number of page.
public  Collectionproject(String sql, Parameterizer parameterizer, Projector projector, Collection receiver)
     Executes SQL statement and puts results to receiver
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects.
public  Collectionproject(String sql, Parameterizer parameterizer, Class theInterface, Collection receiver)
     Executes SQL statement and puts results to receiver
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement
Parameters:
  receiver - Collection to put results to receiver with added objects.
public  Collectionproject(String sql, Parameterizer parameterizer, Class theInterface, Object delegate, Collection receiver)
     Executes SQL statement and puts results to receiver
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement
Parameters:
  delegate - Object to delegate invocations which didn't match field getters/setters.
Parameters:
  receiver - Collection to put results to receiver with added objects.
public  Collectionproject(String sql, Parameterizer parameterizer, Projector projector, Collection receiver, int pageSize, int pageNum)
     Executes SQL statement and puts results to receiver
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects.
public  booleanprojectSingleBoolean(String sql, Parameterizer parameterizer)
    
public  byteprojectSingleByte(String sql, Parameterizer parameterizer)
    
public  byte[]projectSingleBytes(String sql, Parameterizer parameterizer)
    
public  charprojectSingleChar(String sql, Parameterizer parameterizer)
    
public  doubleprojectSingleDouble(String sql, Parameterizer parameterizer)
    
public  floatprojectSingleFloat(String sql, Parameterizer parameterizer)
    
public  intprojectSingleInt(String sql, Parameterizer parameterizer)
    
public  longprojectSingleLong(String sql, Parameterizer parameterizer)
    
public  ObjectprojectSingleObject(String sql, Parameterizer parameterizer, Projector projector)
    
Parameters:
  string -
Parameters:
  parameterizer -
Parameters:
  projector - Projector.
public  ObjectprojectSingleObject(String sql, Parameterizer parameterizer, Class theInterface)
    
public  ObjectprojectSingleObject(String sql, Parameterizer parameterizer)
    
public  ObjectprojectSingleObject(String sql, Parameterizer parameterizer, Class theInterface, Object delegate)
    
public  shortprojectSingleShort(String sql, Parameterizer parameterizer)
    
public  StringprojectSingleString(String sql, Parameterizer parameterizer)
    
public  voidreleaseConnection(Connection connection)
     Closes connection if it was provided by DataSource.
public  voidsetTimeIntervalCategory(TimeIntervalCategory timeIntervalCategory)
    


Constructor Detail
SQLProcessor
public SQLProcessor(DataSource dataSource, Context nameMap)(Code)
If SQLProcessor constructed with this constructor then it obtains connection from the datasource, processes request and closes connection.
Parameters:
  dataSource - DataSource
Parameters:
  nameMap - NameMap allows to write parameterized SQL statementslike "SELECT ${AMOUNT} FROM ${ACCOUNT} WHERE ${ANUM}=? AND CLOSED=1"nameMap shall contain mapping from AMOUNT, ACCOUNT and ANUM to actualdatabase field names. If nameMap doesn't contain mapping for some properties then property names will be used as property values. See biz.hammurapi.config.PropertyParser.One property value can contain a reference to another property.If nameMap is null then no property parsing will happen.



SQLProcessor
public SQLProcessor(Connection connection, Context nameMap)(Code)
If SQLProcessor created with this constructor then is doesn't close the connection after processing.
Parameters:
  connection -
Parameters:
  nameMap - See biz.hammurapi.sql.SQLProcessor.SQLProcessor(DataSourceProperties)




Method Detail
executeScript
public void executeScript(Reader reader) throws IOException, SQLException(Code)
Excecutes script with ; as statement separator
Parameters:
  reader - Script source
throws:
  IOException -
throws:
  SQLException -
See Also:   SQLProcessor.executeScript(Readerchar)



executeScript
public void executeScript(Reader reader, char statementSeparator) throws IOException, SQLException(Code)
Executes series of SQL statement read from reader and separated by statementSeparator
Parameters:
  reader - Script source
Parameters:
  statementSeparator - Statement separator
throws:
  IOException -
throws:
  SQLException -



executeScript
public void executeScript(Reader reader, char statementSeparator, ExceptionSink exceptionSink) throws IOException, SQLException(Code)

Parameters:
  reader - Script source
Parameters:
  statementSeparator - Statement separator
Parameters:
  exceptionSink - Exception sink. Consumes exceptions thrown by individual statements. If sink is null then exception isrethrown and script execution terminates.
throws:
  IOException -
throws:
  SQLException -



executeTransaction
public void executeTransaction(Transaction transaction) throws SQLException(Code)



findProjectSingleMethodName
public static String findProjectSingleMethodName(String className)(Code)
Finds projectSingleXXX method for a particular type.
Parameters:
  className -



getConnection
public Connection getConnection() throws SQLException(Code)
Returns connection if you need it for JDBC calls outside of the SQLProcessor Connection
throws:
  SQLException -



getDataSource
protected DataSource getDataSource()(Code)



getNameMap
public Context getNameMap()(Code)



getTimeIntervalCategory
public TimeIntervalCategory getTimeIntervalCategory()(Code)



inject
public void inject(String sql, Parameterizer parameterizer, Map columnMap, Object target) throws SQLException(Code)
Executes query and injects values from the first row to target object.
Parameters:
  string -
Parameters:
  parameterizer -
Parameters:
  target - Object to inject values to
throws:
  SQLException -



main
public static void main(String[] args) throws Exception(Code)



nextPK
public int nextPK(String primaryKeysTable, String keyName) throws SQLException(Code)
Generates primary key.
Parameters:
  primaryKeysTable - Table holding primary keys counters. DDL:
CREATE TABLE table name (KEY_NAME VARCHAR(50) NOT NULL, KEY_VALUE INTEGER DEFAULT '0' NOT NULL, PRIMARY KEY (KEY_NAME));

Parameters:
  keyName - Key name
throws:
  SQLException -



nextPK
public int nextPK(Connection con, String primaryKeysTable, String keyName) throws SQLException(Code)

Parameters:
  con -
Parameters:
  primaryKeysTable -
Parameters:
  keyName -
throws:
  SQLException -



parse
public String parse(String str)(Code)
Replaces ${} with property value. See biz.hammurapi.config.PropertyParser
Parameters:
  str - parsed string



processResourceSelect
public void processResourceSelect(String resourceName, Parameterizer parameterizer, RowProcessor rowProcessor) throws SQLException, IOException(Code)
Processes SELECT statement read from resource file. Suitable for huge SQL statements or SQL statements maintained by other developers.
Parameters:
  resourceName -
Parameters:
  parameterizer -
Parameters:
  rowProcessor -
throws:
  SQLException -
throws:
  IOException -



processResourceUpdate
public int processResourceUpdate(String resourceName, Parameterizer parameterizer) throws SQLException, IOException(Code)
Processes SELECT statement read from resource file. Suitable for huge SQL statements or SQL statements maintained by other developers.
Parameters:
  resourceName -
Parameters:
  parameterizer - Number of updates. See Statement.executeUpdate(java.lang.String)
throws:
  SQLException -
throws:
  IOException -



processSelect
public void processSelect(String sql, Parameterizer parameterizer, RowProcessor rowProcessor) throws SQLException(Code)
Processes SQL SELECT statement in the following way:
  • Obtains connection
  • If parameterizer==null creates Statement, creates PreparedStatement otherwise
  • Invokes parameterizer.parameterize() if parameterizer is not null
  • Iterates through result set and invokes rowProcessor.process() on each row
  • If there was no rows and rowProcess is instance of RowProcessorEx then rowProcessor.onEmptyResultSet() is invoked
  • ResultSet, Statement and connection are properly released

Parameters:
  sql - SQL statment to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  rowProcessor - RowProcessor
throws:
  SQLException -



processUpdate
public int processUpdate(String sql, Parameterizer parameterizer) throws SQLException(Code)
Processes SQL INSERT, UPDATE or DELETE statement in the following way:
  • Obtains connection
  • If parameterizer==null creates Statement, creates PreparedStatement otherwise
  • Invokes parameterizer.parameterize() if parameterizer is not null
  • Executes update
  • ResultSet, Statement and connection are properly released

Parameters:
  sql - SQL statment to execute
Parameters:
  parameterizer - Parameterizer Number of updates. See Statement.executeUpdate(java.lang.String)
throws:
  SQLException -



project
public Collection project(String sql, Parameterizer parameterizer, Projector projector)(Code)
Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects. It is null then projectorwhich projects row to collection will be used. Collection backed by the database. The collection doesn't holdany SQL resources open, neither it keeps any refernces to created objects.It keeps only references to the SQLProcessor, parameterizerand projector. Thus any call to one of collection methods retursn 'fresh' results from the database.Iterators created by this collection open ResultSet and close it whenIterator.hasNext() returns false.



project
public Collection project(String sql, Parameterizer parameterizer)(Code)
Executes SQL statement and returns collection backed by the database. Rows are projected to collection of field values.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects. It is null then projectorwhich projects row to collection will be used. Collection backed by the database. The collection doesn't holdany SQL resources open, neither it keeps any refernces to created objects.It keeps only references to the SQLProcessor and parameterizer. Thus any call to one of collection methods retursn 'fresh' results from the database.Iterators created by this collection open ResultSet and close it whenIterator.hasNext() returns false.



project
public Collection project(String sql)(Code)
Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute Collection backed by the database. The collection doesn't holdany SQL resources open, neither it keeps any refernces to created objects.It keeps only references to the SQLProcessor. Thus any call to one of collection methods retursn 'fresh' results from the database.Iterators created by this collection open ResultSet and close it whenIterator.hasNext() returns false.



project
public Collection project(String sql, Parameterizer parameterizer, Class theInterface)(Code)
Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Iterface to implement Collection backed by the database. The collection doesn't holdany SQL resources open, neither it keeps any refernces to created objects.It keeps only references to the SQLProcessor, parameterizerand projector. Thus any call to one of collection methods retursn 'fresh' results from the database.Iterators created by this collection open ResultSet and close it whenIterator.hasNext() returns false.



project
public Collection project(String sql, Parameterizer parameterizer, Class theInterface, Object delegate)(Code)
Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement Collection backed by the database. The collection doesn't holdany SQL resources open, neither it keeps any refernces to created objects.It keeps only references to the SQLProcessor, parameterizerand projector. Thus any call to one of collection methods retursn 'fresh' results from the database.Iterators created by this collection open ResultSet and close it whenIterator.hasNext() returns false.



project
public Collection project(String sql, Parameterizer parameterizer, Projector projector, int pageNum, int pageSize)(Code)
Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects. If it is null then projector which projects row to collection will be used
Parameters:
  pageSize - Maximum number of records to return
Parameters:
  pageNum - Number of page. Starts with 1. Collection backed by the database. The collection doesn't holdany SQL resources open, neither it keeps any refernces to created objects.It keeps only references to the SQLProcessor, parameterizerand projector. Thus any call to one of collection methods retursn 'fresh' results from the database.Iterators created by this collection open ResultSet and close it whenIterator.hasNext() returns false.



project
public Collection project(String sql, Parameterizer parameterizer, Class theInterface, int pageNum, int pageSize)(Code)
Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement
Parameters:
  pageSize - Maximum number of records to return
Parameters:
  pageNum - Number of page. Starts with 1. Collection backed by the database. The collection doesn't holdany SQL resources open, neither it keeps any refernces to created objects.It keeps only references to the SQLProcessor, parameterizerand projector. Thus any call to one of collection methods retursn 'fresh' results from the database.Iterators created by this collection open ResultSet and close it whenIterator.hasNext() returns false.



project
public Collection project(String sql, Parameterizer parameterizer, Class theInterface, Object delegate, int pageNum, int pageSize)(Code)
Executes SQL statement and returns collection backed by the database.
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement
Parameters:
  delegate - Object to delegate invocations which didn't match field getters/setters
Parameters:
  pageSize - Maximum number of records to return
Parameters:
  pageNum - Number of page. Starts with 1. Collection backed by the database. The collection doesn't holdany SQL resources open, neither it keeps any refernces to created objects.It keeps only references to the SQLProcessor, parameterizerand projector. Thus any call to one of collection methods retursn 'fresh' results from the database.Iterators created by this collection open ResultSet and close it whenIterator.hasNext() returns false.



project
public Collection project(String sql, Parameterizer parameterizer, Projector projector, Collection receiver) throws SQLException(Code)
Executes SQL statement and puts results to receiver
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects. If it is null then projector which projects row to collection will be used
Parameters:
  receiver - Collection to put results to receiver with added objects. Convenient for calls like Iterator it=processor.project(..., new LinkedList());
throws:
  SQLException -



project
public Collection project(String sql, Parameterizer parameterizer, Class theInterface, Collection receiver) throws SQLException(Code)
Executes SQL statement and puts results to receiver
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement
Parameters:
  receiver - Collection to put results to receiver with added objects. Convenient for calls like Iterator it=processor.project(..., new LinkedList());
throws:
  SQLException -



project
public Collection project(String sql, Parameterizer parameterizer, Class theInterface, Object delegate, Collection receiver) throws SQLException(Code)
Executes SQL statement and puts results to receiver
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  theInterface - Interface to implement
Parameters:
  delegate - Object to delegate invocations which didn't match field getters/setters.
Parameters:
  receiver - Collection to put results to receiver with added objects. Convenient for calls like Iterator it=processor.project(..., new LinkedList());
throws:
  SQLException -



project
public Collection project(String sql, Parameterizer parameterizer, Projector projector, Collection receiver, int pageSize, int pageNum) throws SQLException(Code)
Executes SQL statement and puts results to receiver
Parameters:
  sql - Select statement to execute
Parameters:
  parameterizer - Parameterizer
Parameters:
  projector - Projector which instantiates objects. If it is null thenprojector which projects row to collection will be used.
Parameters:
  receiver - Collection to put results to
Parameters:
  pageSize - Maximum number of records to return
Parameters:
  pageNum - Number of page. Starts with 1. receiver with added objects. Convenient for calls like Iterator it=processor.project(..., new LinkedList());
throws:
  SQLException -



projectSingleBoolean
public boolean projectSingleBoolean(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - boolean value of the first column of the first row or 'false' if there are no rows.
throws:
  SQLException -



projectSingleByte
public byte projectSingleByte(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - byte value of the first column of the first row or 0 if there are no rows.
throws:
  SQLException -



projectSingleBytes
public byte[] projectSingleBytes(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - byte[] value of the first column of the first row or null if there are no rows.
throws:
  SQLException -



projectSingleChar
public char projectSingleChar(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - char value of the first column of the first row or 0 if there are no rows.
throws:
  SQLException -



projectSingleDouble
public double projectSingleDouble(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - double value of the first column of the first row or 0 if there are no rows.
throws:
  SQLException -



projectSingleFloat
public float projectSingleFloat(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - float value of the first column of the first row or 0 if there are no rows.
throws:
  SQLException -



projectSingleInt
public int projectSingleInt(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - int value of the first column of the first row or 0 if there are no rows.
throws:
  SQLException -



projectSingleLong
public long projectSingleLong(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - long value of the first column of the first row or 0 if there are no rows.
throws:
  SQLException -



projectSingleObject
public Object projectSingleObject(String sql, Parameterizer parameterizer, Projector projector) throws SQLException(Code)

Parameters:
  string -
Parameters:
  parameterizer -
Parameters:
  projector - Projector. If it is null then projector which projects row to collection will be used.
throws:
  SQLException -



projectSingleObject
public Object projectSingleObject(String sql, Parameterizer parameterizer, Class theInterface) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - Object representing first row
throws:
  SQLException -



projectSingleObject
public Object projectSingleObject(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - object value of the first column of the first row or null if there are no rows.
throws:
  SQLException -



projectSingleObject
public Object projectSingleObject(String sql, Parameterizer parameterizer, Class theInterface, Object delegate) throws SQLException(Code)

Parameters:
  string -
Parameters:
  parameterizer -
throws:
  SQLException -



projectSingleShort
public short projectSingleShort(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - short value of the first column of the first row or 0 if there are no rows.
throws:
  SQLException -



projectSingleString
public String projectSingleString(String sql, Parameterizer parameterizer) throws SQLException(Code)

Parameters:
  sql -
Parameters:
  parameterizer - String value of the first column of the first row or null if there are no rows.
throws:
  SQLException -



releaseConnection
public void releaseConnection(Connection connection) throws SQLException(Code)
Closes connection if it was provided by DataSource. Does nothing otherwise.
Parameters:
  connection - Connection to release.
throws:
  SQLException -



setTimeIntervalCategory
public void setTimeIntervalCategory(TimeIntervalCategory timeIntervalCategory)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.