public final class CSShippingScheme extends CSItem
The CSShippingScheme
class includes methods for the retrieval of a particular shipping scheme's
details.
All such methods require that certain database and key information (shipping scheme ID, for example) be specified via
the set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSShippingScheme
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 |
---|
CSShippingScheme()
Creates an empty
CSShippingScheme object. |
CSShippingScheme(CSShippingScheme objItem)
Creates an empty
CSShippingScheme object, and initialises it from the contents of the supplied
CSItem object. |
CSShippingScheme(java.lang.String strPropertyFile)
Creates a new
CSShippingScheme , specifying a property file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSShippingScheme . |
boolean |
exist()
Determines whether a shipping scheme exists on the database.
|
void |
get()
Retrieves the details of a shipping scheme from the database.
|
java.lang.String |
getDescription()
Gets the description of the shipping scheme.
|
int |
getDisplayOrder()
Gets the display order of the shipping scheme.
|
java.lang.String |
getName()
Gets the name of the shipping scheme.
|
int |
getProductOptionID()
Gets the shipping scheme's associated product option ID to be used as key information.
|
java.lang.String |
getRateDescription()
Gets the rate description of the shipping scheme.
|
int |
getShippingSchemeID()
Gets the ID of the shipping scheme to be used as key information.
|
java.lang.String |
getUserData()
Gets the user data of the shipping scheme.
|
int |
getVatSchemeID()
Gets the VAT scheme ID of the shipping scheme.
|
void |
setDescription(java.lang.String strDescription)
Sets the description of the shipping 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 shipping scheme.
|
void |
setName(java.lang.String strName)
Sets the name of the shipping scheme.
|
void |
setProductOptionID(int nProductOptionID)
Sets the shipping scheme's associated product option ID to be used as key information.
|
void |
setRateDescription(java.lang.String strRateDescription)
Sets the rate description of the shipping scheme.
|
void |
setShippingSchemeID(int nShippingSchemeID)
Sets the shipping scheme ID to be used as key information.
|
void |
setUserData(java.lang.String strUserData)
Sets the user data of the shipping scheme.
|
void |
setVatSchemeID(int nVatSchemeID)
Sets the VAT scheme ID of the shipping scheme.
|
void |
update()
Not currently implemented for
CSShippingScheme . |
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 CSShippingScheme()
CSShippingScheme
object.
Use the various set methods provided to initialise the CSShippingScheme
object prior to invoking
any of its query methods.
public CSShippingScheme(CSShippingScheme objItem)
CSShippingScheme
object, and initialises it from the contents of the supplied
CSItem object.
objItem
- the CSShippingScheme
object to be used to initialise the new onepublic CSShippingScheme(java.lang.String strPropertyFile)
CSShippingScheme
, specifying a property file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSShippingScheme
object prior to invoking
any of its query methods.
strPropertyFile
- the property file that contains the connection details.public int getShippingSchemeID()
public void setShippingSchemeID(int nShippingSchemeID)
setShippingSchemeID
followed by a call to get
will return details of the shipping
scheme with the specified ID.
nShippingSchemeID
- the shipping 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 shipping
scheme that is associated with the specified product option ID.
nProductOptionID
- the shipping scheme's associated product option ID to be used as key information.public int getVatSchemeID()
public void setVatSchemeID(int nVatSchemeID)
nVatSchemeID
- the shipping scheme's VAT scheme ID.public java.lang.String getName()
public void setName(java.lang.String strName)
strName
- the shipping scheme's name.public java.lang.String getRateDescription()
public void setRateDescription(java.lang.String strRateDescription)
strRateDescription
- the shipping scheme's rate description.public java.lang.String getDescription()
public void setDescription(java.lang.String strDescription)
strDescription
- the shipping scheme's description.public int getDisplayOrder()
public void setDisplayOrder(int nDisplayOrder)
nDisplayOrder
- the shipping scheme's display order.public java.lang.String getUserData()
public void setUserData(java.lang.String strUserData)
strUserData
- the shipping scheme's user data.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for a shipping scheme are :
LEVEL_ID
Retrieves the ShippingSchemeID.LEVEL_SUMMARY
Retrieves the ShippingSchemeID, Name, Description and VatSchemeID.LEVEL_DETAIL
Retrieves all the shipping scheme data except for the user data.LEVEL_ALL
Retrieves all the shipping 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 setShippingSchemeID
followed by exist
to ascertain if there
is a shipping scheme with the specified ID on the database.
Use setProductOptionID
followed by exist
to ascertain if there is
a shipping scheme with the specified product option ID on the database. For product options that inherit a
shipping scheme from their parent product type then the shipping scheme associated with the parent product type
will be checked for existence.
exist
in class CSItem
true
if this shipping 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 shipping scheme then specify the amount of detail
required using the setDetailLevel
method before calling this method.
Use setShippingSchemeID
followed by get
to populate this
CSShippingScheme
object with the details of the shipping scheme identified by the specified ID.
Use setProductOptionID
followed by get
to populate this
CSShippingScheme
object with the details of the shipping scheme associated with the specified
product option ID. For product options that inherit a shipping scheme from their parent product type then the
shipping scheme details associated with the parent product type will be used to populate this
CSShippingScheme
.
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 shipping 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
CSShippingScheme
.
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 shipping schemes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSShippingScheme
.
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 shipping 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.