public class Product extends JDBCObject<Product>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DESC_HTML
The file extension for a ".html" type of description file.
|
static java.lang.String |
DESC_TXT
The file extension for a ".txt" type of description file.
|
static java.lang.String |
IMG_GIF
The file extension for a ".gif" type of image file.
|
static java.lang.String |
IMG_JPG
The file extension for a ".jpg" type of image file.
|
static java.lang.String |
IMG_PNG
The file extension for a ".png" type of image file.
|
private static long |
serialVersionUID
The class' serialization version id.
|
static int |
SIZE_LARGE
The size code for a large sized description or image file.
|
static int |
SIZE_SMALL
The size code for a small sized description or image file.
|
static java.lang.String |
STOCKSTATUS_AVAILABLE
The status code for an available stock product.
|
static java.lang.String |
STOCKSTATUS_LOW
The status code for a low stock product.
|
static java.lang.String |
STOCKSTATUS_OUT
The status code for an out of stock product.
|
protected static FileNameTranslator |
TRANSLATOR
The file name translator for description and image file names.
|
LOWVAL_RPG_DATE, LOWVAL_RPG_TIME, STATUS_ACTIVE, STATUS_BLANK, STATUS_CANCELED, STATUS_DELETED, STATUS_INACTIVE, STATUS_PENDINGivHashCode, ivHashFlds, ivObjAttrs| Constructor and Description |
|---|
Product()
Constructs a
Product object with all field values set to
null. |
| Modifier and Type | Method and Description |
|---|---|
int |
getAvailableQty()
Returns the quantity available.
|
int |
getAvailableQty2()
Returns the quantity available.
|
Category |
getCategory(FlashServletContext ctx)
Returns the default category.
|
java.lang.String |
getCategoryCode()
Returns the default category code.
|
java.lang.String |
getClassCode()
Returns the classification code.
|
java.lang.String |
getCode()
Returns the product code.
|
java.lang.String |
getCustomerPartNumber()
(not persisted) Returns the customer part number.
|
java.lang.String |
getDescription()
Returns the description.
|
java.io.File |
getDescriptionFile(int size)
Returns a file object for a product description file based on the given
file size (small or large).
|
static java.io.File |
getDescriptionFile(java.lang.String code,
int size)
Returns a file object for a product description file based on the given
file size (small or large).
|
java.lang.String |
getDescriptionFileContent(int size)
Returns the file content for a product description file based on the given
file size (small or large).
|
java.lang.String |
getDescriptionFileContent(int size,
boolean prune)
Returns the file content for a product description file based on the given
file size (small or large).
|
static java.lang.String |
getDescriptionFileContent(java.lang.String code,
int size)
Returns the file content for a product description file based on the given
file size (small or large).
|
static java.lang.String |
getDescriptionFileContent(java.lang.String code,
int size,
boolean prune)
Returns the file content for a product description file based on the given
file size (small or large).
|
java.lang.String |
getDescriptionRootName(int size)
Returns the root name (without extension) for a product description file
based on the given file size (small or large).
|
static java.lang.String |
getDescriptionRootName(java.lang.String code,
int size)
Returns the root name (without extension) for a product description file
based on the given file size (small or large).
|
java.io.File |
getImageFile(int size)
Returns a file object for a product image file based on the given file
size (small or large).
|
static java.io.File |
getImageFile(java.lang.String code,
int size)
Returns a file object for a product image file based on the given file
size (small or large).
|
java.lang.String |
getImageRootName(int size)
Returns the root name (without extension) for a product image file based
on the given file size (small or large).
|
static java.lang.String |
getImageRootName(java.lang.String code,
int size)
Returns the root name (without extension) for a product image file based
on the given file size (small or large).
|
java.lang.String |
getImageURL(int size)
Returns the relative URL for a product image file based on the given file
size (small or large).
|
java.lang.String |
getImageURL(int size,
boolean full)
Returns the relative or full URL for a product image file based on the
given file size (small or large).
|
static java.lang.String |
getImageURL(java.lang.String code,
int size)
Returns the relative URL for a product image file based on the given file
size (small or large).
|
static java.lang.String |
getImageURL(java.lang.String code,
int size,
boolean full)
Returns the relative or full URL for a product image file based on the
given file size (small or large).
|
Leadtime |
getLeadtime()
Returns the lead time object.
|
java.lang.String |
getLeadtimeCode()
Returns the lead time code.
|
java.math.BigDecimal |
getListPrice()
(not persisted) Returns the list price (price that comes from product
table before any realtime information from ERP).
|
java.lang.String |
getMfrCode()
Returns the manufacturer code.
|
java.lang.String |
getMfrPartCode()
Returns the manufacturer part number.
|
boolean |
getOnOrderFromSupplier()
(not persisted) Returns the product's on order from supplier flag.
|
java.util.ArrayList<QuantityOnOrder> |
getOnOrderFromSupplierDetail()
(not persisted) Returns the product's on order from supplier detailed information.
|
boolean |
getQtyBreakPossible()
(not persisted) Returns the quantity break possible flag.
|
java.util.ArrayList<QuantityPriceBreak> |
getQtyBreakPricing()
(not persisted) Returns the collection of quantity break pricing.
|
boolean |
getRealtimeInfoSet()
(not persisted) Returns real time information set flag.
|
java.util.ArrayList<RelatedProductsHandler.Relationship> |
getRelatedItems()
(not persisted) Returns the collection of related items.
|
java.util.ArrayList<RelatedProductsHandler.Relationship> |
getRelatedItemsForIcon()
(not persisted) Returns the collection of related items for icon display
purposes.
|
java.math.BigDecimal |
getRetailPrice()
Returns the unit price amount.
|
java.lang.Integer |
getStockLowQty()
Returns the low stock quantity.
|
java.lang.String |
getStockLowQtyStr()
Returns the low stock quantity.
|
java.lang.Integer |
getStockOutQty()
Returns the out of stock quantity.
|
java.lang.String |
getStockOutQtyStr()
Returns the out of stock quantity.
|
java.lang.String |
getStockStatus()
(not persisted) Returns the stock status code.
|
java.lang.String |
getStockStatus2()
(not persisted) Returns the secondary stock status code.
|
java.lang.String |
getStockStatus2Description()
(not persisted) Returns the secondary stock status description.
|
java.lang.String |
getStockStatus2ImageURL()
(not persisted) Returns the secondary stock status image URL.
|
java.lang.String |
getStockStatus2ImageURL(boolean full)
(not persisted) Returns the secondary stock status image URL.
|
java.lang.String |
getStockStatusDescription()
(not persisted) Returns the stock status description.
|
java.lang.String |
getStockStatusImageURL()
(not persisted) Returns the stock status image URL.
|
java.lang.String |
getStockStatusImageURL(boolean full)
(not persisted) Returns the stock status image URL.
|
UnitMeasure |
getUom()
Returns the unit of measure object.
|
java.lang.String |
getUomCode()
Returns the unit of measure code.
|
java.util.ArrayList<WarehouseQuantity> |
getWarehouseQtys()
(not persisted) Returns the collection of warehouse quantities.
|
boolean |
hasDescriptionFile(int size)
Answers if the product has a product-specific description file for the
given file size (small or large).
|
static boolean |
hasDescriptionFile(java.lang.String code,
int size)
Answers if the product has a product-specific description file for the
given file size (small or large).
|
boolean |
hasImageFile(int size)
Answers if the product has a product-specific image file for the given
file size (small or large).
|
static boolean |
hasImageFile(java.lang.String code,
int size)
Answers if the product has a product-specific image file for the given
file size (small or large).
|
Manufacturer |
rtvMfr(FlashServletContext ctx)
Retrieves
Manufacturer object associated with this product. |
void |
rtvOnOrderFromSupplierDetail(FlashServletContext ctx)
(not persisted) Retrieves supplier on-order data from the ERP system and
sets the product's collection.
|
void |
rtvQtyBreakPricing(FlashServletContext ctx)
(not persisted) Retrieves quantity break pricing from the ERP system and
sets the product's collection.
|
void |
rtvWarehouseQtys(FlashServletContext ctx)
(not persisted) Retrieves warehouse quantities from the ERP system and
sets the product's collection.
|
void |
setAvailableQty(int value)
Sets the quantity available.
|
void |
setAvailableQty2(int value)
Sets the quantity available.
|
void |
setCategoryCode(java.lang.String value)
Sets the default category code.
|
void |
setClassCode(java.lang.String value)
Sets the classification code.
|
void |
setCode(java.lang.String value)
Sets the product code.
|
void |
setCustomerPartNumber(java.lang.String value)
(not persisted) Sets the customer part number.
|
void |
setDescription(java.lang.String value)
Sets the description.
|
void |
setLeadtime(Leadtime value)
Sets the lead time object.
|
private void |
setLeadtimeCode(java.lang.String value)
Sets the lead time code.
|
void |
setListPrice(java.math.BigDecimal value)
(not persisted) Sets the product's list price (price that comes from
product table before any realtime information from ERP).
|
void |
setMfrCode(java.lang.String value)
Sets the manufacturer code.
|
void |
setMfrPartCode(java.lang.String value)
Sets the manufacturer part number.
|
void |
setOnOrderFromSupplier(boolean value)
(not persisted) Sets the product's on order from supplier flag.
|
void |
setOnOrderFromSupplierDetail(java.util.ArrayList<QuantityOnOrder> value)
(not persisted) Sets the product's on order from supplier detailed information.
|
void |
setQtyBreakPossible(boolean value)
(not persisted) Sets the quantity break possible flag.
|
void |
setQtyBreakPricing(java.util.ArrayList<QuantityPriceBreak> value)
(not persisted) Sets the collection of quantity break pricing.
|
void |
setRealtimeInfoSet(boolean value)
(not persisted) Sets the real time information set flag.
|
void |
setRelatedItems(java.util.ArrayList<RelatedProductsHandler.Relationship> value)
(not persisted) Sets the collection of related items.
|
void |
setRelatedItemsForIcon(java.util.ArrayList<RelatedProductsHandler.Relationship> value)
(not persisted) Sets the collection of related items for icon display
purposes.
|
void |
setRetailPrice(java.math.BigDecimal value)
Sets the unit price amount.
|
void |
setStockLowQty(java.lang.Integer value)
Sets the low stock quantity.
|
void |
setStockOutQty(java.lang.Integer value)
Sets the out of stock quantity.
|
void |
setStockStatus(java.lang.String value)
(not persisted) Sets the stock status code.
|
void |
setStockStatus2(java.lang.String value)
(not persisted) Sets the secondary stock status code.
|
void |
setUom(UnitMeasure value)
Sets the unit of measure object.
|
private void |
setUomCode(java.lang.String value)
Sets the unit of measure code.
|
void |
setWarehouseQtys(java.util.ArrayList<WarehouseQuantity> value)
(not persisted) Sets the collection of warehouse quantities.
|
after, before, compareTo, equals, fmtStatus, fmtStatus, getObjectStatus, hashKey, setObjectStatuscloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArrayprivate static final long serialVersionUID
protected static final FileNameTranslator TRANSLATOR
public static final java.lang.String STOCKSTATUS_LOW
public static final java.lang.String STOCKSTATUS_OUT
public static final java.lang.String STOCKSTATUS_AVAILABLE
public static final int SIZE_SMALL
public static final int SIZE_LARGE
public static final java.lang.String DESC_TXT
public static final java.lang.String DESC_HTML
public static final java.lang.String IMG_GIF
public static final java.lang.String IMG_JPG
public static final java.lang.String IMG_PNG
public Product()
Product object with all field values set to
null.public java.lang.String getCode()
public void setCode(java.lang.String value)
value - (String) The product code.public java.lang.String getDescription()
public void setDescription(java.lang.String value)
value - (String) The description.public Category getCategory(FlashServletContext ctx)
ctx - (FlashServletContext) The current servlet context.public java.lang.String getCategoryCode()
public void setCategoryCode(java.lang.String value)
value - (String) The default category code.public java.math.BigDecimal getRetailPrice()
public void setRetailPrice(java.math.BigDecimal value)
value - (BigDecimal) The unit price amount.public java.math.BigDecimal getListPrice()
public void setListPrice(java.math.BigDecimal value)
value - (BigDecimal) The list price amount.public UnitMeasure getUom()
public void setUom(UnitMeasure value)
value - (UnitMeasure) The unit of measure object.public java.lang.String getUomCode()
private void setUomCode(java.lang.String value)
value - (String) The unit of measure code.public int getAvailableQty()
public void setAvailableQty(int value)
value - (int) The quantity available.public int getAvailableQty2()
public void setAvailableQty2(int value)
value - (int) The quantity available.public java.lang.Integer getStockLowQty()
null if a quantity
is not defined.public java.lang.String getStockLowQtyStr()
public void setStockLowQty(java.lang.Integer value)
value - (Integer) The low stock quantity or null if a
quantity is not defined.public java.lang.Integer getStockOutQty()
null if a
quantity is not defined.public java.lang.String getStockOutQtyStr()
public void setStockOutQty(java.lang.Integer value)
value - (Integer) The out of stock quantity or null if a
quantity is not defined.public Leadtime getLeadtime()
public void setLeadtime(Leadtime value)
value - (Leadtime) The lead time object.public java.lang.String getLeadtimeCode()
private void setLeadtimeCode(java.lang.String value)
value - (String) The lead time code.public java.lang.String getMfrPartCode()
public void setMfrPartCode(java.lang.String value)
value - (String) The manufacturer part number.public java.lang.String getMfrCode()
public void setMfrCode(java.lang.String value)
value - (String) The manufacturer code.public Manufacturer rtvMfr(FlashServletContext ctx)
Manufacturer object associated with this product.public java.lang.String getClassCode()
public void setClassCode(java.lang.String value)
value - (String) The classification code.public java.lang.String getCustomerPartNumber()
public void setCustomerPartNumber(java.lang.String value)
value - (String) The customer part number.public java.lang.String getStockStatus()
public void setStockStatus(java.lang.String value)
value - (String) The stock status code.public java.lang.String getStockStatusDescription()
public java.lang.String getStockStatusImageURL()
public java.lang.String getStockStatusImageURL(boolean full)
full - (boolean) true to return the fully qualified URL
or false to return the relative URL. The fully qualified
URL is per Profile "Site.URL.Nonsecure".public java.lang.String getStockStatus2()
public void setStockStatus2(java.lang.String value)
value - (String) The secondary stock status code.public java.lang.String getStockStatus2Description()
public java.lang.String getStockStatus2ImageURL()
public java.lang.String getStockStatus2ImageURL(boolean full)
full - (boolean) true to return the fully qualified URL
or false to return the relative URL. The fully qualified
URL is per Profile "Site.URL.Nonsecure".public boolean getQtyBreakPossible()
public void setQtyBreakPossible(boolean value)
value - (boolean) The quantity break possible flag.public java.util.ArrayList<QuantityPriceBreak> getQtyBreakPricing()
null if no
quantity break pricing exists for the product.public void rtvQtyBreakPricing(FlashServletContext ctx)
null).ctx - (FlashServletContext) The current servlet context.public void setQtyBreakPricing(java.util.ArrayList<QuantityPriceBreak> value)
value - (ArrayList) The quantity break pricing.public java.util.ArrayList<WarehouseQuantity> getWarehouseQtys()
null if no
warehouse quantities exist for the product.public void rtvWarehouseQtys(FlashServletContext ctx)
null).ctx - (FlashServletContext) The current servlet context.public void setWarehouseQtys(java.util.ArrayList<WarehouseQuantity> value)
value - (ArrayList) The warehouse quantities.public boolean hasDescriptionFile(int size)
size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).true if a product-specific description file
exists, otherwise false.public static boolean hasDescriptionFile(java.lang.String code,
int size)
code - (String) The product code for the desired description file.size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).true if a product-specific description file
exists, otherwise false.public java.io.File getDescriptionFile(int size)
size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).public static java.io.File getDescriptionFile(java.lang.String code,
int size)
code - (String) The product code for the desired description file.size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).public java.lang.String getDescriptionFileContent(int size)
TemplatePruner class to remove potentially harmful
html code.size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).public static java.lang.String getDescriptionFileContent(java.lang.String code,
int size)
TemplatePruner class to remove potentially harmful
html code.code - (String) The product code for the desired description file.size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).public java.lang.String getDescriptionFileContent(int size,
boolean prune)
size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).prune - (boolean) true if the content is to be pruned by
invoking the TemplatePruner class to remove potentially
harmful html code.public static java.lang.String getDescriptionFileContent(java.lang.String code,
int size,
boolean prune)
code - (String) The product code for the desired description file.size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).prune - (boolean) true if the content is to be pruned by
invoking the TemplatePruner class to remove potentially
harmful html code.public java.lang.String getDescriptionRootName(int size)
size - (int) The size of the desired description file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).public static java.lang.String getDescriptionRootName(java.lang.String code,
int size)
code - (String) The product code for the desired description file.size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).public boolean hasImageFile(int size)
size - (int) The size of the desired image file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).true if a product-specific image file exists,
otherwise false.public static boolean hasImageFile(java.lang.String code,
int size)
code - (String) The product code for the desired image file.size - (int) The size of the desired image file. Must be
one of the defined size constants (SIZE_SMALL, SIZE_LARGE).true if a product-specific image file exists,
otherwise false.public java.io.File getImageFile(int size)
size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).public static java.io.File getImageFile(java.lang.String code,
int size)
code - (String) The product code for the desired image file.size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).public java.lang.String getImageRootName(int size)
size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).public static java.lang.String getImageRootName(java.lang.String code,
int size)
code - (String) The product code for the desired image file.size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).public java.lang.String getImageURL(int size)
size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).public static java.lang.String getImageURL(java.lang.String code,
int size)
code - (String) The product code for the desired image file.size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).public java.lang.String getImageURL(int size,
boolean full)
size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).full - (boolean) true to return the fully qualified URL
or false to return the relative URL. The fully qualified
URL is per Profile.BASE_URL_NONSECURE.public static java.lang.String getImageURL(java.lang.String code,
int size,
boolean full)
code - (String) The product code for the desired image file.size - (int) The size of the desired image file. Must be one of
the defined size constants (SIZE_SMALL, SIZE_LARGE).full - (boolean) true to return the fully qualified URL
or false to return the relative URL. The fully qualified
URL is per Profile.BASE_URL_NONSECURE.public boolean getRealtimeInfoSet()
public void setRealtimeInfoSet(boolean value)
value - (boolean) The real time set flag.public boolean getOnOrderFromSupplier()
public void setOnOrderFromSupplier(boolean value)
value - (boolean) The product's on order from supplier flag.public java.util.ArrayList<QuantityOnOrder> getOnOrderFromSupplierDetail()
public void rtvOnOrderFromSupplierDetail(FlashServletContext ctx)
null).ctx - (FlashServletContext) The current servlet context.public void setOnOrderFromSupplierDetail(java.util.ArrayList<QuantityOnOrder> value)
value - (ArrayList) The product's on order from supplier information.public java.util.ArrayList<RelatedProductsHandler.Relationship> getRelatedItems()
null if related items
have not yet been retrieved for the product.public void setRelatedItems(java.util.ArrayList<RelatedProductsHandler.Relationship> value)
value - (ArrayList) The related items.public java.util.ArrayList<RelatedProductsHandler.Relationship> getRelatedItemsForIcon()
null if related items
have not yet been retrieved for the product.public void setRelatedItemsForIcon(java.util.ArrayList<RelatedProductsHandler.Relationship> value)
value - (ArrayList) The related items.