public final class CSOrderSelectMultiple extends CSItemMultiple
The CSOrderSelectMultiple
class provides a method that retrieves orders from the database that conform
to the criteria specified via the set
methods provided. Where multiple criteria are defined, these are
combined to tighten the filter on the returned orders.
All database access/connectivity is handled internally by the CSOrderSelectMultiple
class.
CSOrder
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSOrderSelectMultiple()
Creates an empty
CSOrderSelectMultiple object. |
CSOrderSelectMultiple(java.lang.String strPropertyFile)
Creates a new
CSOrderSelectMultiple , specifying a properties file that contains all of the
database connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSOrderSelectMultiple . |
boolean |
exist()
Not currently implemented for
CSOrderSelectMultiple . |
void |
get()
Retrieves the details of orders from the database that conform to the criteria specified via the
set
methods provided. |
java.lang.String |
getBasketGroup()
Gets the name of the basket group used as query criteria.
|
boolean |
getBasketGroupPartialMatches()
Gets the flag which indicates if the specified basket group query criteria can be used as a filter.
|
java.util.Date |
getCreatedBefore()
Gets the latest order creation date used as query criteria.
|
java.util.Date |
getCreatedSince()
Gets the earliest order creation date used as query criteria.
|
java.lang.String |
getCustomerEmail()
Gets the customer email address used as query criteria.
|
java.lang.String |
getCustomerNameFilter()
Gets the text used as query criteria on the name of the order's customer.
|
java.lang.String |
getCustomerPostalCodeFilter()
Gets the text used as query criteria on the postal/ZIP code of the order's delivery or invoice address.
|
java.lang.String |
getOrderIDList()
Gets the IDs of the orders that are to be retrieved.
|
java.lang.String |
getPaymentInfo()
Gets the order's payment info used as query criteria.
|
java.lang.String |
getPaymentMethod()
Gets the order's payment method used as query criteria.
|
java.lang.String |
getPaymentNumber()
Gets the order's payment number used as query criteria.
|
java.lang.String |
getPaymentStatus()
Gets the order's payment status used as query criteria.
|
java.lang.String |
getStatusCodeList()
Gets the status codes used as query criteria.
|
java.lang.String |
getStatusDescriptionFilter()
Gets the text used as query criteria on the order's status description.
|
java.lang.String |
getStockCodeList()
Gets the stock codes used as query criteria.
|
boolean |
isBasketGroupPartialMatches()
Deprecated.
Replaced by
getBasketGroupPartialMatches() |
void |
setBasketGroup(java.lang.String strBasketGroup)
Specifies the name of the basket group used as query criteria.
|
void |
setBasketGroupPartialMatches(boolean bBasketGroupPartialMatches)
Specifies the flag which indicates if the specified basket group query criteria can be used as a filter.
|
void |
setCreatedBefore(java.util.Date objCreatedBefore)
Specifies the latest order creation date used as query criteria.
|
void |
setCreatedSince(java.util.Date objCreatedSince)
Specifies the earliest order creation date used as query criteria.
|
void |
setCustomerEmail(java.lang.String strCustomerEmail)
Specifies the customer email address used as query criteria.
|
void |
setCustomerNameFilter(java.lang.String strCustomerNameFilter)
Specifies the text used as query criteria on the name of the order's customer.
|
void |
setCustomerPostalCodeFilter(java.lang.String strCustomerPostalCodeFilter)
Specifies the text used as query criteria on the postal/ZIP code of the order's delivery or invoice address.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setOrderIDList(java.lang.String strOrderIDList)
Specifies the IDs of the orders that are to be retrieved.
|
void |
setPaymentInfo(java.lang.String strPaymentInfo)
Specifies the order's payment info used as query criteria.
|
void |
setPaymentMethod(java.lang.String strPaymentMethod)
Specifies the order's payment method used as query criteria.
|
void |
setPaymentNumber(java.lang.String strPaymentNumber)
Specifies the order's payment number used as query criteria.
|
void |
setPaymentStatus(java.lang.String strPaymentStatus)
Specifies the order's payment status used as query criteria.
|
void |
setStatusCodeList(java.lang.String strStatusCodeList)
Specifies the status codes used as query criteria.
|
void |
setStatusDescriptionFilter(java.lang.String strStatusDescriptionFilter)
Specifies the text used as query criteria on the order's status description.
|
void |
setStockCodeList(java.lang.String strStockCodeList)
Specifies the stock codes used as query criteria.
|
void |
update()
Not currently implemented for
CSOrderSelectMultiple . |
equals, getItems, getMaxRows, getSortOrder, getStartRow, iterator, setItems, setMaxRows, setSortOrder, 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 CSOrderSelectMultiple()
CSOrderSelectMultiple
object.
Use the various set
methods provided to initialise the criteria used by the
CSOrderSelectMultiple
object for querying orders.
public CSOrderSelectMultiple(java.lang.String strPropertyFile)
CSOrderSelectMultiple
, specifying a properties file that contains all of the
database connection details.
Use the various set
methods provided to initialise the criteria used by the
CSOrderSelectMultiple
object for querying orders.
strPropertyFile
- the property file that contains the connection details.public java.lang.String getOrderIDList()
public void setOrderIDList(java.lang.String strOrderIDList)
setOrderIDList
followed by a call to get
returns details of all the specified
orders.
strOrderIDList
- a comma-separated list of order IDs.public java.util.Date getCreatedSince()
Only orders created on or after this date will be returned.
public void setCreatedSince(java.util.Date objCreatedSince)
Only orders created on or after this date will be returned.
setCreatedSince
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
objCreatedSince
- the created since date.public java.util.Date getCreatedBefore()
Only orders created on or before this date-time will be returned.
public void setCreatedBefore(java.util.Date objCreatedBefore)
Only orders created on or before this date-time will be returned.
setCreatedBefore
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
objCreatedBefore
- the created before date.public java.lang.String getStatusCodeList()
Only orders with one of the specified status codes will be returned.
public void setStatusCodeList(java.lang.String strStatusCodeList)
Only orders with one of the specified status codes will be returned.
setStatusCodeList
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strStatusCodeList
- a comma-separated list of status codes.public java.lang.String getStatusDescriptionFilter()
Only orders with a status description containing, or matching, the specified text will be returned.
public void setStatusDescriptionFilter(java.lang.String strStatusDescriptionFilter)
Only orders with a status description containing, or matching, the specified text will be returned.
setStatusDescriptionFilter
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strStatusDescriptionFilter
- the status description filter text.public java.lang.String getBasketGroup()
Only orders generated from baskets with this basket group name will be returned.
Use in conjunction with setBasketGroupPartialMatches
to allow the
specified basket group name to be used as a filter.
public void setBasketGroup(java.lang.String strBasketGroup)
Only orders generated from baskets with this basket group name will be returned.
setBasketGroup
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
Use in conjunction with setBasketGroupPartialMatches
to allow the
specified basket group name to be used as a filter.
strBasketGroup
- the basket group's name.public boolean getBasketGroupPartialMatches()
Set true
to allow the basket group name specified via
setBasketGroup
to be used as filter text. Orders generated from baskets with a
group name containing, or matching, the specified basket group name will be returned.
Set false
to prevent the basket group name specified via setBasketGroup
to be used
as filter text. Orders generated from baskets with a group name matching the specified basket group name will be
returned.
Default is false
.
@Deprecated public boolean isBasketGroupPartialMatches()
getBasketGroupPartialMatches()
public void setBasketGroupPartialMatches(boolean bBasketGroupPartialMatches)
Set true
to allow the basket group name specified via
setBasketGroup
to be used as filter text. Orders generated from baskets with a
group name containing, or matching, the specified basket group name will be returned.
Set false
to prevent the basket group name specified via setBasketGroup
to be used
as filter text. Orders generated from baskets with a group name matching the specified basket group name will be
returned.
Default is false
.
bBasketGroupPartialMatches
- the flag indicating if the specified basket group query criteria can be used as a filter.public java.lang.String getStockCodeList()
Only orders with one of the specified stock codes will be returned.
public void setStockCodeList(java.lang.String strStockCodeList)
Only orders with one of the specified stock codes will be returned.
setStockCodeList
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strStockCodeList
- a comma-separated list of stock codes.public java.lang.String getCustomerNameFilter()
Only orders with a customer name containing, or matching, the specified text will be returned.
public void setCustomerNameFilter(java.lang.String strCustomerNameFilter)
Only orders with a customer name containing, or matching, the specified text will be returned.
setCustomerNameFilter
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strCustomerNameFilter
- the customer name filter text.public java.lang.String getCustomerPostalCodeFilter()
Only orders with a customer's delivery or invoice address postal/ZIP code containing, or matching, the specified text will be returned.
public void setCustomerPostalCodeFilter(java.lang.String strCustomerPostalCodeFilter)
Only orders with a customer's delivery or invoice address postal/ZIP code containing, or matching, the specified text will be returned.
setCustomerPostalCodeFilter
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strCustomerPostalCodeFilter
- the customer postal/ZIP code filter text.public java.lang.String getCustomerEmail()
Only orders with the specified customer email address will be returned.
public void setCustomerEmail(java.lang.String strCustomerEmail)
Only orders with the specified customer email address will be returned.
setCustomerEmail
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strCustomerEmail
- the customer email address.public java.lang.String getPaymentInfo()
Only orders with the specified payment info will be returned.
public void setPaymentInfo(java.lang.String strPaymentInfo)
Only orders with the specified payment info will be returned.
setPaymentInfo
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strPaymentInfo
- the order payment info.public java.lang.String getPaymentMethod()
Only orders with the specified payment method will be returned.
public void setPaymentMethod(java.lang.String strPaymentMethod)
Only orders with the specified payment method will be returned.
setPaymentMethod
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strPaymentMethod
- the order payment method.public java.lang.String getPaymentNumber()
Only orders with the specified payment number will be returned.
public void setPaymentNumber(java.lang.String strPaymentNumber)
Only orders with the specified payment number will be returned.
setPaymentNumber
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strPaymentNumber
- the order payment number.public java.lang.String getPaymentStatus()
Only orders with the specified payment status will be returned.
public void setPaymentStatus(java.lang.String strPaymentStatus)
Only orders with the specified payment status will be returned.
setPaymentStatus
in combination with any other query criteria followed by a call to
get
returns details of all the orders that match all the specified query criteria.
strPaymentStatus
- the order payment status.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for an order are :
LEVEL_ID
Retrieves the OrderID.LEVEL_DETAIL
Retrieves all order data and associated order address.LEVEL_ALL
Retrieves all order data and associated order address and order items.setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public boolean exist() throws CSException
CSOrderSelectMultiple
.
exist
in class CSItemMultiple
true
if all orders 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
set
methods provided. Where multiple criteria are defined, these are combined to tighten the filter on the returned
orders.
Use get
without any query criteria to populate this CSOrderSelectMultiple
object
with the details of all the orders from the database.
setSortOrder
, setMaxRows
and
setStartRow
are not valid.
Each retrieved order is stored as a CSOrder
object within the item ArrayList
member of
CSOrderSelectMultiple
- use getItems
or iterator
to
access/navigate through them. These orders will be stored in the ArrayList
in the order retrieved
from the database.
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 orders 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
CSOrderSelectMultiple
.
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 orders cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSOrderSelectMultiple
.
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 orders cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.