dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
+file.reference.jcore-ee-logger.jar=lib\\jcore-ee-logger.jar
file.reference.jcore.jar=lib/jcore.jar
-file.reference.log4j-api-2.3.jar=lib/log4j-api-2.3.jar
-file.reference.log4j-core-2.3.jar=lib/log4j-core-2.3.jar
+file.reference.jcoreee.jar=lib\\jcoreee.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=false
jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.jcore.jar}:\
- ${file.reference.log4j-api-2.3.jar}:\
- ${file.reference.log4j-core-2.3.jar}
+ ${file.reference.jcore-ee-logger.jar}:\
+ ${file.reference.jcoreee.jar}
# Space-separated list of extra javac options
javac.compilerargs=-Xlint:unchecked -Xlint:deprecation
javac.deprecation=true
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
+source.reference.jcore-ee-logger.jar=../jcore-ee-logger/src/
source.reference.jcore.jar=../jcore/src/
+source.reference.jcoreee.jar=../jcoreee/src/
src.dir=src
test.src.dir=test
package org.mxchange.jshopcore.model.basket;
import java.io.IOException;
-import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.text.MessageFormat;
import java.util.Map;
-import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoree.BaseEeSystem;
import org.mxchange.jshopcore.model.item.AddableBasketItem;
/**
* @author Roland Haeder
* @param <T> Any instance that implements AddableBasketItem
*/
-public abstract class BaseBasket<T extends AddableBasketItem> extends BaseFrameworkSystem implements Basket<T>, Serializable {
+public abstract class BaseBasket<T extends AddableBasketItem> extends BaseEeSystem implements Basket<T> {
/**
* Serial number
*/
- private static final long serialVersionUID = 784_396_762_230_845_717L;
+ private static final long serialVersionUID = 782_396_762_230_845_717L;
/**
* Protected constructor with session instance
*/
protected BaseBasket () throws SQLException {
// Trace message
- this.getLogger().trace("CALLED!"); //NOI18N
+ this.getLogger().logTrace("CALLED!"); //NOI18N
}
@Override
public void init () throws SQLException {
// Trace message
- this.getLogger().trace("CALLED!"); //NOI18N
-
- // Is the bundle initialized?
- if (!BaseFrameworkSystem.isBundledInitialized()) {
- // Temporary initialize default bundle
- // TODO The enum Gender uses this
- this.initBundle();
- }
+ this.getLogger().logTrace("CALLED!"); //NOI18N
}
@Override
@SuppressWarnings ("unchecked")
public void addItem (final T item) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
// Trace call
- this.getLogger().trace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
+ this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
// item must not be null
if (null == item) {
// TODO: ((BasketFrontend) this.getFrontend()).addItem(item, this.getSessionId());
// Trace call
- this.getLogger().trace("EXIT!"); //NOI18N
+ this.getLogger().logTrace("EXIT!"); //NOI18N
}
@Override
@SuppressWarnings("unchecked")
public Map<Long, T> getAll () throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
// Trace message
- this.getLogger().trace("CALLED!"); //NOI18N
+ this.getLogger().logTrace("CALLED!"); //NOI18N
// Init map
// TODO: Map<Long, T> map = ((BasketFrontend) this.getFrontend()).getAll();
Map<Long, T> map = null;
// Trace message
- this.getLogger().trace("map=" + map); //NOI18N
+ this.getLogger().logTrace("map=" + map); //NOI18N
// Return it
return map;
@Override
public boolean isAdded (final T item) throws IOException, SQLException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
// Trace call
- this.getLogger().trace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
+ this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
// item must not be null
if (null == item) {
boolean isAdded = true;
// Trace message
- this.getLogger().trace(MessageFormat.format("isAdded={0} - EXIT!", isAdded)); //NOI18N
+ this.getLogger().logTrace(MessageFormat.format("isAdded={0} - EXIT!", isAdded)); //NOI18N
// Return it
return isAdded;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.Map;
-import org.mxchange.jcore.FrameworkInterface;
import org.mxchange.jshopcore.model.item.AddableBasketItem;
/**
* @author Roland Haeder
* @param <T> Any addable basket items
*/
-public interface Basket<T extends AddableBasketItem> extends FrameworkInterface, Serializable {
+public interface Basket<T extends AddableBasketItem> extends Serializable {
/**
* Adds given item instance to this basket
import java.io.UnsupportedEncodingException;
import java.text.MessageFormat;
import java.util.Objects;
-import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoree.BaseEeSystem;
/**
* A general product category class
*
* @author Roland Haeder
*/
-public abstract class BaseCategory extends BaseFrameworkSystem implements Category {
+public abstract class BaseCategory extends BaseEeSystem implements Category {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 38_472_937_685_901L;
/**
* Id number of category
@Override
public int compareTo (final Category category) {
// Trace message
- this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
+ this.getLogger().logTrace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
// category should not be null
if (null == category) {
}
// Debug message
- this.getLogger().debug(MessageFormat.format("this.id={0},category.id={1}", this.getCategoryId(), category.getCategoryId())); //NOI18N
+ this.getLogger().logDebug(MessageFormat.format("this.id={0},category.id={1}", this.getCategoryId(), category.getCategoryId())); //NOI18N
// Is the categoryId the same?
if (Objects.equals(this.getCategoryId(), category.getCategoryId())) {
*/
package org.mxchange.jshopcore.model.category;
+import java.io.Serializable;
import java.io.UnsupportedEncodingException;
-import org.mxchange.jcore.FrameworkInterface;
/**
* An interface for categories
*
* @author Roland Haeder
*/
-public interface Category extends FrameworkInterface, Comparable<Category> {
+public interface Category extends Comparable<Category>, Serializable {
/**
* Id number of category
* @author Roland Haeder
*/
public class ProductCategory extends BaseCategory {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 21_458_945_712_659L;
+
/**
* Constructor which accepts all database fields
* @param id Id number of database record
* @author Roland Haeder
*/
public class ShopCustomer extends BaseContact implements Customer {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 4_328_454_581_751L;
}
*/
package org.mxchange.jshopcore.model.item;
-import org.mxchange.jcore.FrameworkInterface;
+import java.io.Serializable;
import org.mxchange.jshopcore.model.product.Product;
/**
*
* @author Roland Haeder
*/
-public interface AddableBasketItem extends FrameworkInterface, Comparable<AddableBasketItem> {
+public interface AddableBasketItem extends Serializable {
/**
* Item amount
* @param product the product to set
*/
public void setProduct (final Product product);
-
- /**
- * Compare method
- * @param item Item to compare to
- * @return Comparison value
- */
- @Override
- public int compareTo (final AddableBasketItem item);
}
import java.text.MessageFormat;
import java.util.Objects;
-import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoree.BaseEeSystem;
import org.mxchange.jshopcore.model.product.Product;
/**
*
* @author Roland Haeder
*/
-public abstract class BaseItem extends BaseFrameworkSystem implements AddableBasketItem {
+public abstract class BaseItem extends BaseEeSystem implements AddableBasketItem, Comparable<AddableBasketItem> {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 24_348_671_457_829_156L;
+
/**
* Entry id (from database backend)
*/
@Override
public int compareTo (final AddableBasketItem item) {
// Trace message
- this.getLogger().trace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
+ this.getLogger().logTrace(MessageFormat.format("item={0} - CALLED!", item)); //NOI18N
// item should not be null
if (null == item) {
}
// Debug message
- this.getLogger().debug(MessageFormat.format("this.itemId={0},item.itemId={1}", this.getItemId(), item.getItemId())); //NOI18N
+ this.getLogger().logDebug(MessageFormat.format("this.itemId={0},item.itemId={1}", this.getItemId(), item.getItemId())); //NOI18N
// Is the id the same?
if (Objects.equals(this.getItemId(), item.getItemId())) {
this.itemType = itemType;
}
- /**
- * @return the product
- */
@Override
public Product getProduct () {
return this.product;
}
- /**
- * @param product the product to set
- */
@Override
public void setProduct (final Product product) {
this.product = product;
* @author Roland Haeder
*/
public class BasketItem extends BaseItem implements AddableBasketItem {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 52_749_158_492_581_578L;
+
/**
* Default constructor
*/
this();
// Trace message
- this.getLogger().debug(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
+ this.getLogger().logDebug(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
// product must not be null
if (null == product) {
import java.text.MessageFormat;
import java.util.Objects;
-import org.mxchange.jcore.BaseFrameworkSystem;
+import org.mxchange.jcoree.BaseEeSystem;
/**
+ * A general product class
*
* @author Roland Haeder
*/
-public abstract class BaseProduct extends BaseFrameworkSystem implements Product {
+public abstract class BaseProduct extends BaseEeSystem implements Product, Comparable<Product> {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 48_379_575_267_451L;
+
/**
* Availability of product
*/
@Override
public int compareTo (final Product product) {
// Trace message
- this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
+ this.getLogger().logTrace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
// category should not be null
if (null == product) {
}
// Debug message
- this.getLogger().debug(MessageFormat.format("this.id={0},product.id={1}", this.getItemId(), product.getItemId())); //NOI18N
+ this.getLogger().logDebug(MessageFormat.format("this.id={0},product.id={1}", this.getItemId(), product.getItemId())); //NOI18N
// Is the id the same?
if (Objects.equals(this.getItemId(), product.getItemId())) {
*/
package org.mxchange.jshopcore.model.product;
-import org.mxchange.jcore.FrameworkInterface;
+import java.io.Serializable;
/**
* An interface for in database storable products
*
* @author Roland Haeder
*/
-public interface Product extends FrameworkInterface, Comparable<Product> {
+public interface Product extends Serializable {
/**
* Getter for id number, suitable for form fields.
*
* @param available Product availability
*/
public void setAvailable (final Boolean available);
-
- /**
- * Compare method
- * @param product Product to compare to
- * @return Comparison value
- */
- @Override
- public int compareTo (final Product product);
}
* TODO: Find a better name
*/
public class GenericProduct extends BaseProduct implements Product {
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 54_578_571_769_283L;
+
/**
* Default constructor
*/
*/
public GenericProduct (final Long id, final String title, final Float price, final Long categoryId, final Boolean available) {
// Trace message
- this.getLogger().trace(MessageFormat.format("id={0},title={1},price={2},categoryId={3},available={4} - CALLED!", id, title, price, categoryId, available)); //NOI18N
+ this.getLogger().logTrace(MessageFormat.format("id={0},title={1},price={2},categoryId={3},available={4} - CALLED!", id, title, price, categoryId, available)); //NOI18N
// Set all here
this.setItemId(id);