public final class CSOrderItemDispatchMultiple extends CSItemMultiple
The CSOrderItemDispatchMultiple
class provides a method that retrieves several order item dispatches
from the database. This method requires that certain database and key information (order ID, for example) be
specified via the set
methods provided, prior to its invocation.
All database access/connectivity is handled internally by the CSOrderItemDispatchMultiple
class.
CSOrderItemDispatch
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSOrderItemDispatchMultiple()
Creates an empty
CSOrderItemDispatchMultiple object. |
CSOrderItemDispatchMultiple(java.lang.String strPropertyFile)
Creates a new
CSOrderItemDispatchMultiple , specifying a properties file that contains all of the
database connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Removes several order item dispatches from the database.
|
boolean |
exist()
Not currently implemented for
CSOrderItemDispatchMultiple . |
void |
get()
Retrieves the details of several order item dispatches from the database.
|
int |
getLineNumber()
Gets the line number specified as key information.
|
int |
getOrderID()
Gets the order ID specified as key information.
|
java.lang.String |
getOrderItemDispatchIDList()
Gets the list of order item dispatch IDs specified as key information.
|
int |
getOrderItemID()
Gets the order item ID specified as key information.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setLineNumber(int nLineNumber)
Specifies the order line number for which its order item dispatches are to be retrieved.
|
void |
setOrderID(int nOrderID)
Specifies the ID of the order for which its order item dispatches are to be retrieved.
|
void |
setOrderItemDispatchIDList(java.lang.String strOrderItemDispatchIDList)
Specifies the IDs of the order item dispatches that are to be retrieved.
|
void |
setOrderItemID(int nOrderItemID)
Specifies the ID of the order item for which its order item dispatches are to be retrieved.
|
void |
setSortOrder(java.lang.String strSortOrderList)
Sets the order in which the order item dispatches are to be retrieved.
|
void |
update()
Updates the details of several order item dispatches on the database.
|
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 CSOrderItemDispatchMultiple()
CSOrderItemDispatchMultiple
object.
Use the various set
methods provided to initialise the CSOrderItemDispatchMultiple
object prior to invoking any of its query methods.
public CSOrderItemDispatchMultiple(java.lang.String strPropertyFile)
CSOrderItemDispatchMultiple
, specifying a properties file that contains all of the
database connection details.
Use the various set methods provided to initialise the CSOrderItemDispatchMultiple
object prior to
invoking any of its query methods.
strPropertyFile
- the property file that contains the connection details.public java.lang.String getOrderItemDispatchIDList()
public void setOrderItemDispatchIDList(java.lang.String strOrderItemDispatchIDList)
setOrderItemDispatchIDList
followed by a call to get
returns details of all the
specified order item dispatches.
strOrderItemDispatchIDList
- a comma-separated list of order item dispatch IDs.public int getOrderItemID()
public void setOrderItemID(int nOrderItemID)
setOrderItemID
followed by a call to get
returns details of all the order item
dispatches of the specified order item.
nOrderItemID
- the order item ID.public int getOrderID()
public void setOrderID(int nOrderID)
setOrderID
followed by a call to get
returns details of all the order item
dispatches of the specified order.
This method may also be used in conjunction with the setLineNumber
method to further
filter the retrieved order item dispatches.
nOrderID
- the order ID.public int getLineNumber()
public void setLineNumber(int nLineNumber)
setLineNumber
followed by a call to setOrderID
and then
get
returns details of all the order item dispatches of the specified order and line number.
nLineNumber
- the line number.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for an order item dispatch are :
LEVEL_ID
Retrieves the DispatchID.LEVEL_ALL
Retrieves all order item dispatch 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 setOrderItemDispatchIDList
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, "QuantityDispatched
DESC" would order in descending order of quantity dispatched. The default sort order in this instance is 'OrderId
ASC,LineNumber ASC,DispatchDate ASC'.
Available sort orders are :
OrderID - order by the order ID
LineNumber - order by the line number
QuantityDispatched - order by the quantity dispatched
DispatchDate - order by the dispatch date
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
CSOrderItemDispatchMultiple
.
exist
in class CSItemMultiple
true
if all order item dispatches 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 setOrderItemDispatchIDList
followed by get
to
populate this CSOrderItemDispatchMultiple
object with the details of the order item dispatches
specified in the list. The retrieved order item dispatches will appear within
CSOrderItemDispatchMultiple
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 setOrderItemID
followed by get
to populate this
CSOrderItemDispatchMultiple
object with the details of the order item dispatches of the specified
order item.
Use setOrderID
followed by get
to populate this
CSOrderItemDispatchMultiple
object with the details of the order item dispatches of the specified
order.
Use setOrderID
and setLineNumber
followed by
get
to populate this CSOrderItemDispatchMultiple
object with the details of the
order item dispatches of the specified order and line number.
Each retrieved order item dispatch is stored as a CSOrderItemDispatch
object within the item
ArrayList
member of CSOrderItemDispatchMultiple
- use getItems
or iterator
to access/navigate through them. These order item dispatches will be stored in
the ArrayList
in the order specified using the setSortOrder
method,
or the default sort order of 'OrderId ASC,LineNumber ASC,DispatchDate ASC'. However, if a list of order item
dispatch IDs was specified, the order item dispatches 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 order 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
Use setItems
followed by update
to save the supplied order item
dispatches to the database.
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 order item dispatches cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
Use setOrderItemDispatchIDList
followed by delete
to
remove all order item dispatches whose IDs are listed, from the database.
Use setOrderItemID
followed by delete
to remove all order item
dispatches for the specified order item, from the database.
Use setOrderID
followed by delete
to remove all order item dispatches for
the specified order, from the database.
Use setOrderID
and setOrderID
followed by
delete
to remove all order item dispatches for the specified order and line number, from the
database.
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 order item dispatches cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.