public class Product extends AbstractIdentifiedHibernateObject<Product> implements IItem, Auditable
Modifier and Type | Field and Description |
---|---|
static int |
ACCOUNTINGLEVEL_CASHOUT |
static int |
ACCOUNTINGLEVEL_TOGO |
static int |
ACCOUNTINGLEVEL_TOPUP |
static Short |
PREP_TIME_DONT_SHOW_ |
static Short |
PREP_TIME_FROM_CATEGORY |
id
Constructor and Description |
---|
Product() |
Product(Double priceSell,
Tax tax)
Create a dummy product for use with Dialog6.
|
Product(String id,
String reference,
String name) |
Modifier and Type | Method and Description |
---|---|
void |
doCategoriesFromArray(Object[] categories) |
void |
doTaxesFromArray(Object[] taxes) |
static List<Product> |
findProductByID(String id,
org.hibernate.Session sess)
Find a product by the product id
|
int |
getAccountingLevel()
Used to assign a product to one or more categories for statistical
accounting purposes.
|
int |
getActMod()
Get the bitmask indicating which modifiers are acrive
for this product: bit = 0 bit means inactive, bit = 1 means active!
|
Set<Category> |
getCategories() |
Category |
getCategory() |
String |
getCode() |
Byte |
getCourse() |
Date |
getCreated_at() |
Integer |
getDisplayOrder() |
Set<ProductEan> |
getEan() |
Image |
getImage() |
Product |
getItem() |
String |
getLongDescription() |
int |
getModifiers()
Get the bitmask indicating which modifiers are permitted
for this product: bit = 0 bit means allow, bit = 1 means deny!
|
String |
getName() |
Short |
getPrep_time()
Get the preparation time for this products.
|
Double |
getPriceBase() |
Double |
getPriceBuy() |
Double |
getPriceSell_1()
Get an alternative selling price 1.
|
Double |
getPriceSell_2()
Get an alternative selling price 2.
|
Double |
getPriceSell() |
Set<ProductLocation> |
getProductLocations() |
String |
getReference() |
Date |
getRepl_avail_date() |
String |
getRepl_code() |
Date |
getRepl_date() |
Product |
getReplacement() |
Double |
getStockCost() |
Tare |
getTare() |
Tax |
getTax() |
Set<Tax> |
getTaxes() |
Date |
getTimed_availability_to() |
Double |
getUnits() |
String |
getUnitType() |
Date |
getUpdated_at() |
Double |
getVolume() |
Boolean |
isCom() |
Boolean |
isInStock()
Whether the product is available to be bought/sold.
|
Boolean |
isScale() |
String |
printPriceSell() |
String |
printPriceSellTax() |
Double |
retrieveCombinedTaxRate() |
void |
setAccountingLevel(int accountingLevel) |
void |
setActMod(int actMod)
Set the bitmask indicating which modifiers are acrive
for this product: bit = 0 bit means inactive, bit = 1 means active!
|
void |
setCategories(Set<Category> categories) |
void |
setCategory(Category category) |
void |
setCode(String code) |
void |
setCom(Boolean com) |
void |
setCourse(Byte course) |
void |
setCreated_at(Date created_at) |
void |
setDisplayOrder(Integer displayOrder)
Sets the position this product will be displayed in within its category
|
void |
setEan(Set<ProductEan> ean) |
void |
setImage(Image image) |
void |
setInStock(Boolean inStock)
Whether the product is available to be bought/sold.
|
void |
setLongDescription(String longDescription) |
void |
setModifiers(int modifiers)
Set the bitmask indicating which modifiers are permitted
for this product: bit = 0 bit means allow, bit = 1 means deny!
|
void |
setName(String name) |
void |
setPrep_time(Short prep_time)
Get the preparation time for this products.
|
void |
setPriceBase(Double priceBase) |
void |
setPriceBuy(Double priceBuy) |
void |
setPriceSell_1(Double priceSell_1)
Set an alternative selling price
|
void |
setPriceSell_2(Double priceSell_2)
Set an alternative selling price
|
void |
setPriceSell(Double priceSell) |
void |
setProductLocations(Set<ProductLocation> productLocations) |
void |
setReference(String reference) |
void |
setRepl_avail_date(Date repl_avail_date) |
void |
setRepl_code(String repl_code) |
void |
setRepl_date(Date repl_date) |
void |
setScale(Boolean scale) |
void |
setStockCost(Double stockCost) |
void |
setTare(Tare tare) |
void |
setTax(Tax tax) |
void |
setTaxes(Set<Tax> taxes) |
void |
setTimed_availability_to(Date timed_availability_to) |
void |
setUnits(Double units) |
void |
setUnitType(String unitType) |
void |
setUpdated_at(Date updated_at) |
void |
setVolume(Double Volume) |
equals, getId, getVersion, hashCode, setId, setVersion
delete, getGetters, getKeyValue, merge, refresh, save
public static final Short PREP_TIME_DONT_SHOW_
public static final Short PREP_TIME_FROM_CATEGORY
public static final int ACCOUNTINGLEVEL_TOGO
public static final int ACCOUNTINGLEVEL_TOPUP
public static final int ACCOUNTINGLEVEL_CASHOUT
public void setCreated_at(Date created_at)
setCreated_at
in interface Auditable
public void setUpdated_at(Date updated_at)
setUpdated_at
in interface Auditable
public Date getCreated_at()
public Date getUpdated_at()
public void setName(String name) throws BasicException
BasicException
public String getCode()
public void setCode(String code)
public Boolean isCom()
public void setCom(Boolean com)
public Boolean isScale()
public void setScale(Boolean scale)
public Double getPriceBase()
public void setPriceBase(Double priceBase)
public Category getCategory()
public void setCategory(Category category)
public Tax getTax()
public Double retrieveCombinedTaxRate()
public void setTax(Tax tax)
public void doTaxesFromArray(Object[] taxes)
public void doCategoriesFromArray(Object[] categories)
public Double getPriceBuy()
public void setPriceBuy(Double priceBuy)
public Double getPriceSell()
public void setPriceSell(Double priceSell)
public Double getPriceSell_1()
public void setPriceSell_1(Double priceSell_1)
priceSell_1
- public Double getPriceSell_2()
public void setPriceSell_2(Double priceSell_2)
priceSell_1
- public Double getStockCost()
public void setStockCost(Double stockCost)
public Double getVolume()
public void setVolume(Double Volume)
public void setImage(Image image)
public static List<Product> findProductByID(String id, org.hibernate.Session sess)
id
- sess
- A valid Hibernate sessionpublic Integer getDisplayOrder()
public void setDisplayOrder(Integer displayOrder)
displayOrder
- the displayOrder to setpublic Boolean isInStock()
public void setInStock(Boolean inStock)
inStock
- true if is availablepublic Set<ProductLocation> getProductLocations()
public void setProductLocations(Set<ProductLocation> productLocations)
public String printPriceSellTax()
public String printPriceSell()
public String getReference()
public void setReference(String reference)
reference
- the reference to setpublic int getModifiers()
public void setModifiers(int modifiers)
public int getActMod()
public void setActMod(int actMod)
public int getAccountingLevel()
public void setAccountingLevel(int accountingLevel)
public String getUnitType()
public Double getUnits()
public void setUnitType(String unitType)
public void setUnits(Double units)
public Set<ProductEan> getEan()
public void setEan(Set<ProductEan> ean)
public Tare getTare()
public void setTare(Tare tare)
public Short getPrep_time()
public void setPrep_time(Short prep_time)
prep_time
- the preparation time for this products.public Byte getCourse()
public void setCourse(Byte course)
public Date getRepl_avail_date()
public void setRepl_avail_date(Date repl_avail_date)
public String getRepl_code()
public void setRepl_code(String repl_code)
public Date getRepl_date()
public void setRepl_date(Date repl_date)
public Date getTimed_availability_to()
public void setTimed_availability_to(Date timed_availability_to)
public Product getReplacement()
public void setLongDescription(String longDescription)
public String getLongDescription()
Copyright © 2021. All rights reserved.