Update of /var/cvs/src/org/mmbase/storage/implementation/database
In directory james.mmbase.org:/tmp/cvs-serv16581

Modified Files:
        RelationalDatabaseStorageManager.java 
Log Message:
Added @Override tags


See also: 
http://cvs.mmbase.org/viewcvs/src/org/mmbase/storage/implementation/database


Index: RelationalDatabaseStorageManager.java
===================================================================
RCS file: 
/var/cvs/src/org/mmbase/storage/implementation/database/RelationalDatabaseStorageManager.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- RelationalDatabaseStorageManager.java       9 Oct 2008 09:51:42 -0000       
1.14
+++ RelationalDatabaseStorageManager.java       17 Apr 2009 13:30:46 -0000      
1.15
@@ -22,7 +22,7 @@
  *
  * @author Pierre van Rooden
  * @since MMBase-1.7
- * @version $Id: RelationalDatabaseStorageManager.java,v 1.14 2008/10/09 
09:51:42 michiel Exp $
+ * @version $Id: RelationalDatabaseStorageManager.java,v 1.15 2009/04/17 
13:30:46 michiel Exp $
  */
 public class RelationalDatabaseStorageManager extends DatabaseStorageManager {
 
@@ -32,26 +32,21 @@
     }
 
     // javadoc is inherited
-    public double getVersion() {
+    @Override public double getVersion() {
         return 1.0;
     }
 
-    protected boolean tablesInheritFields() {
+    @Override protected boolean tablesInheritFields() {
         return false;
     }
 
+
     /**
-     * Adds a node to the passed builder and all its parent builders.
-     * @param node The node to insert. The node already needs to have a (new) 
number assigned
-     * @param builder the builder to store the node
-     * @throws StorageException if an error occurred during creation
+     * Actual implementation of {...@link #create(MMObjectNode, 
MMObjectBuilder)} which wraps this in a
+     * transction only, now.
+     * @since MMBase-1.9.1
      */
-    public void create(final MMObjectNode node, final MMObjectBuilder builder) 
throws StorageException {
-        boolean localTransaction = !inTransaction;
-        if (localTransaction) {
-            beginTransaction();
-        }
-        try {
+    protected void simpleCreate(final MMObjectNode node, final MMObjectBuilder 
builder) throws StorageException {
             // insert in parent tables (from parents to childs) (especially 
because foreign keys on object's number may exist)
             for (MMObjectBuilder b : builder.getAncestors()) {
                 for (CoreField f : b.getFields()) {
@@ -63,6 +58,21 @@
                 super.create(node, b);
             }
             super.create(node, builder);
+    }
+
+    /**
+     * Adds a node to the passed builder and all its parent builders.
+     * @param node The node to insert. The node already needs to have a (new) 
number assigned
+     * @param builder the builder to store the node
+     * @throws StorageException if an error occurred during creation
+     */
+    @Override public void create(final MMObjectNode node, final 
MMObjectBuilder builder) throws StorageException {
+        boolean localTransaction = !inTransaction;
+        if (localTransaction) {
+            beginTransaction();
+        }
+        try {
+            simpleCreate(node, builder);
             if (localTransaction) commit();
         } catch (StorageException se) {
             if (localTransaction && inTransaction) rollback();
@@ -76,7 +86,7 @@
      * @param builder the builder to change the node in
      * @throws StorageException if an error occurred during change
      */
-    public void change(MMObjectNode node, MMObjectBuilder builder) throws 
StorageException {
+    @Override public void change(MMObjectNode node, MMObjectBuilder builder) 
throws StorageException {
         boolean localTransaction = !inTransaction;
         if (localTransaction) {
             beginTransaction();
@@ -99,7 +109,7 @@
      * @param builder the builder to delete the node in
      * @throws StorageException if an error occurred during delete
      */
-    public void delete(MMObjectNode node, MMObjectBuilder builder) throws 
StorageException {
+    @Override public void delete(MMObjectNode node, MMObjectBuilder builder) 
throws StorageException {
         boolean localTransaction = !inTransaction;
         if (localTransaction) {
             beginTransaction();
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to