]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Added missing thrown exceptions
authorRoland Haeder <roland@mxchange.org>
Fri, 14 Aug 2015 19:23:32 +0000 (21:23 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 14 Aug 2015 19:23:32 +0000 (21:23 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/java/org/mxchange/pizzaapplication/customer/bean/PizzaServiceCustomerBean.java
src/java/org/mxchange/pizzaapplication/database/frontend/category/PizzaCategoryDatabaseFrontend.java
src/java/org/mxchange/pizzaapplication/product/BaseProduct.java

index 276cdf3f0bb04197edf4dd32dba130765cce5acf..e68c9828c6481584b66b9acf7f64f1586c9e2f14 100644 (file)
@@ -262,7 +262,7 @@ public class PizzaServiceCustomerBean extends BasePizzaServiceSystem implements
        }
 
        @Override
-       public void setValueFromColumn (String columnName, String value) {
+       public void setValueFromColumn (String columnName, String value) throws IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
                // Deligate to "hidden" object
                this.getContact().setValueFromColumn(columnName, value);
        }
index 39278cd038c91a9221ab2162c88c5df142d21db1..aa376c77f0b81b14dac138f568076f9dc1af0153 100644 (file)
@@ -17,6 +17,7 @@
 package org.mxchange.pizzaapplication.database.frontend.category;
 
 import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.text.MessageFormat;
@@ -220,28 +221,28 @@ public class PizzaCategoryDatabaseFrontend extends BaseDatabaseFrontend implemen
        public boolean isCategoryTitleUsed (final String title) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException {
                // Trace message
                this.getLogger().trace(MessageFormat.format("title={0} - CALLED!", title));
-               
+
                // Get search criteria
                SearchableCritera criteria = new SearchCriteria();
-               
+
                // Add criteria
                criteria.addCriteria(PizzaCategoryDatabaseConstants.COLUMN_TITLE, title);
-               
+
                // Only one entry is find
                criteria.setLimit(1);
-               
+
                // Run it on backend
                Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
-               
+
                // Debug log
                this.getLogger().debug(MessageFormat.format("result({0}={1}", result, result.size()));
-               
+
                // Now check size of the result
                boolean isFound = (result.size() == 1);
-               
+
                // Trace message
                this.getLogger().trace(MessageFormat.format("isFound={0} - EXIT!", isFound));
-               
+
                // Return it
                return isFound;
        }
@@ -255,7 +256,7 @@ public class PizzaCategoryDatabaseFrontend extends BaseDatabaseFrontend implemen
         * @return An instance of a Storeable implementation
         */
        @Override
-       public Storeable toStoreable (final Map<String, String> map) {
+       public Storeable toStoreable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
                // Trace message
                this.getLogger().trace("map=" + map + " - CALLED!");
 
index 453cf4e7b7234cc45fd49f9d478519228f48d7ac..7d732948f71925d3f96595db6976a1d0d449168d 100644 (file)
@@ -168,11 +168,28 @@ public class BaseProduct extends BaseFrameworkSystem implements Product {
 
        @Override
        public Object getValueFromColumn (final String columnName) throws IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
-               throw new UnsupportedOperationException("Not supported yet:columnName=" + columnName);
+               // Trace message
+               this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName));
+
+               // Call super method
+               Object value = this.getValueInStoreableFromColumn(this, "BaseProduct", columnName);
+
+               // Trace message
+               this.getLogger().trace("value=" + value + " - EXIT!");
+
+               // Return value
+               return value;
        }
 
        @Override
-       public void setValueFromColumn (final String columnName, final String value) {
-               throw new UnsupportedOperationException("Not supported yet: columnName=" + columnName + ",value=" + value);
+       public void setValueFromColumn (final String columnName, final String value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+               // Trace message
+               this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value));
+
+               // Call super method
+               this.setValueInStoreableFromColumn(this, "BaseProduct", columnName, value);
+
+               // Trace message
+               this.getLogger().trace("EXIT!");
        }
 }