<?php

require_once 'common/BaseException.php';

/**
 * Orm Exception class.
 * 
 * It's the common place to add any special feature regarding Exceptions.
 * Also, simplifies package usage, being the only type of Exception that
 * must be returned.
 * <br />
 * Codes (according to PHP Exceptions) are defined for know internal 
 * ORMExceptions (as in <em>BaseException</em>).
 * 
 * @author  $Author: pruna $
 * @package orm
 * @version $Revision: 1.3 $
 * @created 02-Apr-2005
 * @modified $Date: 2005/12/06 02:56:45 $
 */
class OrmException extends BaseException {
    
    /**
     * @const 
     */
    const CODE_DB_CONNECTION_ERROR = 1;
    
    /**
     * @const 
     */
    const CODE_QUERY_ERROR = 2;
    
    /**
     * @const 
     */
    const CODE_ID_GENERATION_ERROR = 3;
    
    /**
     * @const 
     */
    const CODE_UNEXISTANT_ID = 4;
    
    /**
     * @const 
     */
    const CODE_MULTIPLE_ROWS_FOR_ID = 5;
    
    /**
     * @const 
     */
    const CODE_BACK_REFERENCE_ERROR = 6;
    
    /**
     * @const 
     */
    const CODE_DB_TRANSACTION_MISMATCH = 7;
    
    /**
     * @const 
     */
    const CODE_DB_TRANSACTION_PENDING = 8;
    
    /**
     * @const 
     */
    const CODE_MISSING_PIVOT_COLUMN_PK = 9;
    
}

?>