public final class CSVatScheme extends CSItem
The CSVatScheme
class includes methods for the retrieval of a particular VAT scheme's details.
All such methods require that certain database and key information (VAT scheme ID, for example) be specified via the
set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSVatScheme
class.
CSVatSchemeContent
,
CSVatSchemeMultiple
,
CSState
,
Serialized FormACCESS_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 |
---|
CSVatScheme()
Creates an empty
CSVatScheme object. |
CSVatScheme(CSVatScheme objItem)
Creates an empty
CSVatScheme object, and initialises it from the contents of the supplied CSItem
object. |
CSVatScheme(java.lang.String strPropertyFile)
Creates a new
CSVatScheme , specifying a property file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSVatScheme . |
boolean |
exist()
Determines whether a VAT scheme exists on the database.
|
void |
get()
Retrieves the details of a VAT scheme from the database.
|
java.lang.Boolean |
getAddVat()
Gets the flag which indicates if VAT is to be added to the item price for the VAT scheme.
|
java.lang.String |
getDescription()
Gets the description of the VAT scheme.
|
int |
getDisplayOrder()
Gets the display order of the VAT scheme.
|
int |
getProductOptionID()
Gets the product option ID associated with the VAT scheme to be used as key information.
|
java.lang.String |
getUserData()
Gets the user data of the VAT scheme.
|
java.lang.String |
getVatCode()
Gets the VAT code of the VAT scheme to be used as key information.
|
int |
getVatSchemeID()
Gets the ID of the VAT scheme to be used as key information.
|
void |
setAddVat(java.lang.Boolean bAddVat)
Sets the flag which indicates if VAT is to be added to the item price for the VAT scheme.
|
void |
setDescription(java.lang.String strDescription)
Sets the description of the VAT scheme.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setDisplayOrder(int nDisplayOrder)
Sets the display order of the VAT scheme.
|
void |
setProductOptionID(int nProductOptionID)
Sets the product option ID associated with the VAT scheme to be used as key information.
|
void |
setUserData(java.lang.String strUserData)
Sets the user data of the VAT scheme.
|
void |
setVatCode(java.lang.String strVatCode)
Sets the VAT code of the VAT scheme to be used as key information.
|
void |
setVatSchemeID(int nVatSchemeID)
Sets the VAT scheme ID to be used as key information.
|
void |
update()
Not currently implemented for
CSVatScheme . |
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 CSVatScheme()
CSVatScheme
object.
Use the various set methods provided to initialise the CSVatScheme
object prior to invoking any of
its query methods.
public CSVatScheme(CSVatScheme objItem)
CSVatScheme
object, and initialises it from the contents of the supplied CSItem
object.
objItem
- the CSVatScheme
object to be used to initialise the new onepublic CSVatScheme(java.lang.String strPropertyFile)
CSVatScheme
, specifying a property file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSVatScheme
object prior to invoking any of
its query methods.
strPropertyFile
- the property file that contains the connection details.public int getVatSchemeID()
public void setVatSchemeID(int nVatSchemeID)
setVatSchemeID
followed by a call to get
will return details of the VAT scheme with
the specified ID.
nVatSchemeID
- the VAT scheme's ID to be used as key information.public int getProductOptionID()
public void setProductOptionID(int nProductOptionID)
setProductOptionID
followed by a call to get
will return details of the VAT scheme
for the specified product option ID.
nProductOptionID
- the VAT scheme's associated product option ID to be used as key information.public java.lang.String getVatCode()
public void setVatCode(java.lang.String strVatCode)
setVatCode
followed by a call to get
will return details of the VAT scheme for the
specified VAT code.
strVatCode
- the VAT scheme's VAT code to be used as key information.public java.lang.String getDescription()
public void setDescription(java.lang.String strDescription)
strDescription
- the VAT scheme's description.public java.lang.Boolean getAddVat()
public void setAddVat(java.lang.Boolean bAddVat)
bAddVat
- the VAT scheme's flag to indicate if VAT is to be added to the item price.public int getDisplayOrder()
public void setDisplayOrder(int nDisplayOrder)
nDisplayOrder
- the VAT scheme's display order.public java.lang.String getUserData()
public void setUserData(java.lang.String strUserData)
strUserData
- the VAT scheme's user data.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 boolean exist() throws CSException
Use setVatSchemeID
followed by exist
to ascertain if there is a VAT
scheme with the specified ID on the database.
Use setVatCode
followed by exist
to ascertain if there is a VAT scheme
with the specified VAT code on the database.
Use setProductOptionID
followed by exist
to ascertain if there is
a VAT scheme associated with either the specified product option ID on the database. For product options that
inherit a VAT scheme from their parent product type then the VAT scheme associated with the parent product type
will be checked for existence.
exist
in class CSItem
true
if this VAT scheme 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 VAT scheme then specify the amount of detail required
using the setDetailLevel
method before calling this method.
Use setVatSchemeID
followed by get
to populate this
CSVatScheme
object with the details of the VAT scheme identified by the specified ID.
Use setVatCode
followed by get
to populate this
CSVatScheme
object with the details of the VAT scheme identified by the specified VAT code.
Use setProductOptionID
followed by get
to populate this
CSVatScheme
object with the details of the VAT scheme associated with the specified product option
ID on the database. For product options that inherit a VAT scheme from their parent product type then the VAT
scheme details associated with the parent product type will be used to populate this CSVatScheme
object.
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 VAT scheme 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
CSVatScheme
.
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 VAT schemes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSVatScheme
.
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 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.