com.knowgate.hipergate
Class ProductBundle

java.lang.Object
  extended by com.knowgate.dataobjs.DBPersist
      extended by com.knowgate.hipergate.Product
          extended by com.knowgate.hipergate.ProductBundle
All Implemented Interfaces:
java.io.Serializable, java.util.Map

public class ProductBundle
extends Product

Manage Product Bundles

Product Bundles are sets of products that must be sold all together at a discount price. The bundle itself is stored as a Product at k_products table. Actual products contained into the bundle are also stored at k_products and the relationship between the bundle and its composing products is stablished throught k_prod_locats table, being one bundle location for each of its products.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class com.knowgate.hipergate.Product
ClassId, STATUS_ACTIVE, STATUS_BLOCKED, STATUS_CORRUPTED, STATUS_PENDING, STATUS_RETIRED
 
Fields inherited from class com.knowgate.dataobjs.DBPersist
AllVals, sAuditCls, sAuditUsr, sTransactId
 
Constructor Summary
ProductBundle()
           
 
Method Summary
 void addProduct(JDCConnection oConn, java.lang.String sGuProduct)
           
 void addProduct(JDCConnection oConn, java.lang.String sGuProduct, int iPgProduct)
           
 boolean containsProduct(JDCConnection oConn, java.lang.String sGuProduct)
          Check if this bundle contains a given Product
 Product[] getProducts(JDCConnection oConn)
           
 boolean removeProduct(JDCConnection oConn, java.lang.String sGuProduct)
           
 
Methods inherited from class com.knowgate.hipergate.Product
addOrReplaceFare, addToCategory, checkIn, checkOut, delete, eraseLocations, getCategories, getCategoryId, getFare, getFareForDate, getFares, getFaresOfType, getFaresOfType, getFirstLocation, getIdFromName, getIdFromName, getIdFromReference, getImages, getLocations, getPosition, getShop, getShopId, removeFromCategory, salePrice, store
 
Methods inherited from class com.knowgate.dataobjs.DBPersist
allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ProductBundle

public ProductBundle()
Method Detail

containsProduct

public boolean containsProduct(JDCConnection oConn,
                               java.lang.String sGuProduct)
                        throws java.sql.SQLException

Check if this bundle contains a given Product

Parameters:
oConn - JDCConnection
sGuProduct - GUID of Product sought
Returns:
true if xfile column from any ProductLocation of this ProductBundle is equal to sGuProduct
Throws:
java.sql.SQLException

addProduct

public void addProduct(JDCConnection oConn,
                       java.lang.String sGuProduct)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

addProduct

public void addProduct(JDCConnection oConn,
                       java.lang.String sGuProduct,
                       int iPgProduct)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

removeProduct

public boolean removeProduct(JDCConnection oConn,
                             java.lang.String sGuProduct)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

getProducts

public Product[] getProducts(JDCConnection oConn)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException