99 lines
2 KiB
Java
99 lines
2 KiB
Java
package it.acxent.cart;
|
|
|
|
public class AcCartObject {
|
|
private Class<CartItemIterface> itemClass;
|
|
|
|
private Object id;
|
|
|
|
private double quantity;
|
|
|
|
private boolean RM;
|
|
|
|
private String codPromo;
|
|
|
|
private String lang;
|
|
|
|
public AcCartObject() {}
|
|
|
|
public AcCartObject(Class theItemClass, Object theId, double theQuantity) {
|
|
setItemClass(theItemClass);
|
|
setId(theId);
|
|
setQuantity(theQuantity);
|
|
}
|
|
|
|
public AcCartObject(Class theItemClass, long theId, double theQuantity, boolean rm) {
|
|
setItemClass(theItemClass);
|
|
setId(new Long(theId));
|
|
setQuantity(theQuantity);
|
|
setRM(rm);
|
|
}
|
|
|
|
public AcCartObject(Class theItemClass, long theId, double theQuantity) {
|
|
setItemClass(theItemClass);
|
|
setId(new Long(theId));
|
|
setQuantity(theQuantity);
|
|
}
|
|
|
|
public AcCartObject(Class theItemClass, Object theId, double theQuantity, boolean rm) {
|
|
setItemClass(theItemClass);
|
|
setId(theId);
|
|
setQuantity(theQuantity);
|
|
setRM(rm);
|
|
}
|
|
|
|
public Object getId() {
|
|
return this.id;
|
|
}
|
|
|
|
public Class<CartItemIterface> getItemClass() {
|
|
return this.itemClass;
|
|
}
|
|
|
|
public double getQuantity() {
|
|
return this.quantity;
|
|
}
|
|
|
|
public void setId(Object newId) {
|
|
this.id = newId;
|
|
}
|
|
|
|
public void setId(long newId) {
|
|
this.id = new Long(newId);
|
|
}
|
|
|
|
public void setItemClass(Class<CartItemIterface> newItemClass) {
|
|
this.itemClass = newItemClass;
|
|
}
|
|
|
|
public void setQuantity(double newQuantity) {
|
|
this.quantity = newQuantity;
|
|
}
|
|
|
|
public String getItemsKey() {
|
|
return String.valueOf(getId()) + " " + String.valueOf(getId());
|
|
}
|
|
|
|
public boolean isRM() {
|
|
return this.RM;
|
|
}
|
|
|
|
public void setRM(boolean rM) {
|
|
this.RM = rM;
|
|
}
|
|
|
|
public String getCodPromo() {
|
|
return (this.codPromo == null) ? "" : this.codPromo.trim();
|
|
}
|
|
|
|
public void setCodPromo(String codPromo) {
|
|
this.codPromo = codPromo;
|
|
}
|
|
|
|
public String getLang() {
|
|
return (this.lang == null) ? "" : this.lang.trim();
|
|
}
|
|
|
|
public void setLang(String lang) {
|
|
this.lang = lang;
|
|
}
|
|
}
|