}
@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);
}
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;
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;
}
* @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!");
@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!");
}
}