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