|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.j2ee.dao.util.GenericErrorHandler
This class is a Generic ErrorHandler setted by default by AbstractHibernateDAOAction and AbstractJdbcDAOAction as Error Handler. You can extend this class to provided custonized behaviour for the list of catched exceptions. Last modified $Date: 2004/05/18 10:50:17 $
and
,
AbstractJdbcDAOAction
Field Summary |
---|
Fields inherited from interface org.j2ee.dao.DAOErrorHandler |
---|
CHECK_CONSTRAINT_FAILED, NO_DATA_FOUND, OK, PARENT_KEY_NOT_FOUND, RESTRICT_UPDATE_DELETE, UNIQUE_CONSTRAINT_FAILED, UNKNOWN_ERROR_CODE |
Constructor Summary | |
---|---|
GenericErrorHandler()
|
Method Summary | |
---|---|
void |
checkConstraintFailed(org.j2ee.dao.DAOAction d,
org.j2ee.dao.DAOActionProcessor p,
java.lang.Throwable e)
raised when some check constraint fail |
void |
handleError(org.j2ee.dao.DAOAction d,
org.j2ee.dao.DAOActionProcessor p,
java.lang.Throwable e,
int internalErrorCode)
|
void |
noDataFound(org.j2ee.dao.DAOAction d,
org.j2ee.dao.DAOActionProcessor p,
java.lang.Throwable e)
raised when Hibernate or Toplink methed Load fail (Not Applicable for JDBC) |
void |
parentKeyNotFound(org.j2ee.dao.DAOAction d,
org.j2ee.dao.DAOActionProcessor p,
java.lang.Throwable e)
raised when the parent key not found |
void |
restrictUpdateDelete(org.j2ee.dao.DAOAction d,
org.j2ee.dao.DAOActionProcessor p,
java.lang.Throwable e)
raised when you try to delete or update and the foreign key fail. |
void |
uniqueConstraintFailed(org.j2ee.dao.DAOAction d,
org.j2ee.dao.DAOActionProcessor p,
java.lang.Throwable e)
raised when some unique constraint fail |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GenericErrorHandler()
Method Detail |
public void noDataFound(org.j2ee.dao.DAOAction d, org.j2ee.dao.DAOActionProcessor p, java.lang.Throwable e) throws DAOException
d
- (The action, which throw the exception)p
- (The current processor, usefull if you want tray to execute some action)e
- (Original exception, the SQLException or Hibernate Exception is available through e.getCause()
DAOException
DAOException
public void parentKeyNotFound(org.j2ee.dao.DAOAction d, org.j2ee.dao.DAOActionProcessor p, java.lang.Throwable e) throws DAOException
d
- (The action, which throw the exception)p
- (The current processor, usefull if you want tray to execute some action)e
- (Original exception, the SQLException or Hibernate Exception is available through e.getCause()
DAOException
DAOException
public void checkConstraintFailed(org.j2ee.dao.DAOAction d, org.j2ee.dao.DAOActionProcessor p, java.lang.Throwable e) throws DAOException
d
- (The action, which throw the exception)p
- (The current processor, usefull if you want tray to execute some action)e
- (Original exception, the SQLException or Hibernate Exception is available through e.getCause()
DAOException
DAOException
public void uniqueConstraintFailed(org.j2ee.dao.DAOAction d, org.j2ee.dao.DAOActionProcessor p, java.lang.Throwable e) throws DAOException
d
- (The action, which throw the exception)p
- (The current processor, usefull if you want tray to execute some action)e
- (Original exception, the SQLException or Hibernate Exception is available through e.getCause()
DAOException
DAOException
public void restrictUpdateDelete(org.j2ee.dao.DAOAction d, org.j2ee.dao.DAOActionProcessor p, java.lang.Throwable e) throws DAOException
d
- (The action, which throw the exception)p
- (The current processor, usefull if you want tray to execute some action)e
- (Original exception, the SQLException or Hibernate Exception is available through e.getCause()
DAOException
DAOException
public void handleError(org.j2ee.dao.DAOAction d, org.j2ee.dao.DAOActionProcessor p, java.lang.Throwable e, int internalErrorCode) throws DAOException
handleError
in interface DAOErrorHandler
d
- DAOAction which throw the exceptionp
- DAOActionProcessor used the above actione
- DAOException generated by the actioninternalErrorCode
- returned by the error handler
DAOException
- a new exception generated by the concrete error handler
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |