public final class CSOrderItemDispatch extends CSItem
The CSOrderItemDispatch
class includes methods for the retrieval of a particular order item dispatch's
details.
All such methods require that certain database and key information (order item dispatch ID, for example) be specified
via the set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSOrderItemDispatch
class.
ACCESS_GRANTED, DOES_NOT_EXIST, EMPTY, EXISTS, SECURE_ACCESS_DENIED, SECURE_ACCESS_GRANTED, UPDATE_ACTION_INSERTED, UPDATE_ACTION_UPDATED
LEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSOrderItemDispatch()
Creates an empty
CSOrderItemDispatch object. |
CSOrderItemDispatch(CSOrderItemDispatch objItem)
Creates an empty
CSOrderItemDispatch object, and initialises it from the contents of the supplied
CSItem object. |
CSOrderItemDispatch(java.lang.String strPropertyFile)
Creates a new
CSOrderItemDispatch , specifying a property file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Removes the order item dispatch from the database.
|
boolean |
exist()
Determines whether an order item dispatch exists on the database.
|
void |
get()
Retrieves the details of an order item dispatch from the database.
|
java.util.Date |
getDispatchDate()
Gets the dispatch date of the order item dispatch.
|
int |
getLineNumber()
Gets the line number of the order item dispatch to be used as key information.
|
int |
getOrderID()
Gets the ID of the order associated with the order item dispatch to be used as key information.
|
int |
getOrderItemDispatchID()
Gets the ID of the order item dispatch to be used as key information.
|
int |
getOrderItemID()
Gets the ID of the order item associated with the order item dispatch to be used as key information.
|
int |
getQuantityDispatched()
Gets the quantity dispatched of the order item dispatch.
|
java.lang.String |
getTrackingInfo()
Gets the tracking information of the order item dispatch.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setDispatchDate(java.util.Date objDispatchDate)
Sets the dispatch date of the order item dispatch.
|
void |
setLineNumber(int strLineNumber)
Sets the line number of the order item dispatch to be used as key information.
|
void |
setOrderID(int nOrderID)
Sets the ID of the order associated with the order item dispatch to be used as key information.
|
void |
setOrderItemDispatchID(int nOrderItemDispatchID)
Sets the order item dispatch ID to be used as key information.
|
void |
setOrderItemID(int nOrderItemID)
Sets the ID of the order item associated with the order item dispatch to be used as key information.
|
void |
setQuantityDispatched(int nQuantityDispatched)
Sets the quantity dispatched of the order item dispatch.
|
void |
setTrackingInfo(java.lang.String strTrackingInfo)
Sets the tracking information of the order item dispatch.
|
void |
update()
Updates the details of an order item dispatch from the database, or inserts a new order item dispatch if no order
item dispatch ID has been specified and a matching order item dispatch cannot be found.
|
equals, getID, getStatus, hashCode, jsonString, serialiseWithTypes, setID, setStatus, toString, unset
clearRecordedGatewayMessages, clone, count, getCache, getCachingEnabled, getDatabaseVersion, getDatabaseVersion, getDebugOutput, getDetailLevel, getPreview, getPropertyFile, getPropertyFileExtension, getPropertyFilePathname, getRecordedGatewayMessages, getRecordGatewayMessages, getSendGatewayMessages, getUseCache, setDebugOutput, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSOrderItemDispatch()
CSOrderItemDispatch
object.
Use the various set methods provided to initialise the CSOrderItemDispatch
object prior to
invoking any of its query methods.
public CSOrderItemDispatch(CSOrderItemDispatch objItem)
CSOrderItemDispatch
object, and initialises it from the contents of the supplied
CSItem object.
objItem
- the CSOrderItemDispatch
object to be used to initialise the new onepublic CSOrderItemDispatch(java.lang.String strPropertyFile)
CSOrderItemDispatch
, specifying a property file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSOrderItemDispatch
object prior to
invoking any of its query methods.
strPropertyFile
- the property file that contains the connection details.public int getOrderItemDispatchID()
public void setOrderItemDispatchID(int nOrderItemDispatchID)
setOrderItemDispatchID
followed by a call to get
will return details of the order
item dispatch with the specified ID.
nOrderItemDispatchID
- the order item dispatch's ID to be used as key information.public int getOrderItemID()
public void setOrderItemID(int nOrderItemID)
setOrderItemID
in conjunction with setOrderID
and
setLineNumber
followed by a call to get
will return details of the
order item dispatch associated with the specified order item ID, order ID and line number.
nOrderItemID
- the order item dispatch's associated order item ID to be used as key information.public int getOrderID()
public void setOrderID(int nOrderID)
setOrderID
in conjunction with setOrderItemID
and
setLineNumber
followed by a call to get
will return details of the
order item dispatch associated with the specified order ID, order item ID and line number.
nOrderID
- the order item's associated order ID to be used as key information.public int getLineNumber()
public void setLineNumber(int strLineNumber)
setLineNumber
in conjunction with setOrderItemID
and
setOrderID
followed by a call to get
will return details of the order
item dispatch associated with the specified line number, order item ID and order ID.
strLineNumber
- the order item's line number to be used as key information.public int getQuantityDispatched()
public void setQuantityDispatched(int nQuantityDispatched)
nQuantityDispatched
- the order item dispatch's quantity dispatched.public java.util.Date getDispatchDate()
public void setDispatchDate(java.util.Date objDispatchDate)
objDispatchDate
- the order item dispatch's dispatch date.public java.lang.String getTrackingInfo()
public void setTrackingInfo(java.lang.String strTrackingInfo)
strTrackingInfo
- the order item dispatch's tracking information.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 boolean exist() throws CSException
Use setOrderItemDispatchID
followed by exist
to ascertain if
there is an order item dispatch with the specified ID on the database.
Use setOrderID
in conjunction with setOrderItemID
and
setLineNumber
followed by exist
to ascertain if there is an order item
dispatch associated with the specified order ID, order item ID and line number on the database.
exist
in class CSItem
true
if this order item dispatch exists on the database.CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.public void get() throws CSException
If it is not necessary to retrieve all the details of the order item dispatch then specify the amount of detail
required using the setDetailLevel
method before calling this method.
Use setOrderItemDispatchID
followed by get
to populate this
CSOrderItemDispatch
object with the details of the order item dispatch identified by the specified
ID.
Use setOrderID
in conjunction with setOrderItemID
and
setLineNumber
followed by get
to populate this
CSOrderItemDispatch
object with the details of the order item dispatch associated with the
specified order ID, order item ID and line number.
get
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if the specified order item dispatch 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 setOrderItemDispatchID
followed by update
to update the
order item dispatch identified by the specified ID with the specified quantity dispatched, dispatch date and
tracking information.
Use setOrderID
in conjunction with setOrderItemID
and
setLineNumber
followed by update
to update the order item dispatch
identified by the specified order ID, order item ID and line number with the specified quantity dispatched,
dispatch date and tracking information. If the order item dispatch does not already exist then a new order item
dispatch will be inserted with the specified order ID, order item ID, line number, quantity dispatched, dispatch
date and tracking information.
update
in class CSItem
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 dispatch cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
Use setOrderItemDispatchID
followed by delete
to remove the
order item dispatch identified by the specified ID from the database.
Use setOrderID
in conjunction with setOrderItemID
and
setLineNumber
followed by delete
to remove the order item dispatch
associated with the specified order ID, order item ID and line number.
delete
in class CSItem
CSParameterException
- if an invalid combination of key information has been supplied.CSDatabaseException
- if there are problems accessing the database.CSNotFoundException
- if the specified order item dispatch cannot be found on the database.CSSecurityException
- if security has been breached.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.