empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject svn commit: r1378885 - in /empire-db/trunk: empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/records/ empire-db/src/main/java/org/apache/empire/db/
Date Thu, 30 Aug 2012 11:11:48 GMT
Author: doebele
Date: Thu Aug 30 11:11:48 2012
New Revision: 1378885

URL: http://svn.apache.org/viewvc?rev=1378885&view=rev
Log: (empty)

Modified:
    empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/records/SampleRecord.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommandExpr.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
    empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java

Modified: empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/records/SampleRecord.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/records/SampleRecord.java?rev=1378885&r1=1378884&r2=1378885&view=diff
==============================================================================
--- empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/records/SampleRecord.java
(original)
+++ empire-db/trunk/empire-db-examples/empire-db-example-jsf2/src/main/java/org/apache/empire/jsf2/websample/db/records/SampleRecord.java
Thu Aug 30 11:11:48 2012
@@ -31,7 +31,7 @@ public abstract class SampleRecord<T ext
 	protected T T; // The table
 
 	public SampleRecord(T table) {
-		super.init(table, DBRecord.REC_EMTPY, null);
+		super.init(table, DBRecord.REC_INVALID, null);
 		this.T = table;
 	}
 

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommandExpr.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommandExpr.java?rev=1378885&r1=1378884&r2=1378885&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommandExpr.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBCommandExpr.java Thu Aug
30 11:11:48 2012
@@ -135,7 +135,7 @@ public abstract class DBCommandExpr exte
 
         /** Returns the error message: ERR_NOTSUPPORTED */
         @Override
-        public void initRecord(DBRecord rec, Object[] keyValues)
+        public void initRecord(DBRecord rec, int initialState, Object[] keyValues)
         {
             throw new NotSupportedException(this, "initRecord");
         }

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java?rev=1378885&r1=1378884&r2=1378885&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBQuery.java Thu Aug 30 11:11:48
2012
@@ -343,10 +343,10 @@ public class DBQuery extends DBRowSet
      * @param keyValues an array of the primary key columns
      */
     @Override
-    public void initRecord(DBRecord rec, Object[] keyValues)
+    public void initRecord(DBRecord rec, int initialState, Object[] keyValues)
     {
         // Prepare
-        prepareInitRecord(rec, DBRecord.REC_EMTPY, keyValues);
+        prepareInitRecord(rec, initialState, keyValues);
         // Initialize all Fields
         Object[] fields = rec.getFields();
         for (int i = 0; i < fields.length; i++)

Modified: empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
URL: http://svn.apache.org/viewvc/empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java?rev=1378885&r1=1378884&r2=1378885&view=diff
==============================================================================
--- empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java (original)
+++ empire-db/trunk/empire-db/src/main/java/org/apache/empire/db/DBRecord.java Thu Aug 30
11:11:48 2012
@@ -54,7 +54,7 @@ public class DBRecord extends DBRecordDa
      * TODO convert to an enum?
      */
     public static final int REC_INVALID  = -1;
-    public static final int REC_EMTPY    = 0;
+    // public static final int REC_EMTPY    = 0;
     public static final int REC_VALID    = 1;
     public static final int REC_MODIFIED = 2;
     public static final int REC_NEW      = 3;
@@ -609,11 +609,11 @@ public class DBRecord extends DBRecordDa
      * @param keyValues a Object array, the primary key(s)
      * @param insert if true change the state of this object to REC_NEW
      */
+     
     public void init(DBRowSet table, Object[] keyValues, boolean insert)
     { // Init with keys
-        table.initRecord(this, keyValues);
-        if (insert)
-            state = DBRecord.REC_NEW;
+    	int initialState = (insert ? REC_NEW : REC_VALID);  
+        table.initRecord(this, initialState, keyValues);
     }
     
     /**

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=1378885&r1=1378884&r2=1378885&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 Thu Aug 30
11:11:48 2012
@@ -485,10 +485,10 @@ public abstract class DBRowSet extends D
      * @param rec the Record object
      * @param keyValues an array of the primary key columns
      */
-    public void initRecord(DBRecord rec, Object[] keyValues)
+    public void initRecord(DBRecord rec, int initialState, Object[] keyValues)
     {
         // Prepare
-        prepareInitRecord(rec, DBRecord.REC_EMTPY, null);
+        prepareInitRecord(rec, initialState, null);
         // Initialize all Fields
         Object[] fields = rec.getFields();
         for (int i = 0; i < fields.length; i++)



Mime
View raw message