empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doeb...@apache.org
Subject empire-db git commit: EMPIREDB-238 added Override annotations
Date Fri, 26 Feb 2016 11:22:29 GMT
Repository: empire-db
Updated Branches:
  refs/heads/master 5b88de4cc -> fc75a0a31


EMPIREDB-238
added Override annotations

Project: http://git-wip-us.apache.org/repos/asf/empire-db/repo
Commit: http://git-wip-us.apache.org/repos/asf/empire-db/commit/fc75a0a3
Tree: http://git-wip-us.apache.org/repos/asf/empire-db/tree/fc75a0a3
Diff: http://git-wip-us.apache.org/repos/asf/empire-db/diff/fc75a0a3

Branch: refs/heads/master
Commit: fc75a0a31d17ecea0e1ebc0ab231a3f7aee3ad75
Parents: 5b88de4
Author: Rainer Döbele <doebele@apache.org>
Authored: Fri Feb 26 12:22:22 2016 +0100
Committer: Rainer Döbele <doebele@apache.org>
Committed: Fri Feb 26 12:22:22 2016 +0100

----------------------------------------------------------------------
 .../org/apache/empire/commons/Attributes.java   |  3 ++
 .../apache/empire/data/bean/BeanProperty.java   | 13 +++++++
 .../empire/data/bean/BeanRecordProxy.java       | 26 ++++++++++++++
 .../java/org/apache/empire/db/DBColumn.java     |  5 +++
 .../java/org/apache/empire/db/DBColumnExpr.java |  8 +++++
 .../main/java/org/apache/empire/db/DBExpr.java  |  3 +-
 .../java/org/apache/empire/db/DBObject.java     |  3 --
 .../java/org/apache/empire/db/DBReader.java     |  2 +-
 .../java/org/apache/empire/db/DBRecord.java     | 38 ++++++++++++++++++++
 .../java/org/apache/empire/db/DBRecordData.java | 10 ++++++
 .../java/org/apache/empire/db/DBRowSet.java     |  1 +
 .../java/org/apache/empire/db/DBSQLScript.java  |  4 +++
 .../db/exceptions/QueryFailedException.java     |  1 -
 .../db/exceptions/StatementFailedException.java |  1 -
 .../db/postgresql/PostgreDDLGenerator.java      |  2 --
 .../db/validation/DBModelErrorLogger.java       |  5 +++
 16 files changed, 115 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/commons/Attributes.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/commons/Attributes.java b/empire-db/src/main/java/org/apache/empire/commons/Attributes.java
index 64934d4..a634c82 100644
--- a/empire-db/src/main/java/org/apache/empire/commons/Attributes.java
+++ b/empire-db/src/main/java/org/apache/empire/commons/Attributes.java
@@ -83,12 +83,15 @@ public class Attributes extends AbstractSet<Attributes.Attribute>
implements Clo
 	
 	private static final class EmptyIterator implements Iterator<Attribute>
 	{
+        @Override
         public boolean hasNext()  {
             return false;
         }
+        @Override
         public Attribute next() {
             return null;
         }
+        @Override
         public void remove() {
         }
 	}

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/data/bean/BeanProperty.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/data/bean/BeanProperty.java b/empire-db/src/main/java/org/apache/empire/data/bean/BeanProperty.java
index ad7f6a9..f6e6ce3 100644
--- a/empire-db/src/main/java/org/apache/empire/data/bean/BeanProperty.java
+++ b/empire-db/src/main/java/org/apache/empire/data/bean/BeanProperty.java
@@ -94,6 +94,7 @@ public class BeanProperty implements Column
      * Returns the name of the property.
      * @return the property name
      */
