public boolean isItemAdded (final AddableBasketItem item) throws IOException, SQLException, BadTokenException, CorruptedDatabaseFileException, NoSuchMethodException, IllegalAccessException, InvocationTargetException;
/**
- * Returns an item for given product instance or null if not found.
+ * Returns an item for given product instance or null if the basket doesn't
+ * contain such item. Every product has an item id which is unique to it.
+ * The basket stores a session->itemId reference along with
+ * amount of the ordered item (aka. product).
*
* @param product Product instance
* @return Item instance or null
import org.mxchange.jcore.BaseFrameworkSystem;
/**
- * A general item cl
+ * An item (addedable to a basket) could respresent a product or a discount
+ * coupon. This depends on the type of the item.
+ *
* @author Roland Haeder
*/
public class BaseItem extends BaseFrameworkSystem implements AddableBasketItem {
return 1;
}
- /**
- * Item amount
- * @return the amount
- */
@Override
public final Long getAmount () {
return this.amount;
}
- /**
- * Item amount
- * @param amount the amount to set
- */
@Override
public final void setAmount (final Long amount) {
this.amount = amount;
}
- /**
- * Entry id (from database backend)
- * @return the id
- */
@Override
public final Long getId () {
return this.id;
}
- /**
- * Entry id (from database backend)
- * @param id the id to set
- */
@Override
public final void setId (final Long id) {
this.id = id;
}
- /**
- * @return the id
- */
@Override
public final Long getItemId () {
return this.itemId;
}
- /**
- * @param itemId the id to set
- */
@Override
public final void setItemId( final Long itemId) {
this.itemId = itemId;
}
- /**
- * @return the type
- */
@Override
public final String getItemType () {
return this.itemType;
}
- /**
- * @param itemType the type to set
- */
@Override
public final void setItemType (final String itemType) {
this.itemType = itemType;