empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1299349 - in /empire-db/trunk: empire-db-codegen/src/main/resources/templates/ empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/ empire-db/src/main/java/org/apache/empire/db/ empire-db/src/m...
Date Sun, 11 Mar 2012 12:03:07 GMT
Author: doebele
Date: Sun Mar 11 12:03:06 2012
New Revision: 1299349

URL: http://svn.apache.org/viewvc?rev=1299349&view=rev
Log:
EMPIREDB-79
New relation property: setOnDeleteAction.
See DBRelation.DBCascadeAction for details.

Added:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java   (with props)
Modified:
    empire-db/trunk/empire-db-codegen/src/main/resources/templates/Table.vm
    empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
    empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvDB.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRelation.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/DatabaseNotOpenException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIllegalValueException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIsReadOnlyException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldNotNullException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueTooLongException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InternalSQLException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InvalidKeyException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/NoPrimaryKeyException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryNoResultException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordDeleteFailedException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordNotFoundException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateFailedException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateInvalidException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanIncompatibleException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanInstantiationException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertyGetException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertySetException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileParseException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileReadException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileWriteException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidArgumentException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidPropertyException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemExistsException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemNotFoundException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotImplementedException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotSupportedException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ObjectNotValidException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/PropertyReadOnlyException.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/UnexpectedReturnValueException.java

Modified: empire-db/trunk/empire-db-codegen/src/main/resources/templates/Table.vm
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-codegen/src/main/resources/templates/Table.vm?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db-codegen/src/main/resources/templates/Table.vm (original)
+++ empire-db/trunk/empire-db-codegen/src/main/resources/templates/Table.vm Sun Mar 11 12:03:06 2012
@@ -68,9 +68,6 @@ public class $parser.getTableClassName($
 		/*no locking column specified*/
 #end
 #end
-
-		// Set cascade delete
-		setCascadeDelete(true);		
 	}
 #if($nestTables == true)
   }

Modified: empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java (original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvApp.java Sun Mar 11 12:03:06 2012
@@ -38,6 +38,7 @@ import org.apache.empire.db.DBReader;
 import org.apache.empire.db.DBRecord;
 import org.apache.empire.db.DBSQLScript;
 import org.apache.empire.db.DBTableColumn;
+import org.apache.empire.db.exceptions.StatementFailedException;
 import org.apache.empire.db.h2.DBDatabaseDriverH2;
 import org.apache.empire.db.postgresql.DBDatabaseDriverPostgreSQL;
 import org.slf4j.Logger;
@@ -142,7 +143,7 @@ public class SampleAdvApp 
             
             // commit
             db.commit(conn);
-
+            
             // STEP 7: read from Employee_Info_View
             System.out.println("--------------------------------------------------------");
             System.out.println("*** read from EMPLOYEE_INFO_VIEW ***");
@@ -193,6 +194,11 @@ public class SampleAdvApp 
             	script.run(db.getDriver(), conn, false);
             }
 
+            // STEP 13: delete records
+            System.out.println("--------------------------------------------------------");
+            System.out.println("*** deleteRecordSample: shows how to delete records (with and without cascade) ***");
+            deleteRecordSample(idEmp3, idSalDep, conn);
+            
             // Done
             System.out.println("--------------------------------------------------------");
             System.out.println("DB Sample Advanced finished successfully.");
@@ -612,6 +618,31 @@ public class SampleAdvApp 
         // Successfully updated
         System.out.println("The employee has been sucessfully updated");
     }    
