org.j2ee.dao
Interface DAOErrorHandler

All Known Implementing Classes:
GenericErrorHandler

public interface DAOErrorHandler

List of error code that the application can manage. Alse defined the method used by the actions to signal to the error handler about the exception catched Last modified $Date: 2004/05/18 10:50:12 $

Version:
$Revision: 1.1.1.1 $
Author:
mochoa (mochoa@users.sourceforge.net)

Field Summary
static int CHECK_CONSTRAINT_FAILED
          Some check constraint failed
static int NO_DATA_FOUND
          Load operation fail (Hibernate/Toplink)
static int OK
          No, errors
static int PARENT_KEY_NOT_FOUND
          Parent key not found on some columns
static int RESTRICT_UPDATE_DELETE
          Cannot delete or update due to restrict delete/update constraint failed
static int UNIQUE_CONSTRAINT_FAILED
          Primary key or Unique key constraint failed
static int UNKNOWN_ERROR_CODE
          We don't known this error code
 
Method Summary
 void handleError(org.j2ee.dao.DAOAction a, org.j2ee.dao.DAOActionProcessor p, java.lang.Throwable e, int internalErrorCode)
           
 

Field Detail

OK

public static final int OK
No, errors

See Also:
Constant Field Values

NO_DATA_FOUND

public static final int NO_DATA_FOUND
Load operation fail (Hibernate/Toplink)

See Also:
Constant Field Values

PARENT_KEY_NOT_FOUND

public static final int PARENT_KEY_NOT_FOUND
Parent key not found on some columns

See Also:
Constant Field Values

CHECK_CONSTRAINT_FAILED

public static final int CHECK_CONSTRAINT_FAILED
Some check constraint failed

See Also:
Constant Field Values

UNIQUE_CONSTRAINT_FAILED

public static final int UNIQUE_CONSTRAINT_FAILED
Primary key or Unique key constraint failed

See Also:
Constant Field Values

RESTRICT_UPDATE_DELETE

public static final int RESTRICT_UPDATE_DELETE
Cannot delete or update due to restrict delete/update constraint failed

See Also:
Constant Field Values

UNKNOWN_ERROR_CODE

public static final int UNKNOWN_ERROR_CODE
We don't known this error code

See Also:
Constant Field Values
Method Detail

handleError

public void handleError(org.j2ee.dao.DAOAction a,
                        org.j2ee.dao.DAOActionProcessor p,
                        java.lang.Throwable e,
                        int internalErrorCode)
                 throws DAOException
Parameters:
a - DAOAction which throw the exception
p - DAOActionProcessor used the above action
e - DAOException generated by the action
internalErrorCode - returned by the error handler
Throws:
DAOException - a new exception generated by the concrete error handler


Copyright © 2004 DAO Action Patterm. All Rights Reserved.