+    @Override
     public String getName()
     {
         return name;
@@ -105,6 +106,7 @@ public class BeanProperty implements Column
      *
      * @return the property data type
      */
+    @Override
     public DataType getDataType()
     {
         return dataType;
@@ -117,6 +119,7 @@ public class BeanProperty implements Column
      * @param name the attribute name
      * @return value of the attribute if it exists or null otherwise
      */
+    @Override
     public Object getAttribute(String name)
     {
         return (attributes!=null) ? attributes.get(name) : null;
@@ -126,6 +129,7 @@ public class BeanProperty implements Column
      * Returns the title attribute.
      * @return the column title
      */
+    @Override
     public String getTitle()
     {
         if (title==null)
@@ -139,6 +143,7 @@ public class BeanProperty implements Column
      * 
      * @return the list of options
      */
+    @Override
     public Options getOptions()
     {
         return options;
@@ -151,6 +156,7 @@ public class BeanProperty implements Column
      * 
      * @return the columns control type
      */
+    @Override
     public String getControlType()
     {
         return controlType;
@@ -161,6 +167,7 @@ public class BeanProperty implements Column
      * This function should return the same string as getName()
      * @return the name of the bean property 
      */
+    @Override
     public String getBeanPropertyName()
     {
         return name;
@@ -171,6 +178,7 @@ public class BeanProperty implements Column
      * This function should return the same string as getName()
      * @return the name of the bean property 
      */
+    @Override
     public Column getSourceColumn()
     {
         return this;
@@ -178,26 +186,31 @@ public class BeanProperty implements Column
 
     // --- Column interface implementation ---
     
+    @Override
     public double getSize()
     {
         return size;
     }
 
+    @Override
     public boolean isReadOnly()
     {
         return (dataMode==DataMode.ReadOnly || dataMode==DataMode.AutoGenerated);
     }
 
+    @Override
     public boolean isAutoGenerated()
     {
         return (dataMode==DataMode.AutoGenerated);
     }
 
+    @Override
     public boolean isRequired()
     {
         return (dataMode==DataMode.NotNull);
     }
 
+    @Override
     public Object validate(Object value)
     {
         if (ObjectUtils.isEmpty(value) && isRequired())

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/data/bean/BeanRecordProxy.java
----------------------------------------------------------------------
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 c99da83..6cd0b7e 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
@@ -94,16 +94,19 @@ public class BeanRecordProxy<T> implements Record
         this.data = data;
     }
 
+    @Override
     public Column getColumn(int index)
     {
         return columns.get(index);
     }
 
+    @Override
     public ColumnExpr getColumnExpr(int index)
     {
         return columns.get(index);
     }
 
+    @Override
     public Column[] getKeyColumns()
     {
         return keyColumns;
@@ -125,11 +128,13 @@ public class BeanRecordProxy<T> implements Record
         return key;
     }
 
+    @Override
     public int getFieldCount()
     {
         return columns.size();
     }
 
+    @Override
     public int getFieldIndex(ColumnExpr column)
     {
         for (int i=0; i<columns.size(); i++)
@@ -140,6 +145,7 @@ public class BeanRecordProxy<T> implements Record
         return -1;
     }
 
+    @Override
     public int getFieldIndex(String columnName)
     {
         for (int i=0; i<columns.size(); i++)
@@ -150,16 +156,19 @@ public class BeanRecordProxy<T> implements Record
         return -1;
     }
 
+    @Override
     public Options getFieldOptions(Column column)
     {
         return column.getOptions();
     }
 
+    @Override
     public boolean isFieldVisible(Column column)
     {
         return true;
     }
 
+    @Override
     public boolean isFieldReadOnly(Column column)
     {
     	if (isNew()==false && ObjectUtils.contains(keyColumns, column))
@@ -169,16 +178,19 @@ public class BeanRecordProxy<T> implements Record
         return column.isReadOnly();
     }
 
+    @Override
     public boolean isFieldRequired(Column column)
     {
         return column.isRequired();
     }
 
+    @Override
     public boolean isModified()
     {
         return (modified!=null);
     }
 
+    @Override
     public boolean isNew()
     {
         if (!isValid())
@@ -199,16 +211,19 @@ public class BeanRecordProxy<T> implements Record
         return false;
     }
 
+    @Override
     public boolean isValid()
     {
         return (data!=null);
     }
 
+    @Override
     public boolean isReadOnly()
     {
         return (isValid() ? false : true);
     }
 
+    @Override
     public Object getValue(ColumnExpr column)
     {
         if (!isValid())
@@ -217,16 +232,19 @@ public class BeanRecordProxy<T> implements Record
         return getBeanPropertyValue(data, column);
     }
 
+    @Override
     public Object getValue(int index)
     {
         return getValue(getColumn(index));
     }
 
+    @Override
     public boolean isNull(ColumnExpr column)
     {
         return ObjectUtils.isEmpty(getValue(column));
     }
 
+    @Override
     public boolean isNull(int index)
     {
         return isNull(getColumn(index));
@@ -235,6 +253,7 @@ public class BeanRecordProxy<T> implements Record
     /**
      * Validates a value before it is set in the record.
      */
+    @Override
     public Object validateValue(Column column, Object value)
     {
         return column.validate(value);
@@ -243,6 +262,7 @@ public class BeanRecordProxy<T> implements Record
     /**
      * sets the value of a field.
      */
+    @Override
     public void setValue(Column column, Object value)
     {
         if (!isValid())
@@ -263,6 +283,7 @@ public class BeanRecordProxy<T> implements Record
     /**
      * sets the value of a field.
      */
+    @Override
     public final void setValue(int i, Object value)
     {
         setValue(getColumn(i), value);
@@ -271,6 +292,7 @@ public class BeanRecordProxy<T> implements Record
     /**
      * Detects whether or not a particular field has been modified.
      */
+    @Override
     public boolean wasModified(Column column)
     {
         int index = getFieldIndex(column);
@@ -290,11 +312,13 @@ public class BeanRecordProxy<T> implements Record
 
     // --------------- Bean support ------------------
 
+    @Override
     public int getBeanProperties(Object bean)
     {
         return getBeanProperties(bean, null);
     }
 
+    @Override
     public int getBeanProperties(Object bean, Collection<ColumnExpr> ignoreList)
     {
         // Add all Columns
@@ -312,6 +336,7 @@ public class BeanRecordProxy<T> implements Record
         return count;
     }
 
+    @Override
     public int setBeanValues(Object bean, Collection<Column> ignoreList)
     {
         // Add all Columns
@@ -332,6 +357,7 @@ public class BeanRecordProxy<T> implements Record
         return count;
     }
 
+    @Override
     public int setBeanValues(Object bean)
     {
         return setBeanValues(bean, null);

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBColumn.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBColumn.java b/empire-db/src/main/java/org/apache/empire/db/DBColumn.java
index 0709a42..7792dd3 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBColumn.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBColumn.java
@@ -219,6 +219,7 @@ public abstract class DBColumn extends DBColumnExpr
      *
      * @return Returns the size of the column
      */
+    @Override
     public abstract double getSize();
 
     /**
@@ -226,6 +227,7 @@ public abstract class DBColumn extends DBColumnExpr
      *
      * @return Returns true if the column is required
      */
+    @Override
     public abstract boolean isRequired();
     
     /**
@@ -233,6 +235,7 @@ public abstract class DBColumn extends DBColumnExpr
      * 
      * @return true if column is auto-generated
      */
+    @Override
     public abstract boolean isAutoGenerated();
 
     /**
@@ -240,12 +243,14 @@ public abstract class DBColumn extends DBColumnExpr
      *
      * @return Returns true if the column is read-only
      */
+    @Override
     public abstract boolean isReadOnly();
 
     /**
      * Checks if the given value is a valid value for this column 
      * If not, an exception is thrown
      */
+    @Override
     public abstract Object validate(Object value);
     
     /**

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java b/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java
index 79593de..0deef0f 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBColumnExpr.java
@@ -69,6 +69,7 @@ public abstract class DBColumnExpr extends DBExpr
      *
      * @return the expressions data type
      */
+    @Override
     public abstract DataType getDataType();
 
     /**
@@ -79,6 +80,7 @@ public abstract class DBColumnExpr extends DBExpr
      *
      * @return the column name
      */
+    @Override
     public abstract String getName();
     
     /**
@@ -111,6 +113,7 @@ public abstract class DBColumnExpr extends DBExpr
      * @param name the attribute name
      * @return value of the attribute if it exists or null otherwise
      */
+    @Override
     public synchronized Object getAttribute(String name)
     {
         if (attributes != null && attributes.contains(name))
@@ -141,6 +144,7 @@ public abstract class DBColumnExpr extends DBExpr
      * 
      * @return the list of options
      */
+    @Override
     public synchronized Options getOptions()
     {
         if (options != null)
@@ -167,6 +171,7 @@ public abstract class DBColumnExpr extends DBExpr
      * 
      * @return the column title
      */
+    @Override
     public final String getTitle()
     { 
         Object title = getAttribute(DBCOLATTR_TITLE);
@@ -190,6 +195,7 @@ public abstract class DBColumnExpr extends DBExpr
      * 
      * @return the column control type
      */
+    @Override
     public final String getControlType()
     { 
         Object type = getAttribute(DBCOLATTR_TYPE);
@@ -211,6 +217,7 @@ public abstract class DBColumnExpr extends DBExpr
      * This is equivalent to the "Update Column"
      * see getUpdateColumn()
      */
+    @Override
     public final Column getSourceColumn()
     {
         return getUpdateColumn();
@@ -223,6 +230,7 @@ public abstract class DBColumnExpr extends DBExpr
      *      
      * @return the name of the bean property used to get and set values 
      */
+    @Override
     public String getBeanPropertyName()
     {
         if (beanPropertyName==null)

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBExpr.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBExpr.java b/empire-db/src/main/java/org/apache/empire/db/DBExpr.java
index f0c573d..f2b43fb 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBExpr.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBExpr.java
@@ -126,8 +126,7 @@ public abstract class DBExpr extends DBObject
      * @param type the data type
      * @return return the java class used for storing values of this dataType 
      */
-    @SuppressWarnings("unchecked")
-    public static final Class getValueClass(DataType type)
+    public static final Class<?> getValueClass(DataType type)
     {
         switch(type)
         {

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBObject.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBObject.java b/empire-db/src/main/java/org/apache/empire/db/DBObject.java
index 1d5bdf4..8bef177 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBObject.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBObject.java
@@ -18,9 +18,6 @@
  */
 package org.apache.empire.db;
 
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
 // java.sql
 import java.io.Serializable;
 

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBReader.java
----------------------------------------------------------------------
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 d480564..ec899bc 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
@@ -654,7 +654,7 @@ public class DBReader extends DBRecordData
         try
         {
             // Check whether we can use a constructor
-            Class<T>[] paramTypes = new Class[getFieldCount()];
+            Class<?>[] paramTypes = new Class[getFieldCount()];
             for (int i = 0; i < colList.length; i++)
                 paramTypes[i] = DBExpr.getValueClass(colList[i].getDataType()); 
             // Find Constructor

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBRecord.java b/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
index 5e2d8b7..ec13ced 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBRecord.java
@@ -242,6 +242,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * 
      * @return true if the record is valid
      */
+    @Override
     public boolean isValid()
     {
         return (state != State.Invalid);
@@ -252,6 +253,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * 
      * @return true if the record is valid
      */
+    @Override
     public boolean isReadOnly()
     {
         if (!isValid())
@@ -265,6 +267,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * 
      * @return true if the record is modified
      */
+    @Override
     public boolean isModified()
     {
         return (state.isEqualOrMore(State.Modified));
@@ -275,6 +278,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * 
      * @return true if this record is a new record
      */
+    @Override
     public boolean isNew()
     {
         return (state == State.New);
@@ -353,6 +357,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * Internally calls getDBColumn()
      * @return the Column at the specified index 
      */
+    @Override
     public final Column getColumn(int index)
     {
         return getDBColumn(index);
@@ -369,6 +374,28 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
     }
     
     /**
+     * helper function to check if a given field index corresponds to one of the given columns
+     * @param index the field index
+     * @param column one or more columns to check
+     * @return true if the index is for one of the columns or false otherwise
+     */
+    protected boolean isColumn(int index, DBColumn... column)
+    {
+        if (index < 0 || index >= fields.length)
+            throw new InvalidArgumentException("index", index);
+        if (column==null)
+            throw new InvalidArgumentException("column", column);
+        Column col = getColumn(index);
+        for (int i=0; i<column.length; i++)
+        {   // compare
+            if (col==column[i])
+                return true;
+        }
+        // not found
+        return false; 
+    }
+    
+    /**
      * Returns true if the field was modified.
      * 
      * @param index the field index
@@ -392,6 +419,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * 
      * @return true if the field was modified
      */
+    @Override
     public final boolean wasModified(Column column)
     {
         return wasModified(getFieldIndex(column));
@@ -443,6 +471,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * returns an array of key columns which uniquely identify the record.
      * @return the array of key columns if any
      */
+    @Override
     public Column[] getKeyColumns()
     {
         return rowset.getKeyColumns();
@@ -515,6 +544,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * Same as getFieldOptions(DBColumn)
      * @return the Option
      */
+    @Override
     public final Options getFieldOptions(Column column)
     {
         return getFieldOptions((DBColumn)column); 
@@ -559,6 +589,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * @param index the index of the column
      * @param value the value
      */
+    @Override
     public void setValue(int index, Object value)
     {
         if (state == State.Invalid)
@@ -593,6 +624,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * @param column a DBColumn object
      * @param value the value
      */
+    @Override
     public final void setValue(Column column, Object value)
     {
         if (!isValid())
@@ -625,6 +657,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * @param column the column that needs to be changed
      * @param value the new value
      */
+    @Override
     public Object validateValue(Column column, Object value)
     {
     	return column.validate(value);
@@ -657,6 +690,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * @param column the column which to check for visibility
      * @return true if the column is visible or false if not 
      */
+    @Override
     public boolean isFieldVisible(Column column)
     {
         if (rowset==null)
@@ -673,6 +707,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * 
      * @return true if the field is read only
      */
+    @Override
     public boolean isFieldReadOnly(Column column)
     {
         if (rowset==null)
@@ -693,6 +728,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * 
      * @return true if the field is required
      */
+    @Override
     public boolean isFieldRequired(Column column)
     {
         if (rowset==null)
@@ -1018,6 +1054,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * 
      * @return true if at least one value has been set successfully 
      */
+    @Override
     public int setBeanValues(Object bean, Collection<Column> ignoreList)
     {
         // Add all Columns
@@ -1041,6 +1078,7 @@ public class DBRecord extends DBRecordData implements Record, Cloneable
      * Sets record values from the suppied java bean.
      * @return true if at least one value has been set sucessfully
      */
+    @Override
     public final int setBeanValues(Object bean)
     {
         return setBeanValues(bean, null);

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBRecordData.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBRecordData.java b/empire-db/src/main/java/org/apache/empire/db/DBRecordData.java
index b12488a..704ff14 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBRecordData.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBRecordData.java
@@ -53,10 +53,14 @@ public abstract class DBRecordData extends DBObject
     private static final Logger log = LoggerFactory.getLogger(DBRecordData.class);
     
     // Field Info
+    @Override
     public abstract int     getFieldCount();
+    @Override
     public abstract int  	getFieldIndex(ColumnExpr column);
+    @Override
     public abstract int  	getFieldIndex(String column);
     // Column lookup
+    @Override
     public abstract ColumnExpr getColumnExpr(int i);
     // xml
     public abstract int     addColumnDesc(Element parent);
@@ -68,6 +72,7 @@ public abstract class DBRecordData extends DBObject
     /**
      * Returns a value based on an index.
      */
+    @Override
     public abstract Object  getValue(int index);
     
     /**
@@ -76,6 +81,7 @@ public abstract class DBRecordData extends DBObject
      * @param column the column for which to obtain the value
      * @return the record value
      */
+    @Override
     public final Object getValue(ColumnExpr column)
     {
         int index = getFieldIndex(column);
@@ -270,6 +276,7 @@ public abstract class DBRecordData extends DBObject
      * @param index index of the column
      * @return true if the value is null or false otherwise
      */
+    @Override
     public boolean isNull(int index)
     {
         return (getValue(index) == null);
@@ -281,6 +288,7 @@ public abstract class DBRecordData extends DBObject
      * @param column identifying the column
      * @return true if the value is null or false otherwise
      */
+    @Override
     public final boolean isNull(ColumnExpr column)
     {
         return isNull(getFieldIndex(column));
@@ -339,6 +347,7 @@ public abstract class DBRecordData extends DBObject
      * 
      * @return the number of bean properties set on the supplied bean
      */
+    @Override
     public int getBeanProperties(Object bean, Collection<ColumnExpr> ignoreList)
     {
         // Add all Columns
@@ -362,6 +371,7 @@ public abstract class DBRecordData extends DBObject
      * 
      * @return the number of bean properties set on the supplied bean
      */
+    @Override
     public final int getBeanProperties(Object bean)
     {
         return getBeanProperties(bean, null);

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java b/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
index 25d4b02..502c2cc 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBRowSet.java
@@ -78,6 +78,7 @@ public abstract class DBRowSet extends DBExpr
             this.fields = fields;
             this.index = index;
         }
+        @Override
         public void set(Object value)
         {
             fields[index]=value;

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java b/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
index 2565a6b..0af2f21 100644
--- a/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
+++ b/empire-db/src/main/java/org/apache/empire/db/DBSQLScript.java
@@ -89,16 +89,19 @@ public class DBSQLScript implements Iterable<String>
             this.iterator = iterator;
         }
 
+        @Override
         public boolean hasNext()
         {
             return iterator.hasNext();
         }
 
+        @Override
         public String next()
         {
             return iterator.next().getCmd();
         }
 
+        @Override
         public void remove()
         {
             iterator.remove();
@@ -425,6 +428,7 @@ public class DBSQLScript implements Iterable<String>
     /**
      * Returns an iterator
      */
+    @Override
     public Iterator<String> iterator()
     {
         return new SQLStmtIterator(sqlStmtList.iterator());

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
b/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
index d01e41d..85ca3c4 100644
--- a/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
+++ b/empire-db/src/main/java/org/apache/empire/db/exceptions/QueryFailedException.java
@@ -35,7 +35,6 @@ public class QueryFailedException extends EmpireSQLException
      */
     private static final long serialVersionUID = 1L;
     
-    @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)

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java
b/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java
index 85d959f..69c27fa 100644
--- a/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java
+++ b/empire-db/src/main/java/org/apache/empire/db/exceptions/StatementFailedException.java
@@ -35,7 +35,6 @@ public class StatementFailedException extends EmpireSQLException
      */
     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)

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/postgresql/PostgreDDLGenerator.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/postgresql/PostgreDDLGenerator.java
b/empire-db/src/main/java/org/apache/empire/db/postgresql/PostgreDDLGenerator.java
index bc66055..a7364dc 100644
--- a/empire-db/src/main/java/org/apache/empire/db/postgresql/PostgreDDLGenerator.java
+++ b/empire-db/src/main/java/org/apache/empire/db/postgresql/PostgreDDLGenerator.java
@@ -18,8 +18,6 @@
  */
 package org.apache.empire.db.postgresql;
 
-import java.util.Iterator;
-
 import org.apache.empire.data.DataType;
 import org.apache.empire.db.DBColumn;
 import org.apache.empire.db.DBDDLGenerator;

http://git-wip-us.apache.org/repos/asf/empire-db/blob/fc75a0a3/empire-db/src/main/java/org/apache/empire/db/validation/DBModelErrorLogger.java
----------------------------------------------------------------------
diff --git a/empire-db/src/main/java/org/apache/empire/db/validation/DBModelErrorLogger.java
b/empire-db/src/main/java/org/apache/empire/db/validation/DBModelErrorLogger.java
index deee0f2..791319b 100644
--- a/empire-db/src/main/java/org/apache/empire/db/validation/DBModelErrorLogger.java
+++ b/empire-db/src/main/java/org/apache/empire/db/validation/DBModelErrorLogger.java
@@ -38,6 +38,7 @@ public class DBModelErrorLogger implements DBModelErrorHandler
     /**
      * handle itemNotFound errors
      */
+    @Override
     public void itemNotFound(DBObject dbo)
     {
         if (dbo instanceof DBTable)
@@ -74,6 +75,7 @@ public class DBModelErrorLogger implements DBModelErrorHandler
     /**
      * handle columnTypeMismatch errors
      */
+    @Override
     public void columnTypeMismatch(DBColumn col, DataType type)
     {
         DBModelErrorLogger.log.error("The column " + col.getFullName() + " type of {} does
not match the database type of {}.", col.getDataType(), type);
@@ -82,6 +84,7 @@ public class DBModelErrorLogger implements DBModelErrorHandler
     /**
      * handle columnSizeMismatch errors
      */
+    @Override
     public void columnSizeMismatch(DBColumn col, int size, int scale)
     {
         if (size>0 && size<col.getSize())
@@ -97,6 +100,7 @@ public class DBModelErrorLogger implements DBModelErrorHandler
     /**
      * handle columnNullableMismatch errors
      */
+    @Override
     public void columnNullableMismatch(DBColumn col, boolean nullable)
     {
         if (nullable)
@@ -112,6 +116,7 @@ public class DBModelErrorLogger implements DBModelErrorHandler
     /**
      * handle primaryKeyColumnMissing errors
      */
+    @Override
     public void primaryKeyColumnMissing(DBIndex primaryKey, DBColumn column)
     {
         DBModelErrorLogger.log.error("The primary key " + primaryKey.getName() + " of table
" + primaryKey.getTable().getName()


Mime
View raw message