View Javadoc
1 /*** $Id: DAOErrorHandler.java,v 1.1.1.1 2004/05/18 10:50:12 mochoa Exp $ 2 * */ 3 package org.j2ee.dao; 4 5 /*** 6 * List of error code that the application can manage. 7 * Alse defined the method used by the actions to signal to the error handler 8 * about the exception catched 9 * Last modified $Date: 2004/05/18 10:50:12 $ 10 * @version $Revision: 1.1.1.1 $ 11 * @author mochoa (mochoa@users.sourceforge.net) 12 */ 13 public interface DAOErrorHandler { 14 /*** 15 * No, errors 16 */ 17 static final int OK = 0; 18 19 /*** 20 * Load operation fail (Hibernate/Toplink) 21 */ 22 static final int NO_DATA_FOUND = 1; 23 24 /*** 25 * Parent key not found on some columns 26 */ 27 static final int PARENT_KEY_NOT_FOUND = 3; 28 29 /*** 30 * Some check constraint failed 31 */ 32 static final int CHECK_CONSTRAINT_FAILED = 4; 33 34 /*** 35 * Primary key or Unique key constraint failed 36 */ 37 static final int UNIQUE_CONSTRAINT_FAILED = 5; 38 39 /*** 40 * Cannot delete or update due to restrict delete/update constraint failed 41 */ 42 static final int RESTRICT_UPDATE_DELETE = 6; 43 44 /*** 45 * We don't known this error code 46 */ 47 static final int UNKNOWN_ERROR_CODE = -99999; 48 49 /*** 50 * 51 * @param a DAOAction which throw the exception 52 * @param p DAOActionProcessor used the above action 53 * @param e DAOException generated by the action 54 * @param internalErrorCode returned by the error handler 55 * @throws DAOException a new exception generated by the concrete error handler 56 */ 57 void handleError(DAOAction a, DAOActionProcessor p, Throwable e, int internalErrorCode) throws DAOException; 58 59 }

This page was automatically generated by Maven