+    
+    /**
+     * This function demonstrates cascaded deletes.
+     * See DBRelation.setOnDeleteAction()
+     *  
+     * @param idEmployee the id of the employee to delete
+     * @param idDepartment the id of the department to delete
+     * @param conn the connection
+     */
+    private static void deleteRecordSample(int idEmployee, int idDepartment, Connection conn)
+    {
+        db.commit(conn);
+        // Delete an employee
+        // This statement is designed to succeed since cascaded deletes are enabled for this relation.
+        db.T_EMPLOYEES.deleteRecord(idEmployee, conn);
+        System.out.println("The employee has been sucessfully deleted");
+
+        // Delete a department
+        // This statement is designed to fail since cascaded deletes are not on!
+        try {
+            db.T_DEPARTMENTS.deleteRecord(idDepartment, conn);
+        } catch(StatementFailedException e) {
+            System.out.println("Delete of department failed as expected due to existing depending records.");
+        }
+    }
 
     /**
      * This functions prints the results of a query which is performed using the supplied command

Modified: empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvDB.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvDB.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvDB.java (original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-advanced/src/main/java/org/apache/empire/samples/db/advanced/SampleAdvDB.java Sun Mar 11 12:03:06 2012
@@ -280,10 +280,10 @@ public class SampleAdvDB extends DBDatab
     {
         // Create views
         V_EMP_DEP_SINCE_VIEW = new EmployeeDepSinceView(this, T_EMP_DEP_HIST);
-        V_EMPLOYEE_INFO = new EmployeeInfoView(this, T_EMPLOYEES, T_DEPARTMENTS);
+        V_EMPLOYEE_INFO      = new EmployeeInfoView(this, T_EMPLOYEES, T_DEPARTMENTS);
         
         // Define Foreign-Key Relations
-        addRelation( T_EMP_DEP_HIST.C_EMPLOYEE_ID  .referenceOn( T_EMPLOYEES.C_EMPLOYEE_ID ));
+        addRelation( T_EMP_DEP_HIST.C_EMPLOYEE_ID  .referenceOn( T_EMPLOYEES.C_EMPLOYEE_ID )).onDeleteCascade();
         addRelation( T_EMP_DEP_HIST.C_DEPARTMENT_ID.referenceOn( T_DEPARTMENTS.C_DEPARTMENT_ID ));
     }
 

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDDLGenerator.java Sun Mar 11 12:03:06 2012
@@ -459,8 +459,12 @@ public abstract class DBDDLGenerator<T e
             refs[i].getTargetColumn().addSQL(sql, DBExpr.CTX_NAME);
             addSeparator = true;
         }
-        // done
         sql.append(")");
+        // On Delete Action
+        if (r.getOnDeleteAction()==DBRelation.DBCascadeAction.CASCADE)
+        {
+            sql.append(" ON DELETE CASCADE");
+        }
         // done
         addCreateRelationStmt(r, sql, script);
     }

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabase.java Sun Mar 11 12:03:06 2012
@@ -29,10 +29,12 @@ import java.util.List;
 import org.apache.empire.commons.ObjectUtils;
 import org.apache.empire.commons.Options;
 import org.apache.empire.data.DataType;
+import org.apache.empire.db.DBRelation.DBCascadeAction;
 import org.apache.empire.db.exceptions.DatabaseNotOpenException;
 import org.apache.empire.db.exceptions.InternalSQLException;
 import org.apache.empire.db.exceptions.QueryFailedException;
 import org.apache.empire.db.exceptions.QueryNoResultException;
+import org.apache.empire.db.exceptions.StatementFailedException;
 import org.apache.empire.db.expr.column.DBValueExpr;
 import org.apache.empire.exceptions.MiscellaneousErrorException;
 import org.apache.empire.exceptions.InternalException;
@@ -475,14 +477,15 @@ public abstract class DBDatabase extends
      * <P>
      * @param reference a reference for a source and target column pair
      */
-    public final void addRelation(DBRelation.DBReference reference)
+    public final DBRelation addRelation(DBRelation.DBReference reference)
     {
         String table = reference.getSourceColumn().getRowSet().getName();
         String col1 = reference.getSourceColumn().getName();
         // Create Relation Name
-        String name = table.substring(0, Math.min(table.length(), 14)) + "_" + col1.substring(0, Math.min(col1.length(), 12))
-        			  + "_FK";
-        addRelation(name, new DBRelation.DBReference[] { reference });
+        String name = table.substring(0, Math.min(table.length(), 14)) 
+                    + "_" + col1.substring(0, Math.min(col1.length(), 12))
+        			+ "_FK";
+        return addRelation(name, new DBRelation.DBReference[] { reference });
     }
 
     /**
@@ -491,7 +494,7 @@ public abstract class DBDatabase extends
      * @param ref1 a reference for a source and target column pair
      * @param ref2 a reference for a source and target column pair
      */
