*/
protected void initProperties (final ServletContext context) {
// Trace message
- this.getLogger().trace(MessageFormat.format("context={0} - CALLED!", context));
+ this.getLogger().trace(MessageFormat.format("context={0} - CALLED!", context)); //NOI18N
// We need some properties that needs to be set
for (final String name : this.getPropertyNames()) {
// Debug log
- this.getLogger().debug(MessageFormat.format("name={0}", name));
+ this.getLogger().debug(MessageFormat.format("name={0}", name)); //NOI18N
// Get value
String value = context.getInitParameter(name);
// Debug message
- this.getLogger().debug(MessageFormat.format("value={0}", value));
+ this.getLogger().debug(MessageFormat.format("value={0}", value)); //NOI18N
// Is it null?
if (value == null) {
// Value is null
- throw new NullPointerException(MessageFormat.format("value for {0} is null, maybe invalid context parameter?", name));
- } else if (name.equals("database.backend.storagepath")) {
+ throw new NullPointerException(MessageFormat.format("value for {0} is null, maybe invalid context parameter?", name)); //NOI18N
+ } else if (name.equals("database.backend.storagepath")) { //NOI18N
// Need to expand this path
- value = context.getRealPath(String.format("../../%s", value.trim()));
+ value = context.getRealPath(String.format("../../%s", value.trim())); //NOI18N
}
// Debug log
- this.getLogger().debug(MessageFormat.format("{0}={1}", name, value));
+ this.getLogger().debug(MessageFormat.format("{0}={1}", name, value)); //NOI18N
// Set property
this.setProperty(name, value);
}
// Trace message
- this.getLogger().trace("EXIT!");
+ this.getLogger().trace("EXIT!"); //NOI18N
}
}
String available = request.getParameter(PizzaProductDatabaseConstants.COLUMN_AVAILABLE);
// Debug message
- this.getLogger().debug(MessageFormat.format("title={0},price={1},category={2},available={3}", title, price, category, available));
+ this.getLogger().debug(MessageFormat.format("title={0},price={1},category={2},available={3}", title, price, category, available)); //NOI18N
// Variables for converting
Long id = null;
@Override
public String getPrintableProduktCategory (final Product product) throws ServletException {
// Trace message
- this.getLogger().trace("product=" + product + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
// product must not be null
if (product == null) {
// Abort here
- throw new NullPointerException("product is null");
+ throw new NullPointerException("product is null"); //NOI18N
}
// Declare category
}
// Debug message
- this.getLogger().debug("category=" + category);
+ this.getLogger().debug(MessageFormat.format("category={0}", category)); //NOI18N
String title = null;
try {
}
// Trace message
- this.getLogger().trace("title=" + title + " - EXIT!");
+ this.getLogger().trace(MessageFormat.format("title={0} - EXIT!", title)); //NOI18N
// Return it
return title;
*/
private boolean isProductTitleUsed (final HttpServletRequest request) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
- this.getLogger().trace("request=" + request + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("request={0} - CALLED!", request)); //NOI18N
// Init title
String title = request.getParameter(PizzaProductDatabaseConstants.COLUMN_TITLE);
// request must not be null and "title" must be found and non-empty
if (request == null) {
// Abort here
- throw new NullPointerException("request is null");
+ throw new NullPointerException("request is null"); //NOI18N
} else if (title == null) {
// title is not set
throw new IllegalArgumentException(MessageFormat.format("{0} is not set.", PizzaProductDatabaseConstants.COLUMN_TITLE)); //NOI18N
boolean isUsed = this.isProductTitleUsed(title);
// Trace message
- this.getLogger().trace("isUsed=" + isUsed + " - EXIT!");
+ this.getLogger().trace(MessageFormat.format("isUsed={0} - EXIT!", isUsed)); //NOI18N
// Return it
return isUsed;
@Override
public void doAdminHandleProductForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException {
// Trace message
- this.getLogger().trace("request=" + request + ",response=" + response + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("request={0},response={1} - CALLED!", request, response)); //NOI18N
// request and response must both be set
if (request == null) {
// request is null
- throw new NullPointerException("request is null");
+ throw new NullPointerException("request is null"); //NOI18N
} else if (response == null) {
// response is null
- throw new NullPointerException("response is null");
+ throw new NullPointerException("response is null"); //NOI18N
}
// Try this operations
// Is it already added?
if (this.isProductTitleUsed(request)) {
// Debug message
- this.getLogger().debug("Already used, redirecting ...");
+ this.getLogger().debug("Already used, redirecting ..."); //NOI18N
// Already added, so redirect here, else a ServletException will be thrown
- response.sendRedirect(request.getContextPath() + "/admin/product.jsp?already=1");
+ response.sendRedirect(String.format("%s/admin/product.jsp?already=1", request.getContextPath())); //NOI18N
} else {
// Add new product
this.doAdminAddProduct(request);
}
// Trace message
- this.getLogger().trace("EXIT!");
+ this.getLogger().trace("EXIT!"); //NOI18N
}
/**
@Override
public void doAdminHandleCategoryForms (final HttpServletRequest request, final HttpServletResponse response) throws ServletException {
// Trace message
- this.getLogger().trace("request=" + request + ",response=" + response + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("request={0},response={1} - CALLED!", request, response)); //NOI18N
// request and response must both be set
if (request == null) {
// request is null
- throw new NullPointerException("request is null");
+ throw new NullPointerException("request is null"); //NOI18N
} else if (response == null) {
// response is null
- throw new NullPointerException("response is null");
+ throw new NullPointerException("response is null"); //NOI18N
}
// Try this operations
// Is the category title already used?
if (this.isCategoryTitleUsed(request)) {
// Debug message
- this.getLogger().debug("Already used, redirecting ...");
+ this.getLogger().debug("Already used, redirecting ..."); //NOI18N
// Already added, so redirect here, else a ServletException will be thrown
- response.sendRedirect(request.getContextPath() + "/admin/category.jsp?already=1");
+ response.sendRedirect(String.format("%s/admin/category.jsp?already=1", request.getContextPath())); //NOI18N
} else {
// Add new category
this.doAdminAddCategory(request);
}
// Trace message
- this.getLogger().trace("EXIT!");
+ this.getLogger().trace("EXIT!"); //NOI18N
}
/**
*/
private boolean isCategoryTitleUsed (final HttpServletRequest request) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
- this.getLogger().trace("request=" + request + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("request={0} - CALLED!", request)); //NOI18N
// Init title
String title = request.getParameter(PizzaCategoryDatabaseConstants.COLUMN_TITLE);
// request must not be null and "title" must be found and non-empty
if (request == null) {
// Abort here
- throw new NullPointerException("request is null");
+ throw new NullPointerException("request is null"); //NOI18N
} else if (title == null) {
// title is not set
throw new IllegalArgumentException(MessageFormat.format("{0} is not set.", PizzaCategoryDatabaseConstants.COLUMN_TITLE)); //NOI18N
boolean isUsed = this.isCategoryTitleUsed(title);
// Trace message
- this.getLogger().trace("isUsed=" + isUsed + " - EXIT!");
+ this.getLogger().trace(MessageFormat.format("isUsed={0} - EXIT!", isUsed)); //NOI18N
// Return it
return isUsed;
@Override
public int compareTo (final Category category) {
// Trace message
- this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category));
+ this.getLogger().trace(MessageFormat.format("category={0} - CALLED!", category)); //NOI18N
// category should not be null
if (category == null) {
- throw new NullPointerException("category is null");
+ throw new NullPointerException("category is null"); //NOI18N
}
// Debug message
- this.getLogger().debug(MessageFormat.format("this.id={0},category.id={1}", this.getId(), category.getId()));
+ this.getLogger().debug(MessageFormat.format("this.id={0},category.id={1}", this.getId(), category.getId())); //NOI18N
// Is the id the same?
if (Objects.equals(this.getId(), category.getId())) {
byte[] t = this.getTitle().getBytes();
// Decode it
- return new String(t, "UTF-8");
+ return new String(t, "UTF-8"); //NOI18N
}
/**
}
@Override
- public void setValueFromColumn (final String columnName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ public Object getValueFromColumn (final String columnName) throws IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
// Trace message
- this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value));
+ this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName)); //NOI18N
// Call super method
- this.setValueInStoreableFromColumn(this, "BaseCategory", columnName, value);
+ Object value = this.getValueInStoreableFromColumn(this, "BaseCategory", columnName); //NOI18N
// Trace message
- this.getLogger().trace("EXIT!");
+ this.getLogger().trace(MessageFormat.format("value={0} - EXIT!", value)); //NOI18N
+
+ // Return value
+ return value;
}
@Override
- public Object getValueFromColumn (final String columnName) throws IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
+ public void setValueFromColumn (final String columnName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
- this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName));
-
+ this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value)); //NOI18N
+
// Call super method
- Object value = this.getValueInStoreableFromColumn(this, "BaseCategory", columnName);
-
+ this.setValueInStoreableFromColumn(this, "BaseCategory", columnName, value); //NOI18N
+
// Trace message
- this.getLogger().trace("value=" + value + " - EXIT!");
-
- // Return value
- return value;
+ this.getLogger().trace("EXIT!"); //NOI18N
}
}
/**
* Column name for "id"
*/
- public static final String COLUMN_ID = "id";
+ public static final String COLUMN_ID = "id"; //NOI18N
/**
* Column name for "parent"
*/
- public static final String COLUMN_PARENT = "parent";
+ public static final String COLUMN_PARENT = "parent"; //NOI18N
/**
* Column name for "title"
*/
- public static final String COLUMN_TITLE = "title";
+ public static final String COLUMN_TITLE = "title"; //NOI18N
/**
* No instance from this class
@Override
public Storeable toStoreable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
- this.getLogger().trace("map=" + map + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("map={0} - CALLED!", map));
// Is map null?
if (map == null) {
}
// Debug message
- this.getLogger().debug("Has to handle " + map.size() + " entries");
+ this.getLogger().debug(MessageFormat.format("Has to handle {0} entries", map.size()));
// Get iterator on all entries
Iterator<Map.Entry<String, String>> iterator = map.entrySet().iterator();
Map.Entry<String, String> entry = iterator.next();
// Debug message
- this.getLogger().debug("entry:" + entry.getKey() + "=" + entry.getValue());
+ this.getLogger().debug(MessageFormat.format("entry:{0}={1}", entry.getKey(), entry.getValue()));
// Try to set value
instance.setValueFromColumn(entry.getKey(), entry.getValue());
}
// Trace message
- this.getLogger().trace("instance=" + instance + " - EXIT!");
+ this.getLogger().trace(MessageFormat.format("instance={0} - EXIT!", instance));
// Return it
return instance;
@Override
public Category getCategory (final Product product) throws IOException, BadTokenException, CorruptedDatabaseFileException, SQLException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
- this.getLogger().trace("product=" + product + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product));
// product must not be null
if (product == null) {
Long id = product.getCategory();
// Debug message
- this.getLogger().debug("id=" + id);
+ this.getLogger().debug(MessageFormat.format("id={0}", id));
// It should be >0 here
- assert(id > 0) : "id=" + id + " must be larger zero";
+ assert(id > 0) : MessageFormat.format("id={0} must be larger zero", id);
// Then construct a search instance
SearchableCriteria criteria = new SearchCriteria();
Storeable storeable = result.next();
// Debug message
- this.getLogger().debug("storeable=" + storeable);
+ this.getLogger().debug(MessageFormat.format("storeable={0}", storeable));
// Is it instance of Category?
if (storeable instanceof Category) {
}
// Trace message
- this.getLogger().trace("category=" + category + " - EXIT!");
+ this.getLogger().trace(MessageFormat.format("category={0} - EXIT!", category));
// Return it
return category;
@Override
public Object emptyStringToNull (final String key, final Object value) {
// Trace message
- this.getLogger().trace(MessageFormat.format("key={0},value={1} - CALLED!", key, value));
+ this.getLogger().trace(MessageFormat.format("key={0},value={1} - CALLED!", key, value)); //NOI18N
// Copy value
Object v = value;
// Is the value empty?
- if ((value instanceof String) && ("".equals(value))) {
+ if ((value instanceof String) && ("".equals(value))) { //NOI18N
// This value may need to be changed
switch (key) {
}
}
// Trace message
- this.getLogger().trace(MessageFormat.format("v={0} - EXIT!", v));
+ this.getLogger().trace(MessageFormat.format("v={0} - EXIT!", v)); //NOI18N
// Return it
return v;
@Override
public Result<? extends Storeable> getResultFromSet (final ResultSet resultSet) throws SQLException {
// Trace message
- this.getLogger().trace(MessageFormat.format("resultSet={0} - CALLED!", resultSet));
+ this.getLogger().trace(MessageFormat.format("resultSet={0} - CALLED!", resultSet)); //NOI18N
// Init result instance
Result<? extends Storeable> result = new DatabaseResult();
Boolean available = resultSet.getBoolean(PizzaProductDatabaseConstants.COLUMN_AVAILABLE);
// Debug message
- this.getLogger().debug(MessageFormat.format("id={0},title={1},category={2},available={3}", id, title, category, available));
+ this.getLogger().debug(MessageFormat.format("id={0},title={1},category={2},available={3}", id, title, category, available)); //NOI18N
// Instance new object
Product product = new PizzaProduct(id, title, price, category, available);
// Debug log
- this.getLogger().debug(MessageFormat.format("product={0}", product));
+ this.getLogger().debug(MessageFormat.format("product={0}", product)); //NOI18N
// Add it to result
result.add(product);
}
// Trace message
- this.getLogger().trace(MessageFormat.format("result({0})={1} - EXIT!", result.size(), result));
+ this.getLogger().trace(MessageFormat.format("result({0})={1} - EXIT!", result.size(), result)); //NOI18N
// Return result
return result;
@Override
public boolean isProductTitleUsed (String title) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
- this.getLogger().trace(MessageFormat.format("title={0} - CALLED!", title));
+ this.getLogger().trace(MessageFormat.format("title={0} - CALLED!", title)); //NOI18N
// Get search criteria
SearchableCriteria criteria = new SearchCriteria();
Result<? extends Storeable> result = this.getBackend().doSelectByCriteria(criteria);
// Debug log
- this.getLogger().debug(MessageFormat.format("result({0}={1}", result, result.size()));
+ this.getLogger().debug(MessageFormat.format("result({0}={1}", result, result.size())); //NOI18N
// Now check size of the result
boolean isFound = (result.size() == 1);
// Trace message
- this.getLogger().trace(MessageFormat.format("isFound={0} - EXIT!", isFound));
+ this.getLogger().trace(MessageFormat.format("isFound={0} - EXIT!", isFound)); //NOI18N
// Return it
return isFound;
@Override
public void addProduct (final String title, final Float price, final Long category, final Boolean available) throws SQLException, IOException {
// Trace message
- this.getLogger().trace(MessageFormat.format("title={0},price={1},category={2} - CALLED!", title, price, category));
+ this.getLogger().trace(MessageFormat.format("title={0},price={1},category={2} - CALLED!", title, price, category)); //NOI18N
// Title should not be null
if (title == null) {
// Abort here
- throw new NullPointerException("title is null");
+ throw new NullPointerException("title is null"); //NOI18N
} else if (price == null) {
// Abort here
- throw new NullPointerException("price is null");
+ throw new NullPointerException("price is null"); //NOI18N
} else if (category == null) {
// Abort here
- throw new NullPointerException("category is null");
+ throw new NullPointerException("category is null"); //NOI18N
} else if (available == null) {
// Abort here
- throw new NullPointerException("available is null");
+ throw new NullPointerException("available is null"); //NOI18N
}
// Clear dataset from previous usage
Result<? extends Storeable> result = this.doInsertDataSet();
// Debug message
- this.getLogger().debug(MessageFormat.format("result={0}", result));
+ this.getLogger().debug(MessageFormat.format("result={0}", result)); //NOI18N
// Trace message
- this.getLogger().trace("EXIT!");
+ this.getLogger().trace("EXIT!"); //NOI18N
}
/**
@Override
public Storeable toStoreable (final Map<String, String> map) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
- this.getLogger().trace("map=" + map + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("map={0} - CALLED!", map)); //NOI18N
// Is map null?
if (map == null) {
// Is null
- throw new NullPointerException("map is null");
+ throw new NullPointerException("map is null"); //NOI18N
} else if (map.isEmpty()) {
// Map is empty
- throw new IllegalArgumentException("map is empty.");
+ throw new IllegalArgumentException("map is empty."); //NOI18N
}
// Debug message
- this.getLogger().debug("Has to handle " + map.size() + " entries");
+ this.getLogger().debug(MessageFormat.format("Has to handle {0} entries", map.size())); //NOI18N
// Get iterator on all entries
Iterator<Map.Entry<String, String>> iterator = map.entrySet().iterator();
Map.Entry<String, String> entry = iterator.next();
// Debug message
- this.getLogger().debug("entry:" + entry.getKey() + "=" + entry.getValue());
+ this.getLogger().debug(MessageFormat.format("entry:{0}={1}", entry.getKey(), entry.getValue())); //NOI18N
// Try to set value
instance.setValueFromColumn(entry.getKey(), entry.getValue());
}
// Trace message
- this.getLogger().trace("instance=" + instance + " - EXIT!");
+ this.getLogger().trace(MessageFormat.format("instance={0} - EXIT!", instance)); //NOI18N
// Return it
return instance;
/**
* Column name for "available"
*/
- public static final String COLUMN_AVAILABLE = "available";
+ public static final String COLUMN_AVAILABLE = "available"; //NOI18N
/**
* Column name for "category"
*/
- public static final String COLUMN_CATEGORY = "category";
+ public static final String COLUMN_CATEGORY = "category"; //NOI18N
/**
* Column name for "id"
*/
- public static final String COLUMN_ID = "id";
+ public static final String COLUMN_ID = "id"; //NOI18N
/**
* Column name for "price"
*/
- public static final String COLUMN_PRICE = "price";
+ public static final String COLUMN_PRICE = "price"; //NOI18N
/**
* Column name for "title"
*/
- public static final String COLUMN_TITLE = "title";
+ public static final String COLUMN_TITLE = "title"; //NOI18N
/**
* No instance from this class
*/
public CategoryTitleAlreadyUsedException (final HttpServletRequest request) {
// Call super constructor
- super(MessageFormat.format("Title {0} is already used.", request.getParameter(PizzaCategoryDatabaseConstants.COLUMN_TITLE)));
+ super(MessageFormat.format("Title {0} is already used.", request.getParameter(PizzaCategoryDatabaseConstants.COLUMN_TITLE))); //NOI18N
}
}
*/
public ProductTitleAlreadyUsedException (final HttpServletRequest request) {
// Call super constructor
- super(MessageFormat.format("Title {0} is already used.", request.getParameter(PizzaProductDatabaseConstants.COLUMN_TITLE)));
+ super(MessageFormat.format("Title {0} is already used.", request.getParameter(PizzaProductDatabaseConstants.COLUMN_TITLE))); //NOI18N
}
}
*/
private FilterConfig config;
- /**
- * Configuration instance
- * @return the config
- */
- protected FilterConfig getConfig () {
- return this.config;
- }
-
- /**
- * Configuration instance
- * @param config the config to set
- */
- protected void setConfig (final FilterConfig config) {
- this.config = config;
- }
-
/**
* Destroys this filter
*/
// Set config instance
this.setConfig(filterConfig);
}
+
+ /**
+ * Configuration instance
+ * @return the config
+ */
+ protected FilterConfig getConfig () {
+ return this.config;
+ }
+
+ /**
+ * Configuration instance
+ * @param config the config to set
+ */
+ protected void setConfig (final FilterConfig config) {
+ this.config = config;
+ }
}
chain.doFilter(request, response);
// Set response/request both to UTF-8
- request.setCharacterEncoding("UTF-8");
- response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8"); //NOI18N
+ response.setCharacterEncoding("UTF-8"); //NOI18N
}
}
*/
private String title;
+ /**
+ * Compares two categories with each other
+ *
+ * @param product Product comparator
+ * @return Comparison value
+ */
+ @Override
+ public int compareTo (final Product product) {
+ // Trace message
+ this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product)); //NOI18N
+
+ // category should not be null
+ if (product == null) {
+ throw new NullPointerException("product is null"); //NOI18N
+ }
+
+ // Debug message
+ this.getLogger().debug(MessageFormat.format("this.id={0},product.id={1}", this.getId(), product.getId())); //NOI18N
+
+ // Is the id the same?
+ if (Objects.equals(this.getId(), product.getId())) {
+ // Same id, means same category
+ return 0;
+ } else if (this.getId() > product.getId()) {
+ // This id is larger than compared to
+ return 1;
+ }
+
+ // The other id is larger
+ return -1;
+ }
+
/**
* Getter for product availability
*
this.title = title;
}
- /**
- * Compares two categories with each other
- *
- * @param product Product comparator
- * @return Comparison value
- */
- @Override
- public int compareTo (final Product product) {
- // Trace message
- this.getLogger().trace(MessageFormat.format("product={0} - CALLED!", product));
-
- // category should not be null
- if (product == null) {
- throw new NullPointerException("product is null");
- }
-
- // Debug message
- this.getLogger().debug(MessageFormat.format("this.id={0},product.id={1}", this.getId(), product.getId()));
-
- // Is the id the same?
- if (Objects.equals(this.getId(), product.getId())) {
- // Same id, means same category
- return 0;
- } else if (this.getId() > product.getId()) {
- // This id is larger than compared to
- return 1;
- }
-
- // The other id is larger
- return -1;
- }
-
@Override
public Object getValueFromColumn (final String columnName) throws IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
// Trace message
- this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName));
+ this.getLogger().trace(MessageFormat.format("columnName={0} - CALLED!", columnName)); //NOI18N
// Call super method
- Object value = this.getValueInStoreableFromColumn(this, "BaseProduct", columnName);
+ Object value = this.getValueInStoreableFromColumn(this, "BaseProduct", columnName); //NOI18N
// Trace message
- this.getLogger().trace("value=" + value + " - EXIT!");
+ this.getLogger().trace(MessageFormat.format("value={0} - EXIT!", value)); //NOI18N
// Return value
return value;
@Override
public void setValueFromColumn (final String columnName, final Object value) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
// Trace message
- this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value));
+ this.getLogger().trace(MessageFormat.format("columnName={0},value={1} - CALLED!", columnName, value)); //NOI18N
// Call super method
- this.setValueInStoreableFromColumn(this, "BaseProduct", columnName, value);
+ this.setValueInStoreableFromColumn(this, "BaseProduct", columnName, value); //NOI18N
// Trace message
- this.getLogger().trace("EXIT!");
+ this.getLogger().trace("EXIT!"); //NOI18N
}
}
*/
package org.mxchange.pizzaapplication.product.pizza;
+import java.text.MessageFormat;
import org.mxchange.pizzaapplication.product.BaseProduct;
import org.mxchange.pizzaapplication.product.Product;
*/
public PizzaProduct (final Long id, final String title, final Float price, final Long category, final Boolean available) {
// Trace message
- this.getLogger().trace("id=" + id + ",title=" + title + ",price=" + price + ",category=" + category + ",available=" + available + " - CALLED!");
+ this.getLogger().trace(MessageFormat.format("id={0},title={1},price={2},category={3},available={4} - CALLED!", id, title, price, category, available)); //NOI18N
// Set all here
this.setId(id);