empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1525521 - /empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
Date Mon, 23 Sep 2013 07:22:02 GMT
Author: doebele
Date: Mon Sep 23 07:22:01 2013
New Revision: 1525521

URL: http://svn.apache.org/r1525521
Log:
EMPIREDB-193
hashCode() implemented for DBRowSet

Modified:
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java

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=1525521&r1=1525520&r2=1525521&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 Mon Sep 23
07:22:01 2013
@@ -179,6 +179,13 @@ public abstract class DBRowSet extends D
         // read the rest
         strm.defaultReadObject();
     }
+    
+    @Override 
+    public int hashCode() 
+    {
+    	String nameWithAlias = getFullName()+"_"+getAlias();
+    	return nameWithAlias.hashCode();
+    }
 
     @Override
     public boolean equals(Object other)
@@ -903,7 +910,7 @@ public abstract class DBRowSet extends D
             DBCommand cmd = db.createCommand();
             for (int i=0; i<parentKey.length; i++)
                 cmd.where(refs[i].getSourceColumn().is(parentKey[i]));
-            if (db.executeSQL(cmd.getDelete((DBTable)this), conn)<0)
+            if (db.executeSQL(cmd.getDelete((DBTable)this), cmd.getParamValues(), conn)<0)
                 throw new UnexpectedReturnValueException(-1, "db.executeSQL()");
         }
         else



Mime
View raw message