-    public final void addRelation(DBRelation.DBReference ref1, DBRelation.DBReference ref2)
+    public final DBRelation addRelation(DBRelation.DBReference ref1, DBRelation.DBReference ref2)
     {
         String table = ref1.getSourceColumn().getRowSet().getName();
         String col1 = ref1.getSourceColumn().getName();
@@ -499,8 +502,9 @@ public abstract class DBDatabase extends
         // Create Relation Name
         String name = table.substring(0, Math.min(table.length(), 9))
                     + "_" + col1.substring(0, Math.min(col1.length(), 9))
-                    + "_" + col2.substring(0, Math.min(col2.length(), 9)) + "_FK";
-        addRelation(name, new DBRelation.DBReference[] { ref1, ref2 });
+                    + "_" + col2.substring(0, Math.min(col2.length(), 9))
+                    + "_FK";
+        return addRelation(name, new DBRelation.DBReference[] { ref1, ref2 });
     }
 
     /**
@@ -514,8 +518,11 @@ public abstract class DBDatabase extends
     	// Check
     	if (getRelation(name)!=null)
             throw new ItemExistsException(name); // Relation already exists
+    	// Get default cascade action
+    	DBTable targetTable = (DBTable)references[0].getTargetColumn().getRowSet();
+    	DBCascadeAction deleteAction = (targetTable.isCascadeDelete() ? DBCascadeAction.CASCADE_RECORDS : DBCascadeAction.NONE); 
         // Add a Relation
-        DBRelation relation = new DBRelation(this, name, references);
+        DBRelation relation = new DBRelation(this, name, references, deleteAction);
         if (relations.contains(relation))
             throw new ItemExistsException(name); // Relation already exists
         // Add Reference column to table
@@ -1073,7 +1080,7 @@ public abstract class DBDatabase extends
             
 	    } catch (SQLException sqle) 
         { 	// Error
-            throw new QueryFailedException(this, sqlCmd, sqle);
+            throw new StatementFailedException(this, sqlCmd, sqle);
 	    }    
     }
 

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBDatabaseDriver.java Sun Mar 11 12:03:06 2012
@@ -38,7 +38,6 @@ import org.apache.empire.commons.ObjectU
 import org.apache.empire.commons.StringUtils;
 import org.apache.empire.data.DataMode;
 import org.apache.empire.data.DataType;
-import org.apache.empire.db.DBCmdParam;
 import org.apache.empire.db.exceptions.InternalSQLException;
 import org.apache.empire.exceptions.NotImplementedException;
 import org.apache.empire.exceptions.NotSupportedException;

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRelation.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRelation.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRelation.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRelation.java Sun Mar 11 12:03:06 2012
@@ -27,13 +27,37 @@ import java.io.Serializable;
  */
 public class DBRelation extends DBObject
 {
-  private final static long serialVersionUID = 1L;
+    private final static long serialVersionUID = 1L;
+    
+    /**
+     * DBCascadeAction enum
+     * <pre>
+     * This enum specifies options for a relation when deleting records
+     * (see DBRelation.setOnDeleteAction)
+     *  
+     * - NONE:    No Action is performed and the operation will fail if depending records exist.
+     * 
+     * - CASCADE: Delete (or update) any depending records. This action will be performed by the database and thus 
+     *            the option "ON DELETE CASCADE" is added to the DDL generated for the relation. 
+     * 
+     * - CASCADE_RECORDS: This option allows to handle the cascade in code. All depending records will be selected
+     *            by the framework and for each record DBRowSet.deleteRecord() will be called. 
+     *            The option "ON DELETE CASCADE" will NOT be added to the DDL generated for the relation. 
+     * 
+     * </pre>
+     */
+    public static enum DBCascadeAction
+    {
+        NONE,
+        CASCADE,
+        CASCADE_RECORDS
+    }
 
 	public static class DBReference implements Serializable
 	{
-      private final static long serialVersionUID = 1L;
+	    private final static long serialVersionUID = 1L;
 	    private DBTableColumn sourceColumn;
-      private DBTableColumn targetColumn;
+	    private DBTableColumn targetColumn;
 	    
 	    public DBReference(DBTableColumn sourceColumn, DBTableColumn targetColumn)
 	    {
@@ -56,6 +80,7 @@ public class DBRelation extends DBObject
     private DBDatabase    db;
     private String        name;
     private DBReference[] references;
+    private DBCascadeAction onDeleteAction;
 
     /**
      * Creates a DBRelation object for a foreing key relation.
@@ -63,13 +88,27 @@ public class DBRelation extends DBObject
      * @param db the database object
      * @param name the name
      * @param references the references for this relation
+     * @param onDeleteAction specifies the action performed when deleting affected records.
      */
-	public DBRelation(DBDatabase db, String name, DBReference[] references)
+	public DBRelation(DBDatabase db, String name, DBReference[] references, DBCascadeAction onDeleteAction)
 	{
 	   this.db         = db;
 	   this.name       = name;
 	   this.references = references;
+	   this.onDeleteAction = onDeleteAction;
 	}
+
+    /**
+     * Creates a DBRelation object for a foreing key relation.
+     * 
+     * @param db the database object
+     * @param name the name
+     * @param references the references for this relation
+     */
+    public DBRelation(DBDatabase db, String name, DBReference[] references)
+    {
+       this(db, name, references, DBCascadeAction.NONE);
+    }
 	
     /**
      * Returns the name.
@@ -107,5 +146,51 @@ public class DBRelation extends DBObject
     {
         return db;
     }
+    
+    /**
+     * return the action to perform when deleting affected records.
+     * See DBCascadeAction enum for details.
+     *
+     * @return the action to perform when deleting affected records
+     */
+    public DBCascadeAction getOnDeleteAction()
+    {
+        return onDeleteAction;
+    }
+
+    /**
+     * sets the action taken when deleting records that affect this foreign key relation
+     * See DBCascadeAction enum for details.
+     *
+     * @param onDeleteAction the action to perform when deleting affected records
+     */
+    public void setOnDeleteAction(DBCascadeAction onDeleteAction)
+    {
+        this.onDeleteAction = onDeleteAction;
+    }
+
+    /**
+     * short for 
+     * <pre> 
+     *  setOnDeleteAction(DBCascadeAction.CASCADE);
+     * </pre>
+     * See DBCascadeAction enum for details.
+     */
+    public void onDeleteCascade()
+    {
+        setOnDeleteAction(DBCascadeAction.CASCADE);
+    }
+
+    /**
+     * short for 
+     * <pre> 
+     *  setOnDeleteAction(DBCascadeAction.CASCADE);
+     * </pre>
+     * See DBCascadeAction enum for details.
+     */
+    public void onDeleteCascadeRecords()
+    {
+        setOnDeleteAction(DBCascadeAction.CASCADE_RECORDS);
+    }
 
 }
\ No newline at end of file

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java Sun Mar 11 12:03:06 2012
@@ -30,6 +30,7 @@ import org.apache.empire.commons.ObjectU
 import org.apache.empire.commons.StringUtils;
 import org.apache.empire.data.Column;
 import org.apache.empire.data.DataType;
+import org.apache.empire.db.DBRelation.DBCascadeAction;
 import org.apache.empire.db.DBRelation.DBReference;
 import org.apache.empire.db.exceptions.FieldNotNullException;
 import org.apache.empire.db.exceptions.NoPrimaryKeyException;
@@ -754,7 +755,10 @@ public abstract class DBRowSet extends D
             return; // No primary key - no references!
         // Find all relations
         for (DBRelation rel : relations)
-        {   // References
+        {   // Check cascade
+            if (rel.getOnDeleteAction()!=DBCascadeAction.CASCADE_RECORDS)
+                continue;
+            // References
             DBReference[] refs = rel.getReferences();
             for (int i=0; i<refs.length; i++)
             {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBTable.java Sun Mar 11 12:03:06 2012
@@ -430,9 +430,12 @@ public class DBTable extends DBRowSet im
     }
 
     /**
-     * Returns true if cascaded deletes are enabled or false otherwise.
-     *  
-     * @return true if cascade deletes are enabled
+     * @deprecated
+     * Deprecated flag that indicates whether cascaded deletes are enabled on this table.
+     * This property will be removed in future releases.
+     * Use DBRelation.getOnDeleteAction() instead.
+     * 
+     * @return true if cascade deletes (DBRelation.DBCascadeAction.CASCADE_RECORDS) are enabled
      */
     public boolean isCascadeDelete()
     {
@@ -440,9 +443,13 @@ public class DBTable extends DBRowSet im
     }
 
     /**
-     * Sets true if delete records will.
+     * @deprecated
+     * Deprecated flag that enables cascaded deletes on foreign key relations.
+     * WARING: The flag only affects newly created relations referring to this table.   
+     * This property will be removed in future releases.
+     * Use DBRelation.setOnDeleteAction() instead.
      *  
-     * @param cascadeDelete use cascade deletes or not
+     * @param cascadeDelete use cascade deletes (DBRelation.DBCascadeAction.CASCADE_RECORDS)
      */
     public void setCascadeDelete(boolean cascadeDelete)
     {
@@ -470,8 +477,7 @@ public class DBTable extends DBRowSet im
             throw new InvalidArgumentException("key", key);
 
         // Delete References
-        if (isCascadeDelete())
-            deleteAllReferences(key, conn);
+        deleteAllReferences(key, conn);
         
         // Build SQL-Statement
         DBCommand cmd = db.createCommand();

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/DatabaseNotOpenException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/DatabaseNotOpenException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/DatabaseNotOpenException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/DatabaseNotOpenException.java Sun Mar 11 12:03:06 2012
@@ -30,7 +30,7 @@ public class DatabaseNotOpenException ex
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.databasenotopen",    "the database {0} has not been opened.");
+    public static final ErrorType errorType = new ErrorType("error.db.databaseNotOpen",    "the database {0} has not been opened.");
     
     public DatabaseNotOpenException(DBDatabase db)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIllegalValueException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIllegalValueException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIllegalValueException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIllegalValueException.java Sun Mar 11 12:03:06 2012
@@ -28,7 +28,7 @@ public class FieldIllegalValueException 
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.fieldillegalvalue",  "The value {1} for field {0} is invalid.");
+    public static final ErrorType errorType = new ErrorType("error.db.fieldIllegalValue",  "The value {1} for field {0} is invalid.");
     
     public FieldIllegalValueException(DBColumn column, String value, Throwable cause)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIsReadOnlyException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIsReadOnlyException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIsReadOnlyException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldIsReadOnlyException.java Sun Mar 11 12:03:06 2012
@@ -29,7 +29,7 @@ public class FieldIsReadOnlyException ex
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.fieldisreadonly",    "The field {0} is read only.");
+    public static final ErrorType errorType = new ErrorType("error.db.fieldIsReadOnly",    "The field {0} is read only.");
     
     public FieldIsReadOnlyException(DBColumn col)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldNotNullException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldNotNullException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldNotNullException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldNotNullException.java Sun Mar 11 12:03:06 2012
@@ -29,7 +29,7 @@ public class FieldNotNullException exten
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.fieldnotnull",       "The field {0} must not be null.");
+    public static final ErrorType errorType = new ErrorType("error.db.fieldNotNull",       "The field {0} must not be null.");
     
     public FieldNotNullException(DBColumn col)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueTooLongException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueTooLongException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueTooLongException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/FieldValueTooLongException.java Sun Mar 11 12:03:06 2012
@@ -29,7 +29,7 @@ public class FieldValueTooLongException 
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.fieldvaluetoolong",  "The value supplied for field {0} is too long. The maximum number of characters is {1}.");
+    public static final ErrorType errorType = new ErrorType("error.db.fieldValueTooLong",  "The value supplied for field {0} is too long. The maximum number of characters is {1}.");
     
     public FieldValueTooLongException(DBColumn col)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InternalSQLException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InternalSQLException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InternalSQLException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InternalSQLException.java Sun Mar 11 12:03:06 2012
@@ -32,7 +32,7 @@ public class InternalSQLException extend
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.sqlexception", "The database operation failed. Native error is {0}.");
+    public static final ErrorType errorType = new ErrorType("error.db.sqlException", "The database operation failed. Native error is: {0}");
 
     protected static String messageFromSQLException(DBDatabaseDriver driver, SQLException sqle)
     {   // Set the error Message

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InvalidKeyException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InvalidKeyException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InvalidKeyException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/InvalidKeyException.java Sun Mar 11 12:03:06 2012
@@ -30,7 +30,7 @@ public class InvalidKeyException extends
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.recordinvalidkey",   "Invalid record key {0} for rowset {1}.");
+    public static final ErrorType errorType = new ErrorType("error.db.recordInvalidKey",   "Invalid record key {0} for rowset {1}.");
     
     public InvalidKeyException(DBRowSet rowset, Object[] key)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/NoPrimaryKeyException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/NoPrimaryKeyException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/NoPrimaryKeyException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/NoPrimaryKeyException.java Sun Mar 11 12:03:06 2012
@@ -30,7 +30,7 @@ public class NoPrimaryKeyException exten
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.noprimarykey", "No primary key is defined for {0}.");
+    public static final ErrorType errorType = new ErrorType("error.db.noPrimaryKey", "No primary key is defined for {0}.");
     
     public NoPrimaryKeyException(DBRowSet rowset)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java Sun Mar 11 12:03:06 2012
@@ -22,11 +22,10 @@ import java.sql.SQLException;
 
 import org.apache.empire.commons.ErrorType;
 import org.apache.empire.db.DBObject;
-import org.apache.empire.exceptions.EmpireException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class QueryFailedException extends EmpireException
+public class QueryFailedException extends InternalSQLException
 {
     // Logger
     private static final Logger log = LoggerFactory.getLogger(QueryFailedException.class);
@@ -36,11 +35,12 @@ public class QueryFailedException extend
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.queryfailed",  "Error executing query {0}.\r\nNative error is {0}.");
+    @SuppressWarnings("hiding")
+    public static final ErrorType errorType = new ErrorType("error.db.queryFailed",  "Error executing query {0}.\r\nNative error is: {1}");
     
     public QueryFailedException(DBObject obj, String sqlCmd, SQLException cause)
     {
-        super(errorType, new String[] { sqlCmd, InternalSQLException.messageFromSQLException(InternalSQLException.driverFromObject(obj), cause) }, cause);
+        super(QueryFailedException.errorType, new String[] { sqlCmd, messageFromSQLException(driverFromObject(obj), cause) }, cause);
     }
     
     /**

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryNoResultException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryNoResultException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryNoResultException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryNoResultException.java Sun Mar 11 12:03:06 2012
@@ -28,7 +28,7 @@ public class QueryNoResultException exte
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.querynoresult",  "No records found for query {0}.");
+    public static final ErrorType errorType = new ErrorType("error.db.queryNoResult",  "No records found for query {0}.");
     
     public QueryNoResultException(String sqlCmd)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordDeleteFailedException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordDeleteFailedException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordDeleteFailedException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordDeleteFailedException.java Sun Mar 11 12:03:06 2012
@@ -30,7 +30,7 @@ public class RecordDeleteFailedException
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.recorddeletefailed", "Deleting the record {0} in {1} failed. The record might have been deleted already by another user.");
+    public static final ErrorType errorType = new ErrorType("error.db.recordDeleteFailed", "Deleting the record {0} in {1} failed. The record might have been deleted already by another user.");
     
     public RecordDeleteFailedException(DBRowSet rowset, Object[] key)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordNotFoundException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordNotFoundException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordNotFoundException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordNotFoundException.java Sun Mar 11 12:03:06 2012
@@ -30,7 +30,7 @@ public class RecordNotFoundException ext
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.recordnotfound", "The record {0} does not exist in {1}. It might have been deleted by another user.");
+    public static final ErrorType errorType = new ErrorType("error.db.recordNotFound", "The record {0} does not exist in {1}. It might have been deleted by another user.");
     
     public RecordNotFoundException(DBRowSet rowset, Object[] key)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateFailedException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateFailedException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateFailedException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateFailedException.java Sun Mar 11 12:03:06 2012
@@ -30,7 +30,7 @@ public class RecordUpdateFailedException
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.recordupateinvalid", "Updating the record {0} in {1} failed. The given record key is ambiguous.");
+    public static final ErrorType errorType = new ErrorType("error.db.recordUpateInvalid", "Updating the record {0} in {1} failed. The given record key is ambiguous.");
     
     public RecordUpdateFailedException(DBRowSet rowset, Object[] key)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateInvalidException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateInvalidException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateInvalidException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/RecordUpdateInvalidException.java Sun Mar 11 12:03:06 2012
@@ -30,7 +30,7 @@ public class RecordUpdateInvalidExceptio
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.db.recordupatefailed",  "Updating the record {0} in {1} failed. It might have been changed or deleted by another user.");
+    public static final ErrorType errorType = new ErrorType("error.db.recordUpateFailed",  "Updating the record {0} in {1} failed. It might have been changed or deleted by another user.");
     
     public RecordUpdateInvalidException(DBRowSet rowset, Object[] key)
     {

Added: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java?rev=1299349&view=auto
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java (added)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java Sun Mar 11 12:03:06 2012
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.empire.db.exceptions;
+
+import java.sql.SQLException;
+
+import org.apache.empire.commons.ErrorType;
+import org.apache.empire.db.DBObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class StatementFailedException extends InternalSQLException
+{
+    // Logger
+    private static final Logger log = LoggerFactory.getLogger(StatementFailedException.class);
+    
+    /**
+     * Comment for <code>serialVersionUID</code>
+     */
+    private static final long serialVersionUID = 1L;
+    
+    @SuppressWarnings("hiding")
+    public static final ErrorType errorType = new ErrorType("error.db.statementFailed",  "Error executing statement {0}.\r\nNative error is: {1}");
+    
+    public StatementFailedException(DBObject obj, String sqlCmd, SQLException cause)
+    {
+        super(StatementFailedException.errorType, new String[] { sqlCmd, messageFromSQLException(driverFromObject(obj), cause) }, cause);
+    }
+    
+    /**
+     * log the error
+     */
+    @Override
+    protected void log()
+    {
+       if ( log.isErrorEnabled() )
+            log.error(getMessage());
+       else
+           super.log();
+    }
+}

Propchange: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java
------------------------------------------------------------------------------
    eol-style = native

Propchange: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanIncompatibleException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanIncompatibleException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanIncompatibleException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanIncompatibleException.java Sun Mar 11 12:03:06 2012
@@ -28,7 +28,7 @@ public class BeanIncompatibleException e
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.BeanIncompatible", "The class {0} is not compatible with {1}.");
+    public static final ErrorType errorType = new ErrorType("error.beanIncompatible", "The class {0} is not compatible with {1}.");
     
     public BeanIncompatibleException(Class<?> clazz, DBRowSet rowset)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanInstantiationException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanInstantiationException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanInstantiationException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanInstantiationException.java Sun Mar 11 12:03:06 2012
@@ -32,7 +32,7 @@ public class BeanInstantiationException 
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.BeanInstantiation", "Unable create an instance of type {0}.");
+    public static final ErrorType errorType = new ErrorType("error.beanInstantiationFailed", "Unable create an instance of type {0}.");
     
     public BeanInstantiationException(Class<?> clazz, Throwable cause)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertyGetException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertyGetException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertyGetException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertyGetException.java Sun Mar 11 12:03:06 2012
@@ -32,7 +32,7 @@ public class BeanPropertyGetException ex
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.PropertyGet", "Unable to get the property {0} from type {1}.");
+    public static final ErrorType errorType = new ErrorType("error.propertyGetError", "Unable to get the property {0} from type {1}.");
     
     public BeanPropertyGetException(Object bean, String property, Throwable cause)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertySetException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertySetException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertySetException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/BeanPropertySetException.java Sun Mar 11 12:03:06 2012
@@ -32,7 +32,7 @@ public class BeanPropertySetException ex
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.PropertySet", "The property {0} cannot be set on type {1}.");
+    public static final ErrorType errorType = new ErrorType("error.propertySetError", "The property {0} cannot be set on type {1}.");
     
     public BeanPropertySetException(Object bean, String property, Throwable cause)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileParseException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileParseException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileParseException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileParseException.java Sun Mar 11 12:03:06 2012
@@ -27,7 +27,7 @@ public class FileParseException extends 
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.FileParseException", "The file {0} has an invalid format.");
+    public static final ErrorType errorType = new ErrorType("error.fileParseError", "The file {0} has an invalid format.");
     
     public FileParseException(String fileName, Exception cause)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileReadException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileReadException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileReadException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileReadException.java Sun Mar 11 12:03:06 2012
@@ -29,7 +29,7 @@ public class FileReadException extends E
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.FileReadException", "Error reading the file {0}. Message is: {1}.");
+    public static final ErrorType errorType = new ErrorType("error.fileReadError", "Error reading the file {0}. Message is: {1}.");
     
     public FileReadException(String fileName, IOException cause)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileWriteException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileWriteException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileWriteException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/FileWriteException.java Sun Mar 11 12:03:06 2012
@@ -29,7 +29,7 @@ public class FileWriteException extends 
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.FileWriteException", "Error writing the file {0}. Message is: {1}.");
+    public static final ErrorType errorType = new ErrorType("error.fileWriteError", "Error writing the file {0}. Message is: {1}.");
     
     public FileWriteException(String fileName, IOException cause)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidArgumentException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidArgumentException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidArgumentException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidArgumentException.java Sun Mar 11 12:03:06 2012
@@ -28,7 +28,7 @@ public class InvalidArgumentException ex
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.invalidarg", "Invalid Argument {0} for parameter {1}.");
+    public static final ErrorType errorType = new ErrorType("error.invalidArgument", "Invalid Argument {0} for parameter {1}.");
     
     public InvalidArgumentException(String param, Object value)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidPropertyException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidPropertyException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidPropertyException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/InvalidPropertyException.java Sun Mar 11 12:03:06 2012
@@ -28,7 +28,7 @@ public class InvalidPropertyException ex
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.PropertyInvalid", "The property {0} is not valid. Current value is {1}.");
+    public static final ErrorType errorType = new ErrorType("error.propertyInvalid", "The property {0} is not valid. Current value is {1}.");
     
     public InvalidPropertyException(String property, Object value)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemExistsException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemExistsException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemExistsException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemExistsException.java Sun Mar 11 12:03:06 2012
@@ -28,7 +28,7 @@ public class ItemExistsException extends
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.itemexists", "The element {0} already exists.");
+    public static final ErrorType errorType = new ErrorType("error.itemExists", "The element {0} already exists.");
     
     public ItemExistsException(Object item)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemNotFoundException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemNotFoundException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemNotFoundException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ItemNotFoundException.java Sun Mar 11 12:03:06 2012
@@ -28,7 +28,7 @@ public class ItemNotFoundException exten
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.itemnotfound", "The element {0} was not found.");
+    public static final ErrorType errorType = new ErrorType("error.itemNotFound", "The element {0} was not found.");
     
     public ItemNotFoundException(Object item)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotImplementedException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotImplementedException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotImplementedException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotImplementedException.java Sun Mar 11 12:03:06 2012
@@ -27,7 +27,7 @@ public class NotImplementedException ext
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.notimplemented", "The function {0} is not implemented for type {1}.");
+    public static final ErrorType errorType = new ErrorType("error.notImplemented", "The function {0} is not implemented for type {1}.");
     
     public NotImplementedException(Object object, String functionName)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotSupportedException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotSupportedException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotSupportedException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/NotSupportedException.java Sun Mar 11 12:03:06 2012
@@ -27,7 +27,7 @@ public class NotSupportedException exten
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.notsupported", "The function {0} is not supported for type {1}.");
+    public static final ErrorType errorType = new ErrorType("error.notSupported", "The function {0} is not supported for type {1}.");
     
     public NotSupportedException(Object object, String functionName)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ObjectNotValidException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ObjectNotValidException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ObjectNotValidException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/ObjectNotValidException.java Sun Mar 11 12:03:06 2012
@@ -27,7 +27,7 @@ public class ObjectNotValidException ext
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.objectnotvalid", "The object of type {0} has not been initialized.");
+    public static final ErrorType errorType = new ErrorType("error.objectNotValid", "The object of type {0} has not been initialized.");
     
     public ObjectNotValidException(Object obj)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/PropertyReadOnlyException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/PropertyReadOnlyException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/PropertyReadOnlyException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/PropertyReadOnlyException.java Sun Mar 11 12:03:06 2012
@@ -27,7 +27,7 @@ public class PropertyReadOnlyException e
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.PropertyReadOnly", "The property {0} is read only.");
+    public static final ErrorType errorType = new ErrorType("error.propertyIsReadOnly", "The property {0} is read only.");
     
     public PropertyReadOnlyException(String property)
     {

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/UnexpectedReturnValueException.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/UnexpectedReturnValueException.java?rev=1299349&r1=1299348&r2=1299349&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/UnexpectedReturnValueException.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/exceptions/UnexpectedReturnValueException.java Sun Mar 11 12:03:06 2012
@@ -28,7 +28,7 @@ public class UnexpectedReturnValueExcept
      */
     private static final long serialVersionUID = 1L;
     
-    public static final ErrorType errorType = new ErrorType("error.UnexpectedReturnValueException", "Unexpected return value {0} for function {1}.");
+    public static final ErrorType errorType = new ErrorType("error.unexpectedReturnValue", "Unexpected return value {0} for function {1}.");
     
     public UnexpectedReturnValueException(Object value, String function)
     {



Mime
View raw message