com.ibm.commerce.tools.promotions
Class DiscountChooseListBean

java.lang.Object
  com.ibm.commerce.beans.InputDataBeanImpl
      com.ibm.commerce.beans.SmartDataBeanImpl
          com.ibm.commerce.tools.promotions.beansrc.DiscountChooseListBeanBase
              com.ibm.commerce.tools.promotions.DiscountChooseListBean
All Implemented Interfaces:
DataBean, Delegator, ECPromotionsConstants, InputDataBean, Protectable, java.io.Serializable, SimpleDynamicListBean, SmartDataBean

public class DiscountChooseListBean
extends DiscountChooseListBeanBase
implements SimpleDynamicListBean, ECPromotionsConstants

The bean representing an discount calculationcode list of a store. This bean maps to the table calcode.

See Also:
Serialized Form

Field Summary
protected java.util.Vector calcode_Id
Provide a vector of calcode ID.
protected java.lang.String calcodeId
Provide the string type of calcode ID.
protected java.util.Vector code
Provide a vector of code.
static java.lang.String COPYRIGHT
The internal copyright field.
protected java.util.Vector description
Provide a vector of administration description.
protected DiscountChooseListRow[] discountRowList
Provide an object Array of DiscountChooseListRow for dynamic list.
protected java.util.Vector endDate
Provide a vector of discount end date.
protected java.lang.String endIndex
Provide the string type of end index to dynamic list page view.
protected java.lang.String[][] heading
Provide a String Array of table headings for dynamic list.
protected java.lang.String orderBy
Provide a string of orderBy which used for dynamic list records sorting function.
protected java.util.Vector published
Provide a vector of published.
protected java.util.Vector startDate
Provide a vector of discount start date.
protected java.lang.String startIndex
Provide the string type of start index to dynamic list page view.
Fields inherited from class com.ibm.commerce.beans.SmartDataBeanImpl
commandContext
Fields inherited from class com.ibm.commerce.beans.InputDataBeanImpl
requestProperties
Fields inherited from interface com.ibm.commerce.tools.promotions.ECPromotionsConstants
BY_AMOUNT_PER_UNIT, BY_FIXED_AMOUNT, BY_PERCENTAGE, CONTRACT_DISPLAY, CUMULATIVE_FALSE, CURRENCY_RANGE, DISCOUNT_PUBLISHED, DISCOUNT_RESOURCES, DO_NOT_GROUP, EC_Calcode_Id, EC_Code, EC_EndDate, EC_Orderby, EC_Range_Max, EC_StartDate, EC_Status, ERROR_DISCOUNT_APPLIED, ERROR_DISCOUNT_DUPLICATE_CODE, ERROR_DISCOUNT_NOT_SAVED, ITEM_DISPLAY, MSG_DISCOUNT_APPLIED, MSG_DISCOUNT_SAVED, ORDER_DISPLAY, ORDER_LEVEL, ORDERITEM_DISPLAY, PRODUCT_DISPLAY, PRODUCT_LEVEL, QTY_RANGE, REST_OF_TIMESTRING, ZERO_STRING
Fields inherited from interface com.ibm.commerce.beans.DataBean
emptyString
Constructor Summary
DiscountChooseListBean()
DiscountCalculationCodeList constructor.
Method Summary
java.lang.String getCalcode_Id(int index)
get ID of calculation code, also is the ID of the discount object.
java.lang.String getCheckBoxName(int index)
get the name of check box in each Row i
java.lang.String getCode(int index)
get the name of the discount.
java.lang.String[] getColumns(int i)
get String Array of the Discount properties, which will be represented in one column.
java.lang.String getDefaultAction(int i)
get default action
java.lang.String getDescription(int index)
get administrator's description for the discount associated by index i.
DiscountChooseListRow[] getDiscountRowList()
get array of discount choose list row
java.lang.String getEndDate(int index)
get the end date of the current discount availablity.
java.lang.String[][] getHeadings()
get HTML table heading
int getLength()
get length
int getListSize()
get the size of discount list found
java.lang.String getOrderBy()
get the property name, which used to sort the list records.
java.lang.String getParm(java.lang.String para)
get the internal parameter name associated with the param passed.
java.lang.String getPublished(int index)
get the discount status
TypedProperty getRequestProperties()
getRequestProperties method comment.
java.lang.String getStartDate(int index)
get start date of the discount availablity.
java.lang.String getUserJSfnc()
get User defined JavaScript functions
java.lang.String getUserJSfnc(java.util.Hashtable NLSfile)
get User defined JavaScript functions by passing NLS file
void populate()
populate this DataBean to GUI.
void setLength(int newLength)
set the number of the list
void setOrderBy(java.lang.String newOrderBy)
set orderBy to sort the list
void setParm(java.lang.String para, java.lang.String value)
set parameter and its values
void setRequestProperties(TypedProperty param)
set RequestProperties param param com.ibm.commerce.datatype.TypedProperty
Methods inherited from class com.ibm.commerce.tools.promotions.beansrc.DiscountChooseListBeanBase
getDelegate, getOwner
Methods inherited from class com.ibm.commerce.beans.SmartDataBeanImpl
fulfills, getCommandContext, getResources, setCommandContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.ibm.commerce.security.Protectable
fulfills
Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
The internal copyright field.
See Also:
Constant Field Values

discountRowList

protected DiscountChooseListRow[] discountRowList
Provide an object Array of DiscountChooseListRow for dynamic list.

calcode_Id

protected java.util.Vector calcode_Id
Provide a vector of calcode ID.

