public final class CSRackItemMultiple extends CSItemMultiple
The CSRackItemMultiple
class provides a method that retrieves several rack items from the database.
This method requires that certain database and key information (a list of rack IDs, for example) be specified via the
set
methods provided, prior to its invocation.
All database access/connectivity is handled internally by the CSRackItemMultiple
class.
CSRackItem
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSRackItemMultiple()
Creates an empty
CSRackItemMultiple object. |
CSRackItemMultiple(java.lang.String strPropertyFile)
Creates a new
CSRackItemMultiple , specifying a properties file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSRackItemMultiple . |
boolean |
exist()
Not currently implemented for
CSRackItemMultiple . |
void |
get()
Retrieves the details of several rack items from the database.
|
java.lang.Integer |
getDecimalPlaces()
Gets the decimal places setting to be applied to the product type's price.
|
java.lang.String |
getItemType()
Gets the rack item's item type specified as key information.
|
int |
getParentRackID()
Gets the rack ID specified as key information for which its rack items are to be retrieved.
|
java.lang.String |
getRackItemIDList()
Gets the list of rack item IDs specified as key information.
|
void |
setDecimalPlaces(java.lang.Integer nDecimalPlaces)
Sets the decimal places setting to be applied to the product type's price.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setItemType(java.lang.String strItemType)
Sets the rack item's item type specified as key information.
|
void |
setParentRackID(int nParentRackID)
Sets the rack ID specified as key information for which its rack items are to be retrieved.
|
void |
setRackItemIDList(java.lang.String strRackItemIDList)
Specifies the IDs of the rack items that are to be retrieved.
|
void |
setSortOrder(java.lang.String strSortOrderList)
Sets the order in which the rack items are to be retrieved.
|
void |
update()
Not currently implemented for
CSRackItemMultiple . |
equals, getItems, getMaxRows, getSortOrder, getStartRow, iterator, setItems, setMaxRows, setStartRow, toString
clearRecordedGatewayMessages, clone, count, getCache, getCachingEnabled, getDatabaseVersion, getDatabaseVersion, getDebugOutput, getDetailLevel, getPreview, getPropertyFile, getPropertyFileExtension, getPropertyFilePathname, getRecordedGatewayMessages, getRecordGatewayMessages, getSendGatewayMessages, getUseCache, setDebugOutput, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSRackItemMultiple()
CSRackItemMultiple
object.
Use the various set
methods provided to initialise the CSRackItemMultiple
object
prior to invoking any of its query methods.
public CSRackItemMultiple(java.lang.String strPropertyFile)
CSRackItemMultiple
, specifying a properties file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSRackItemMultiple
object prior to invoking
any of its query methods.
strPropertyFile
- the property file that contains the connection details.public java.lang.String getRackItemIDList()
public void setRackItemIDList(java.lang.String strRackItemIDList)
setRackItemIDList
followed by a call to get
returns details of all the specified
rack items.
strRackItemIDList
- a comma-separated list of rack item IDs.public int getParentRackID()
public void setParentRackID(int nParentRackID)
setParentRackID
followed by a call to get
returns details of all the rack items
that are children of the specified rack.
nParentRackID
- the rack ID for which its rack items are to be retrieved.public java.lang.String getItemType()
public void setItemType(java.lang.String strItemType) throws CSParameterException
The valid item types are as follows :
Rack
Group
Type
setItemType
followed by a call to get
returns details of all the rack items that
are of the specified item type.
strItemType
- the rack item's item type.CSParameterException
- if an invalid item type is specified.public java.lang.Integer getDecimalPlaces()
If set to null then the decimal places as defined in the iCM Commerce Settings will be used.
public void setDecimalPlaces(java.lang.Integer nDecimalPlaces)
If set to null then the decimal places as defined in the iCM Commerce Settings will be used.
nDecimalPlaces
- the decimal places setting.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for a rack item are :
LEVEL_ID
Retrieves the RackItemID.LEVEL_SUMMARY
Retrieves the RackItemID, RackID, ItemID, ItemType and the associated Rack,
ProductGroup or ProductType populated with LEVEL_SUMMARY detail.LEVEL_DETAIL
Retrieves all rack data and the associated Rack, ProductGroup or ProductType
populated with LEVEL_DETAIL detail.LEVEL_ALL
Retrieves all rack data and the associated Rack, ProductGroup or ProductType
populated with LEVEL_ALL detail.setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public void setSortOrder(java.lang.String strSortOrderList) throws CSParameterException
This method should not be used if the setRackItemIDList
key information is
being supplied. One or more of the available sort orders may be specified as a comma-delimited list. Use ASC or
DESC to indicate the direction of ordering for a sort order. For example, "ItemType DESC" would order in
descending order of the rack item's item type. By default the returned rack items in the order as configured via
iCM.
Available sort orders are :
RackItemID - order by the rack item ID
RackID - order by the rack ID
ItemID - order by the item ID
ItemType - order by the item type
DisplayOrder - order by the display order
setSortOrder
in class CSItemMultiple
strSortOrderList
- a comma-separated list of one or more of the available sort orders.CSParameterException
- if an invalid sort order was specifiedpublic boolean exist() throws CSException
CSRackItemMultiple
.
exist
in class CSItemMultiple
true
if all rack items exist on the database.CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSException
- the base class for exceptions thrown by this method.public void get() throws CSException
Use setRackItemIDList
followed by get
to populate this
CSRackItemMultiple
object with the details of the rack items specified in the list. The retrieved
rack items will appear within CSRackItemMultiple
in the order that their IDs appear within the
supplied list. Key information set using setSortOrder
,
setMaxRows
and setStartRow
is not valid in this instance.
Use setParentRackID
followed by get
to populate this
CSRackItemMultiple
object with the details of the rack items that are children of the specified
rack.
Use setItemType
followed by get
to populate this
CSRackItemMultiple
object with the details of the rack items that are of the specified item type.
Each retrieved rack item is stored as a CSRackItem
object within the item ArrayList
member
of CSRackItemMultiple
- use getItems
or iterator
to
access/navigate through them. These rack items will be stored in the ArrayList
in the order
specified using the setSortOrder
method, or the default order as specified in iCM.
However, if a list of rack item IDs was specified, the rack items are stored in the same order as in the
specified list.
get
in class CSItemMultiple
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified rack items cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public void update() throws CSException
CSRackItemMultiple
.
update
in class CSItemMultiple
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified rack items cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSRackItemMultiple
.
delete
in class CSItemMultiple
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if one of the specified rack items cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.