This is an automated email from the ASF dual-hosted git repository.

doebele pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git


The following commit(s) were added to refs/heads/master by this push:
     new a7074545 Revert "EMPIREDB-456"
a7074545 is described below

commit a70745458863f6cc45c1319a6c5352c045d232aa
Author: Rainer Döbele <[email protected]>
AuthorDate: Fri Mar 21 07:58:07 2025 +0100

    Revert "EMPIREDB-456"
    
    This reverts commit 13943507b322773d4e170c5b25040a91989ff822.
---
 .../src/main/java/org/apache/empire/data/RecordData.java     | 10 +---------
 .../java/org/apache/empire/data/bean/BeanRecordProxy.java    |  9 ---------
 .../main/java/org/apache/empire/data/list/DataListEntry.java | 12 +-----------
 empire-db/src/main/java/org/apache/empire/db/DBReader.java   |  9 ---------
 .../src/main/java/org/apache/empire/db/DBRecordBase.java     |  1 -
 5 files changed, 2 insertions(+), 39 deletions(-)

diff --git a/empire-db/src/main/java/org/apache/empire/data/RecordData.java 
b/empire-db/src/main/java/org/apache/empire/data/RecordData.java
index 278be464..4400344c 100644
--- a/empire-db/src/main/java/org/apache/empire/data/RecordData.java
+++ b/empire-db/src/main/java/org/apache/empire/data/RecordData.java
@@ -71,14 +71,6 @@ public interface RecordData
      * @return the record value for the given column
      */
     Object get(ColumnExpr column);
-
-    /**
-     * checks if the field at the given index position is valid.
-     * This is useful for partial loading to check whether a value has been 
fetched 
-     * @param index the field index
-     * @return true if the field value is available or false otherwise
-     */
-    boolean isValueValid(int index);
     
     /**
      * checks if the field at the given index position contains no value 
(null) 
@@ -94,7 +86,7 @@ public interface RecordData
      * @return true if the value for the column is null or false otherwise
      */
     boolean isNull(ColumnExpr column);
-    
+
     // ------- Java Bean Support -------
 
     /**
diff --git 
a/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java 
b/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
index eb165ec7..94adadaf 100644
--- a/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
+++ b/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
@@ -240,15 +240,6 @@ public class BeanRecordProxy<T> implements Record
         return get(getColumn(index));
     }
 
-    @Override
-    public boolean isValueValid(int index)
-    {   // Check state
-        if (index < 0 || index >= columns.size())
-            return false;
-        // Always valid
-        return true;
-    }
-
     @Override
     public boolean isNull(ColumnExpr column)
     {
diff --git 
a/empire-db/src/main/java/org/apache/empire/data/list/DataListEntry.java 
b/empire-db/src/main/java/org/apache/empire/data/list/DataListEntry.java
index 3837f4ae..c6e01907 100644
--- a/empire-db/src/main/java/org/apache/empire/data/list/DataListEntry.java
+++ b/empire-db/src/main/java/org/apache/empire/data/list/DataListEntry.java
@@ -141,8 +141,7 @@ public class DataListEntry implements RecordData, 
Serializable
                 continue;
             // update
             try {
-                if (recData.isValueValid(ri))
-                    values[i] = recData.getValue(ri);
+                values[i] = recData.getValue(ri);
             } catch(Exception e) {
                 log.error("Failed to update value for column {}", 
cols[i].getName());
             }
@@ -201,15 +200,6 @@ public class DataListEntry implements RecordData, 
Serializable
             throw new InvalidArgumentException("index", index);
         return values[index];
     }
-
-    @Override
-    public boolean isValueValid(int index)
-    {   // Check state
-        if (index<0 || index>=values.length)
-            return false;
-        // Special check for NO_VALUE
-        return (values[index] != ObjectUtils.NO_VALUE);
-    }
     
     @Override
     public final Object get(ColumnExpr column)
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBReader.java 
b/empire-db/src/main/java/org/apache/empire/db/DBReader.java
index 589674ad..718828a0 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBReader.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBReader.java
@@ -412,15 +412,6 @@ public class DBReader extends DBRecordData implements 
Closeable
             throw new EmpireSQLException(context.getDbms(), e);
         }
     }
-
-    @Override
-    public boolean isValueValid(int index)
-    {   // Check state
-        if (index < 0 || index >= columns.length)
-            return false;
-        // Always valid
-        return true;
-    }
     
     /**
      * Returns the record key for a type of entity
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBRecordBase.java 
b/empire-db/src/main/java/org/apache/empire/db/DBRecordBase.java
index 56907214..39a99a48 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBRecordBase.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBRecordBase.java
@@ -584,7 +584,6 @@ public abstract class DBRecordBase extends DBRecordData 
implements Record, Clone
      *  
      * @return true if a valid value is supplied for the given field or false 
if value is {@link ObjectUtils#NO_VALUE}  
      */
-    @Override
     public boolean isValueValid(int index)
     {   // Check state
         checkValid(index);

Reply via email to