@SuppressWarnings ("unchecked")
public final static Basket<AddableBasketItem> getInstance (final HttpSession session) throws UnsupportedDatabaseBackendException, SQLException {
// Get instance
- Basket<AddableBasketItem> basket = (Basket<AddableBasketItem>) session.getAttribute("basket");
+ Basket<AddableBasketItem> basket = (Basket<AddableBasketItem>) session.getAttribute("basket"); //NOI18N
// Is the basket already created?
if (!(basket instanceof BaseBasket)) {
basket = new ItemBasket();
// Add it in session
- session.setAttribute("basket", basket);
+ session.setAttribute("basket", basket); //NOI18N
}
// Return it casted
* Default constructor to be able to throw exceptions from super constructor
*/
private ItemBasket () throws UnsupportedDatabaseBackendException, SQLException {
+ // Trace message
+ this.getLogger().trace("CALLED!"); //NOI18N
}
}
/**
* @return the id
*/
+ @Override
public final Long getId () {
return this.id;
}
/**
* @param id the id to set
*/
+ @Override
public final void setId (final Long id) {
this.id = id;
}
/**
* @return the type
*/
+ @Override
public final String getType () {
return this.type;
}
/**
* @param type the type to set
*/
+ @Override
public final void setType (final String type) {
this.type = type;
}