public final class CSShippingZoneMultiple extends CSItemMultiple
The CSShippingZoneMultiple
class provides a method that retrieves several shipping zones from the
database. This method requires that certain database and key information (shipping scheme ID, for example) be
specified via the set
methods provided, prior to its invocation.
All database access/connectivity is handled internally by the CSShippingZoneMultiple
class.
CSShippingZone
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSShippingZoneMultiple()
Creates an empty
CSShippingZoneMultiple object. |
CSShippingZoneMultiple(java.lang.String strPropertyFile)
Creates a new
CSShippingZoneMultiple , specifying a properties file that contains all of the
database connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSShippingZoneMultiple . |
boolean |
exist()
Not currently implemented for
CSShippingZoneMultiple . |
void |
get()
Retrieves the details of several shipping zones from the database.
|
int |
getShippingSchemeID()
Gets the shipping scheme ID specified as key information.
|
java.lang.String |
getShippingZoneIDList()
Gets the list of shipping zone IDs specified as key information.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setShippingSchemeID(int nShippingSchemeID)
Specifies the ID of the shipping scheme for which its shipping zones are to be retrieved.
|
void |
setShippingZoneIDList(java.lang.String strShippingZoneIDList)
Specifies the IDs of the shipping zones that are to be retrieved.
|
void |
setSortOrder(java.lang.String strSortOrderList)
Sets the order in which the shipping zones are to be retrieved.
|
void |
update()
Not currently implemented for
CSShippingZoneMultiple . |
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 CSShippingZoneMultiple()
CSShippingZoneMultiple
object.
Use the various set
methods provided to initialise the CSShippingZoneMultiple
object prior to invoking any of its query methods.
public CSShippingZoneMultiple(java.lang.String strPropertyFile)
CSShippingZoneMultiple
, specifying a properties file that contains all of the
database connection details.
Use the various set methods provided to initialise the CSShippingZoneMultiple
object prior to
invoking any of its query methods.
strPropertyFile
- the property file that contains the connection details.public java.lang.String getShippingZoneIDList()
public void setShippingZoneIDList(java.lang.String strShippingZoneIDList)
setShippingZoneIDList
followed by a call to get
returns details of all the
specified shipping zones.
strShippingZoneIDList
- a comma-separated list of shipping zone IDs.public int getShippingSchemeID()
public void setShippingSchemeID(int nShippingSchemeID)
setShippingSchemeID
followed by a call to get
returns details of all the shipping
zones of the specified shipping scheme.
nShippingSchemeID
- the shipping scheme.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for a shipping zone are :
LEVEL_ID
Retrieves the ShippingZoneId and ShippingSchemeId.LEVEL_SUMMARY
Retrieves the ShippingZoneId, ShippingSchemeId, Name and Description.LEVEL_DETAIL
Retrieves all shipping zone data except for UserData.LEVEL_ALL
Retrieves all shipping zone data.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 setShippingZoneIDList
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, "ZoneName DESC" would
order in descending order of the shipping zone name. The default sort order in this instance is 'ZoneName ASC'.
Available sort orders are :
ZoneID - order by the shipping zone ID
ZoneName - order by the shipping zone name
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
CSShippingZoneMultiple
.
exist
in class CSItemMultiple
true
if all shipping zones 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 get
without any key information to populate this CSShippingZoneMultiple
object
with the details of all the shipping zones from the database.
Use setShippingZoneIDList
followed by get
to populate this
CSShippingZoneultiple
object with the details of the shipping zones specified in the list. The
retrieved shipping zones will appear within CSShippingZoneMultiple
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 setShippingSchemeID
followed by get
to populate this
CSShippingZoneMultiple
object with the details of the shipping zones specified in the list.
Each retrieved shipping zone is stored as a CSShippingZone
object within the item ArrayList
member of CSShippingZoneMultiple
- use getItems
or
iterator
to access/navigate through them. These shipping zones will be stored in the
ArrayList
in the order specified using the setSortOrder
method, or
the default sort order of 'ZoneName ASC'. However, if a list of shipping zone IDs was specified, the shipping
zones 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 shipping zones 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
CSShippingZoneMultiple
.
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 shipping zones cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSShippingZoneMultiple
.
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 shipping zones cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.