code

protected java.util.Vector code
Provide a vector of code.

startDate

protected java.util.Vector startDate
Provide a vector of discount start date.

endDate

protected java.util.Vector endDate
Provide a vector of discount end date.

published

protected java.util.Vector published
Provide a vector of published.

description

protected java.util.Vector description
Provide a vector of administration description.

orderBy

protected java.lang.String orderBy
Provide a string of orderBy which used for dynamic list records sorting function.

heading

protected java.lang.String[][] heading
Provide a String Array of table headings for dynamic list.

calcodeId

protected java.lang.String calcodeId
Provide the string type of calcode ID.

endIndex

protected java.lang.String endIndex
Provide the string type of end index to dynamic list page view.

startIndex

protected java.lang.String startIndex
Provide the string type of start index to dynamic list page view.
Constructor Detail

DiscountChooseListBean

public DiscountChooseListBean()
DiscountCalculationCodeList constructor.
Method Detail

getCalcode_Id

public java.lang.String getCalcode_Id(int index)
get ID of calculation code, also is the ID of the discount object.
Returns:
ID of calculation code, also is the ID of the discount object.

getCheckBoxName

public java.lang.String getCheckBoxName(int index)
get the name of check box in each Row i
Specified by:
getCheckBoxName in interface SimpleDynamicListBean
Parameters:
index - The for which you want the name of the check box.
Returns:
the name of check box in each Row i

getCode

public java.lang.String getCode(int index)
get the name of the discount.
Parameters:
index - of the Array of the discounts.
Returns:
the name of the discount.

getColumns

public java.lang.String[] getColumns(int i)
get String Array of the Discount properties, which will be represented in one column.
Specified by:
getColumns in interface SimpleDynamicListBean
Parameters:
i - The row for which you want to return the contents.
Returns:
String Array of the Discount properties, which will be represented in one column.

getDefaultAction

public java.lang.String getDefaultAction(int i)
get default action
Specified by:
getDefaultAction in interface SimpleDynamicListBean
Parameters:
i - The row for which you want the first column hyper-link.
Returns:
NONE in this case

getDescription

public java.lang.String getDescription(int index)
get administrator's description for the discount associated by index i.
Parameters:
index - of the Array of the discounts.
Returns:
administrator's description for the discount associated by index i.

getDiscountRowList

public DiscountChooseListRow[] getDiscountRowList()
get array of discount choose list row
Returns:
com.ibm.commerce.tools.promotions.DiscountChooseListRow[]

getEndDate

public java.lang.String getEndDate(int index)
get the end date of the current discount availablity.
Parameters:
index - of the Array of the discounts.
Returns:
the end date of the current discount availablity.

getHeadings

public java.lang.String[][] getHeadings()
get HTML table heading
Specified by:
getHeadings in interface SimpleDynamicListBean
Returns:
HTML table heading

getLength

public int getLength()
get length
Returns:
length

getListSize

public int getListSize()
get the size of discount list found
Specified by:
getListSize in interface SimpleDynamicListBean
Returns:
the size of discount list found

getOrderBy

public java.lang.String getOrderBy()
get the property name, which used to sort the list records.
Returns:
the property name, which used to sort the list records.

getParm

public java.lang.String getParm(java.lang.String para)
get the internal parameter name associated with the param passed.
Specified by:
getParm in interface SimpleDynamicListBean
Returns:
the internal parameter name associated with the param passed.

getPublished

public java.lang.String getPublished(int index)
get the discount status
Returns:
the discount status

getRequestProperties

public TypedProperty getRequestProperties()
getRequestProperties method comment.
Specified by:
getRequestProperties in interface InputDataBean
Overrides:
getRequestProperties in class InputDataBeanImpl
Returns:
The request properties.

getStartDate

public java.lang.String getStartDate(int index)
get start date of the discount availablity.
Parameters:
index - of the Array of the discounts.
Returns:
start date of the discount availablity.

getUserJSfnc

public java.lang.String getUserJSfnc()
get User defined JavaScript functions
Returns:
User defined JavaScript functions

getUserJSfnc

public java.lang.String getUserJSfnc(java.util.Hashtable NLSfile)
get User defined JavaScript functions by passing NLS file
Specified by:
getUserJSfnc in interface SimpleDynamicListBean
Parameters:
NLSfile - The JavaScript file which contains national language characters.
Returns:
User defined JavaScript functions

populate

public void populate()
              throws java.lang.Exception
populate this DataBean to GUI.
Specified by:
populate in interface SmartDataBean
Overrides:
populate in class SmartDataBeanImpl
Throws:
java.lang.Exception - should not happen since there is no data retrieved to populate the databean.

setLength

public void setLength(int newLength)
set the number of the list

setOrderBy

public void setOrderBy(java.lang.String newOrderBy)
set orderBy to sort the list
Parameters:
newOrderBy - java.lang.String

setParm

public void setParm(java.lang.String para,
                    java.lang.String value)
set parameter and its values
Specified by:
setParm in interface SimpleDynamicListBean
Parameters:
para - java.lang.String
value - java.lang.String

setRequestProperties

public void setRequestProperties(TypedProperty param)
                          throws java.lang.Exception
set RequestProperties param param com.ibm.commerce.datatype.TypedProperty
Specified by:
setRequestProperties in interface InputDataBean
Overrides:
setRequestProperties in class InputDataBeanImpl
Throws:
java.lang.Exception - if there is a problem when setting the request properties. This particular method should not throw any exception because it just stores the request properties.

Feedback