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