This abstrac class is used to convert a database dependant representation of
SQL Error Code to a list of known error codes defined into the interface DAOErrorHandler
Last modified $Date: 2004/05/18 10:50:14 $
Initial Factory for the DAO Pattern
It will locate daofactory.properties file in four differente way:
First:
Test for the system propertie: org.j2ee.dao.factory
and try to open it as File
Usage: java -Dorg.j2ee.dao.factory=file:/tmp/daofactory.properties
Second:
Test for the JNDI name: java:comp/env/daoFactoryProperty
and try to open it as ResourceBoundle class loader spec
Usage (Define it in your ejb-jar.xml):
daoFactoryPropertyjava.lang.Stringmy.pkg.daofactory
Third:
Test in the root classpath
and try to load it using Resource Boundle semantic
Usage: put daofactory.properties in the root classpath of your .jar
Fourth:
Test in the DAO classpath (org.j2ee.dao)
and try to load it using Resource Boundle semantic
Usage: put daofactory.properties in org/j2ee/dao directory of your .jar
Based on an example of book Code Notes for J2EE, Edited by GREGORY BRILL,
e-ISBN 0-679-64727-9
Last modified $Date: 2004/05/18 10:50:12 $
This is concrete implementation for the class
AbstractErrorMapper for DB2 database
provide the transalation method betwen DB2 error codes to the DAOErrorHandler error code list
Last modified $Date: 2004/05/18 10:50:14 $
Execute this action using the given processor
If there are exception, try to conver it with the Error Mapper and then
call to Error Handler of this aciont
Search in factories Map if find a key named "whichFactory", if find
is succefully then compare the object instance, if is a string, then
load class named in this way, otherwise the object is a Factory.
This method must return a valid SQL query, it will receive all the named
parameters defined by the action object plus two aditionals parameters
named firstRow and lastRow representing the values for the window to be select.
Handle the results of update statements.
If the statement is of type SAVE/UPDATE/DELETE (insert, update or delete),
then when the execution of the statement finalize and no exception
occurs, this method is call for handle the results.
Handle the results of load statements.
If the statement is of type LOAD (load),
then when the execution of the statement finalize and no exception
occurs, this method is call for handle the results.
Handle the results of call statements.
If the statement is of type CALL_PROCEDURE or
CALL_FUNCTION, then when the execution of the statement
finalize and no exception occurs, this method is call for handle the
results.
Handle the results of update statements.
If the statement is of type UPDATE (insert, update or delete),
then when the execution of the statement finalize and no exception
occurs, this method is call for handle the results.
Handle the results of query statements.
If the statement is of type SQL_QUERY,HQL_QUERY (select), then when the
execution of the statement finalize and no exception occurs, this
method is call for handle the results.
Handle the results of query statements.
If the statement is of type QUERY (select), then when the
execution of the statement finalize and no exception occurs, this
method is call for handle the results.
This is concrete implementation for the class
AbstractErrorMapper for HSQL database
provide the transalation method betwen HSQL error codes to the DAOErrorHandler error code list
This is concrete implementation for the class
AbstractErrorMapper for Oracle database
provide the transalation method betwen Oracle error codes to the DAOErrorHandler error code list
Last modified $Date: 2004/05/18 10:50:14 $