this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName)); //NOI18N
// Call super method
- Object value = this.getValueInStoreableFromColumn(this, "BaseCategory", columnName); //NOI18N
+ Object value = this.getValueInStorableFromColumn(this, "BaseCategory", columnName); //NOI18N
// Trace message
this.getLogger().trace(MessageFormat.format("value={0} - EXIT!", value)); //NOI18N
this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value)); //NOI18N
// Call super method
- this.setValueInStoreableFromColumn(this, "BaseCategory", columnName, value); //NOI18N
+ this.setValueInStorableFromColumn(this, "BaseCategory", columnName, value); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
package org.mxchange.pizzaapplication.category;
import java.io.UnsupportedEncodingException;
-import org.mxchange.jcore.database.storage.Storeable;
+import org.mxchange.jcore.database.storage.Storable;
/**
* An interface for categories
*
* @author Roland Haeder
*/
-public interface Category extends Storeable, Comparable<Category> {
+public interface Category extends Storable, Comparable<Category> {
/**
* Id number of category
import org.mxchange.jcore.criteria.searchable.SearchableCriteria;
import org.mxchange.jcore.database.frontend.BaseDatabaseFrontend;
import org.mxchange.jcore.database.result.Result;
-import org.mxchange.jcore.database.storage.Storeable;
+import org.mxchange.jcore.database.storage.Storable;
import org.mxchange.jcore.exceptions.BadTokenException;
import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
// Handle this over to the backend
// @todo Nothing is done yet!
- Result<? extends Storeable> result = this.doInsertDataSet();
+ Result<? extends Storable> result = this.doInsertDataSet();
// Debug message
this.getLogger().debug(MessageFormat.format("result={0}", result)); //NOI18N
this.getLogger().trace(MessageFormat.format("product={0},sessionId={1} - CALLED!", product, sessionId)); //NOI18N
// Now search for it
- Result<? extends Storeable> result = this.getResultFromProduct(product, sessionId);
+ Result<? extends Storable> result = this.getResultFromProduct(product, sessionId);
// Debug message
this.getLogger().debug(MessageFormat.format("result({0})={1}", result.size(), result)); //NOI18N
// Was an entry found?
if (result.hasNext()) {
// Found one entry
- Storeable storeable = result.next();
+ Storable storeable = result.next();
// Debug message
this.getLogger().debug(MessageFormat.format("storeable={0}", storeable)); //NOI18N
*/
@Override
- public Storeable getStoreableAtRow (final int rowIndex) {
+ public Storable getStorableAtRow (final int rowIndex) {
throw new UnsupportedOperationException(MessageFormat.format("Not supported yet: rowIndex={0}", rowIndex));
}
criteria.setLimit(1);
// Get result back
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Is it empty?
boolean isEmpty = (!result.hasNext());
this.getLogger().trace(MessageFormat.format("item={0},sessionId={1} - CALLED!", item, sessionId)); //NOI18N
// Get result back
- Result<? extends Storeable> result = this.getResultFromItem(item, sessionId);
+ Result<? extends Storable> result = this.getResultFromItem(item, sessionId);
// Debug message
this.getLogger().debug(MessageFormat.format("result={0}", result)); //NOI18N
}
@Override
- public Storeable toStoreable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ public Storable toStorable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
this.getLogger().trace(MessageFormat.format("map={0} - CALLED!", map)); //NOI18N
Iterator<Map.Entry<String, String>> iterator = map.entrySet().iterator();
// Init object instance
- Storeable instance = new BasketItem();
+ Storable instance = new BasketItem();
// Iterate over all
while (iterator.hasNext()) {
* @throws java.lang.IllegalAccessException If the invoked method is not public
* @throws java.lang.reflect.InvocationTargetException If anything else happened?
*/
- private Result<? extends Storeable> getResultFromProduct (final Product product, final String sessionId) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ private Result<? extends Storable> getResultFromProduct (final Product product, final String sessionId) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
// Trace message
this.getLogger().trace(MessageFormat.format("product={0},sessionId={1} - CALLED!", product, sessionId)); //NOI18N
criteria.setLogical(new AndLogicalMatcher());
// Now search for it
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Trace message
this.getLogger().debug(MessageFormat.format("result={0} - EXIT!", result)); //NOI18N
* @throws java.lang.IllegalAccessException If the invoked method is not public
* @throws java.lang.reflect.InvocationTargetException If anything else happened?
*/
- private Result<? extends Storeable> getResultFromItem (final AddableBasketItem item, final String sessionId) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ private Result<? extends Storable> getResultFromItem (final AddableBasketItem item, final String sessionId) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
// Trace message
this.getLogger().trace(MessageFormat.format("item={0},sessionId={1} - CALLED!", item, sessionId)); //NOI18N
criteria.setLogical(new AndLogicalMatcher());
// Now search for it
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Trace message
this.getLogger().debug(MessageFormat.format("result={0} - EXIT!", result)); //NOI18N
criteria.addCriteria(BasketDatabaseConstants.COLUMN_SESSION_ID, this.getSessionId());
// Now run it on backend
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Now convert it to a map
- Set<? extends Storeable> set = result.resultSet();
+ Set<? extends Storable> set = result.resultSet();
// Debug message
this.getLogger().debug("set=" + set);
Map<Long, AddableBasketItem> map = new LinkedHashMap<>(set.size());
// Add all entries
- for (final Storeable storeable : set) {
+ for (final Storable storeable : set) {
// Debug message
this.getLogger().debug("storeable=" + storeable);
criteria.setLimit(1);
// And run it ...
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug message
this.getLogger().debug("result=" + result);
}
// Get next element
- Storeable storeable = result.next();
+ Storable storeable = result.next();
// Is it still castable?
if (!(storeable instanceof AddableBasketItem)) {
import org.mxchange.jcore.database.frontend.BaseDatabaseFrontend;
import org.mxchange.jcore.database.result.DatabaseResult;
import org.mxchange.jcore.database.result.Result;
-import org.mxchange.jcore.database.storage.Storeable;
+import org.mxchange.jcore.database.storage.Storable;
import org.mxchange.jcore.exceptions.BadTokenException;
import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
// Handle this over to the backend
// @todo Nothing is done yet!
- Result<? extends Storeable> result = this.doInsertDataSet();
+ Result<? extends Storable> result = this.doInsertDataSet();
// Debug message
this.getLogger().debug(MessageFormat.format("result={0}", result)); //NOI18N
SearchableCriteria criteria = new SearchCriteria();
// Run the query
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug message
this.getLogger().debug(MessageFormat.format("result={0}", result)); //NOI18N
criteria.setLimit(1);
// Run it on backend
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug log
this.getLogger().debug(MessageFormat.format("result({0})={1}", result, result.size())); //NOI18N
// Is there one entry?
if (result.hasNext()) {
// Read result from it
- Storeable storeable = result.next();
+ Storable storeable = result.next();
// Debug message
this.getLogger().debug(MessageFormat.format("storeable={0}", storeable)); //NOI18N
* @throws java.sql.SQLException If any SQL error occurs
*/
@Override
- public Result<? extends Storeable> getResultFromSet (final ResultSet resultSet) throws SQLException {
+ public Result<? extends Storable> getResultFromSet (final ResultSet resultSet) throws SQLException {
// Trace message
this.getLogger().trace(MessageFormat.format("resultSet={0} - CALLED!", resultSet)); //NOI18N
// Init result instance
- Result<? extends Storeable> result = new DatabaseResult();
+ Result<? extends Storable> result = new DatabaseResult();
// Reset result set before first row
resultSet.beforeFirst();
}
@Override
- public Storeable getStoreableAtRow (final int rowIndex) {
+ public Storable getStorableAtRow (final int rowIndex) {
throw new UnsupportedOperationException("Not supported yet: rowIndex=" + rowIndex);
}
criteria.setLimit(1);
// Run it on backend
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug log
this.getLogger().debug(MessageFormat.format("result({0})={1}", result, result.size())); //NOI18N
}
/**
- * Converts the given map into a Storeable instance, depending on which
+ * Converts the given map into a Storable instance, depending on which
* class implements it. All keys are being interpreted as class
* fields/attributes and their respective setters are being searched for. As
* this method may fail to find one or access it, this method throws some
* exception.
*
- * @param map Map instance to convert to Storeable
- * @return An instance of a Storeable implementation
+ * @param map Map instance to convert to Storable
+ * @return An instance of a Storable implementation
*/
@Override
- public Storeable toStoreable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ public Storable toStorable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
this.getLogger().trace(MessageFormat.format("map={0} - CALLED!", map)); //NOI18N
Iterator<Map.Entry<String, String>> iterator = map.entrySet().iterator();
// Init object instance
- Storeable instance = new ProductCategory();
+ Storable instance = new ProductCategory();
// Iterate over all
while (iterator.hasNext()) {
import org.mxchange.jcore.database.frontend.BaseDatabaseFrontend;
import org.mxchange.jcore.database.result.DatabaseResult;
import org.mxchange.jcore.database.result.Result;
-import org.mxchange.jcore.database.storage.Storeable;
+import org.mxchange.jcore.database.storage.Storable;
import org.mxchange.jcore.exceptions.BadTokenException;
import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException;
import org.mxchange.jcore.exceptions.UnsupportedDatabaseBackendException;
// Handle this over to the backend
// @todo Nothing is done yet!
- Result<? extends Storeable> result = this.doInsertDataSet();
+ Result<? extends Storable> result = this.doInsertDataSet();
// Debug message
this.getLogger().debug(MessageFormat.format("result={0}", result)); //NOI18N
SearchableCriteria criteria = new SearchCriteria();
// Run the query
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug message
this.getLogger().debug(MessageFormat.format("result={0}", result)); //NOI18N
criteria.addCriteria(ProductFrontend.COLUMN_AVAILABLE, Boolean.TRUE);
// Run the query
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug message
this.getLogger().debug(MessageFormat.format("result={0}", result)); //NOI18N
* @throws java.sql.SQLException If any SQL error occurs
*/
@Override
- public Result<? extends Storeable> getResultFromSet (final ResultSet resultSet) throws SQLException {
+ public Result<? extends Storable> getResultFromSet (final ResultSet resultSet) throws SQLException {
// Trace message
this.getLogger().trace(MessageFormat.format("resultSet={0} - CALLED!", resultSet)); //NOI18N
// Init result instance
- Result<? extends Storeable> result = new DatabaseResult();
+ Result<? extends Storable> result = new DatabaseResult();
// Reset result set before first row
resultSet.beforeFirst();
}
@Override
- public Storeable getStoreableAtRow (final int rowIndex) {
+ public Storable getStorableAtRow (final int rowIndex) {
throw new UnsupportedOperationException("Not supported yet: rowIndex=" + rowIndex);
}
criteria.setLimit(1);
// Run it on backend
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug log
this.getLogger().debug(MessageFormat.format("result({0}={1}", result, result.size())); //NOI18N
}
/**
- * Converts the given map into a Storeable instance, depending on which
+ * Converts the given map into a Storable instance, depending on which
* class implements it. All keys are being interpreted as class
* fields/attributes and their respective setters are being searched for. As
* this method may fail to find one or access it, this method throws some
* exception.
*
- * @param map Map instance to convert to Storeable
- * @return An instance of a Storeable implementation
+ * @param map Map instance to convert to Storable
+ * @return An instance of a Storable implementation
*/
@Override
- public Storeable toStoreable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ public Storable toStorable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
this.getLogger().trace(MessageFormat.format("map={0} - CALLED!", map)); //NOI18N
Iterator<Map.Entry<String, String>> iterator = map.entrySet().iterator();
// Init object instance
- Storeable instance = new PizzaProduct();
+ Storable instance = new PizzaProduct();
// Iterate over all
while (iterator.hasNext()) {
criteria.setLimit(1);
// Run it on backend
- Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
+ Result<? extends Storable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug log
this.getLogger().debug(MessageFormat.format("result({0}={1}", result, result.size())); //NOI18N
// Is there one entry?
if (result.hasNext()) {
// Get item
- Storeable storeable = result.next();
+ Storable storeable = result.next();
// Is it Product?
if (!(storeable instanceof Product)) {
*/
package org.mxchange.pizzaapplication.item;
-import org.mxchange.jcore.database.storage.Storeable;
+import org.mxchange.jcore.database.storage.Storable;
/**
* An interface for addable basket items
*
* @author Roland Haeder
*/
-public interface AddableBasketItem extends Storeable, Comparable<AddableBasketItem> {
+public interface AddableBasketItem extends Storable, Comparable<AddableBasketItem> {
/**
* Item amount
this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName)); //NOI18N
// Call super method
- Object value = this.getValueInStoreableFromColumn(this, "BaseItem", columnName); //NOI18N
+ Object value = this.getValueInStorableFromColumn(this, "BaseItem", columnName); //NOI18N
// Trace message
this.getLogger().trace(MessageFormat.format("value={0} - EXIT!", value)); //NOI18N
this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value)); //NOI18N
// Call super method
- this.setValueInStoreableFromColumn(this, "BaseItem", columnName, value); //NOI18N
+ this.setValueInStorableFromColumn(this, "BaseItem", columnName, value); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName)); //NOI18N
// Call super method
- Object value = this.getValueInStoreableFromColumn(this, "BaseProduct", columnName); //NOI18N
+ Object value = this.getValueInStorableFromColumn(this, "BaseProduct", columnName); //NOI18N
// Trace message
this.getLogger().trace(MessageFormat.format("value={0} - EXIT!", value)); //NOI18N
this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value)); //NOI18N
// Call super method
- this.setValueInStoreableFromColumn(this, "BaseProduct", columnName, value); //NOI18N
+ this.setValueInStorableFromColumn(this, "BaseProduct", columnName, value); //NOI18N
// Trace message
this.getLogger().trace("EXIT!"); //NOI18N
*/
package org.mxchange.pizzaapplication.product;
-import org.mxchange.jcore.database.storage.Storeable;
+import org.mxchange.jcore.database.storage.Storable;
/**
* An interface for in database storeable products
*
* @author Roland Haeder
*/
-public interface Product extends Storeable, Comparable<Product> {
+public interface Product extends Storable, Comparable<Product> {
/**
* Getter for id number, suitable for form fields.
*