java.lang.Object | +--com.ibm.commerce.couponredemption.commands.CouponUtilities
A utility class with common functions called repeatedly from different
classes. It uses the following access beans:
CatalogEntryRelationAccessBean
StoreAccessBean
OrderItemAccessBean
CatalogGroupRelationAccessBean
CatalogGroupCatalogEntryRelationAccessBean
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Constructor Summary | |
---|---|
CouponUtilities() |
Method Summary | |
---|---|
static int |
belongsToItemOrProduct(java.lang.Long catalogProductId,
java.lang.Long catalogEntryId) This method checkes whether the given catalog entry is the same as or belongs to the given product or catalog entry. |
static java.math.BigDecimal |
calculateTotalOrderAmt(java.util.Vector vecoiAB,
StoreAccessBean sAB,
CurrencyManager cm,
java.lang.String curCurrency) This method calculates the total order amount. |
static int |
catEntBelongsToCatGrp(java.lang.Long catalogEntryId,
java.lang.Long catalogGroupId, java.lang.Long catalogId) This method checkes whether the given catalog entry belongs to the given catalog group in a given catalog. |
static int |
groupBelongsTo(java.lang.String catalogId,
java.lang.String parentGroupId, java.lang.String childGroupId) This method checkes whether a given catalog group belongs to another given catalog group in a given catalog. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public CouponUtilities()
Method Detail |
---|
public static int belongsToItemOrProduct(java.lang.Long catalogProductId, java.lang.Long catalogEntryId)
catalogProductId
- the target parent product or catalog
entrycatalogEntryId
- the target child catalog entrypublic static java.math.BigDecimal calculateTotalOrderAmt(java.util.Vector vecoiAB, StoreAccessBean sAB, CurrencyManager cm, java.lang.String curCurrency) throws ECSystemException
vecoiAB
- the orderitemssAB
- access bean for the storecm
- the currency manager to be usedcurCurrency
- the currency to compute the total order amount
in
ECSystemException
public static int catEntBelongsToCatGrp(java.lang.Long catalogEntryId, java.lang.Long catalogGroupId, java.lang.Long catalogId)
catalogEntryId
- the target child catalog entrycatalogGroupId
- the target parent catalog groupcatalogId
- the catalog IDpublic static int groupBelongsTo(java.lang.String catalogId, java.lang.String parentGroupId, java.lang.String childGroupId)
catalogId
- the catalog IDparentGroupId
- the target parent catalog groupchildGroupId
- the target child catalog group