public final class CSVatSchemeMultiple extends CSItemMultiple
The CSVatSchemeMultiple
class provides a method that retrieves several VAT schemes from the database.
This method requires that certain database and key information (VAT 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 CSVatSchemeMultiple
class.
CSVatScheme
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSVatSchemeMultiple()
Creates an empty
CSVatSchemeMultiple object. |
CSVatSchemeMultiple(java.lang.String strPropertyFile)
Creates a new
CSVatSchemeMultiple , specifying a properties file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSVatSchemeMultiple . |
boolean |
exist()
Not currently implemented for
CSVatSchemeMultiple . |
void |
get()
Retrieves the details of several VAT schemes from the database.
|
java.lang.String |
getVatSchemeIDList()
Gets the list of VAT scheme IDs specified as key information.
|
java.lang.String |
getVatSchemeNameList()
Gets the list of VAT scheme names 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 schemes are to be retrieved.
|
void |
setVatSchemeIDList(java.lang.String strVatSchemeIDList)
Specifies the IDs of the VAT schemes that are to be retrieved.
|
void |
setVatSchemeNameList(java.lang.String strVatSchemeNameList)
Specifies the IDs of the VAT schemes that are to be retrieved.
|
void |
update()
Not currently implemented for
CSVatSchemeMultiple . |
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 CSVatSchemeMultiple()
CSVatSchemeMultiple
object.
Use the various set
methods provided to initialise the CSVatSchemeMultiple
object
prior to invoking any of its query methods.
public CSVatSchemeMultiple(java.lang.String strPropertyFile)
CSVatSchemeMultiple
, specifying a properties file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSVatSchemeMultiple
object prior to
invoking any of its query methods.
strPropertyFile
- the property file that contains the connection details.public java.lang.String getVatSchemeIDList()
public void setVatSchemeIDList(java.lang.String strVatSchemeIDList)
setVatSchemeIDList
followed by a call to get
returns details of all the specified
VAT schemes.
strVatSchemeIDList
- a comma-separated list of VAT scheme IDs.public java.lang.String getVatSchemeNameList()
public void setVatSchemeNameList(java.lang.String strVatSchemeNameList)
setVatSchemeNameList
followed by a call to get
returns details of all the specified
VAT schemes.
strVatSchemeNameList
- a comma-separated list of VAT scheme names.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for a VAT scheme are :
LEVEL_ID
Retrieves the VatSchemeID.LEVEL_SUMMARY
Retrieves the VatSchemeID, VatCode and Description.LEVEL_DETAIL
Retrieves all the VAT scheme data except for UserData.LEVEL_ALL
Retrieves all the VAT 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 setVatSchemeIDList
or
setVatSchemeNameList
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 VAT scheme name.
The default sort order in this instance is 'SchemeName ASC'.
Available sort orders are :
SchemeID - order by the VAT scheme ID
SchemeName - order by the VAT 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
CSVatSchemeMultiple
.
exist
in class CSItemMultiple
true
if all VAT 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 CSVatSchemeMultiple
object
with the details of all the VAT schemes from the database.
Use setVatSchemeIDList
followed by get
to populate this
CSVatSchemeMultiple
object with the details of the VAT schemes specified in the list. The
retrieved VAT schemes will appear within CSVatSchemeMultiple
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 setVatSchemeNameList
followed by get
to populate this
CSVatSchemeMultiple
object with the details of the VAT schemes specified in the list. The
retrieved VAT schemes will appear within CSVatSchemeMultiple
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 VAT scheme is stored as a CSVatScheme
object within the item ArrayList
member of CSVatSchemeMultiple
- use getItems
or iterator
to access/navigate through them. These VAT 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 VAT scheme IDs or names was specified, the VAT 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 VAT 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
CSVatSchemeMultiple
.
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 schemes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSVatSchemeMultiple
.
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 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.