public final class CSShippingZone extends CSItem
The CSShippingZone
class includes methods for the retrieval of a particular shipping zone's details.
All such methods require that certain database and key information (shipping zone ID, for example) be specified via
the set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSShippingZone
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 |
---|
CSShippingZone()
Creates an empty
CSShippingZone object. |
CSShippingZone(CSShippingZone objItem)
Creates an empty
CSShippingZone object, and initialises it from the contents of the supplied
CSItem object. |
CSShippingZone(java.lang.String strPropertyFile)
Creates a new
CSShippingZone , specifying a property file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSShippingZone . |
boolean |
exist()
Determines whether a shipping zone exists on the database.
|
void |
get()
Retrieves the details of a shipping zone from the database.
|
java.lang.String |
getCountryName()
Gets the country name associated with the shipping zone to be used as key information.
|
int |
getCountryNumber()
Gets the country number associated with the shipping zone to be used as key information.
|
java.lang.Boolean |
getDefaultZone()
Gets the flag which indicates if the shipping zone is the default zone of the parent shipping scheme.
|
java.lang.String |
getDeliveryTypes()
Gets the delivery types of the shipping zone.
|
java.lang.String |
getDescription()
Gets the description of the shipping zone.
|
java.lang.String |
getName()
Gets the name of the shipping zone.
|
java.lang.String |
getPrices()
Gets the prices of the shipping zone.
|
java.lang.String |
getRates()
Gets the rates of the shipping zone.
|
int |
getShippingSchemeID()
Gets the parent shipping scheme ID of the shipping zone to be used as key information.
|
int |
getShippingZoneID()
Gets the ID of the shipping zone to be used as key information.
|
java.lang.String |
getUserData()
Gets the user data of the shipping zone.
|
void |
setCountryName(java.lang.String strCountryname)
Sets the country name associated with the shipping zone to be used as key information.
|
void |
setCountryNumber(int nCountryNumber)
Sets the country number associated with the shipping zone to be used as key information.
|
void |
setDefaultZone(java.lang.Boolean bDefaultZone)
Sets the flag which indicates if the shipping zone is the default zone of the parent shipping scheme.
|
void |
setDeliveryTypes(java.lang.String strDeliveryTypes)
Sets the delivery types of the shipping zone.
|
void |
setDescription(java.lang.String strDescription)
Sets the description of the shipping zone.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setName(java.lang.String strName)
Sets the name of the shipping zone.
|
void |
setPrices(java.lang.String strPrices)
Sets the prices of the shipping zone.
|
void |
setRates(java.lang.String strRates)
Sets the rates of the shipping zone.
|
void |
setShippingSchemeID(int nShippingSchemeID)
Sets the parent shipping scheme ID of the shipping zone to be used as key information.
|
void |
setShippingZoneID(int nShippingZoneID)
Sets the shipping zone ID to be used as key information.
|
void |
setUserData(java.lang.String strUserData)
Sets the user data of the shipping zone.
|
void |
update()
Not currently implemented for
CSShippingZone . |
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 CSShippingZone()
CSShippingZone
object.
Use the various set methods provided to initialise the CSShippingZone
object prior to invoking any
of its query methods.
public CSShippingZone(CSShippingZone objItem)
CSShippingZone
object, and initialises it from the contents of the supplied
CSItem object.
objItem
- the CSShippingZone
object to be used to initialise the new onepublic CSShippingZone(java.lang.String strPropertyFile)
CSShippingZone
, specifying a property file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSShippingZone
object prior to invoking any
of its query methods.
strPropertyFile
- the property file that contains the connection details.public int getShippingZoneID()
public void setShippingZoneID(int nShippingZoneID)
setShippingZoneID
followed by a call to get
will return details of the shipping
zone with the specified ID.
nShippingZoneID
- the shipping zone's ID to be used as key information.public int getCountryNumber()
public void setCountryNumber(int nCountryNumber)
setCountryNumber
followed by a call to setShippingSchemeID
and
get
will return details of the shipping zone for the specified country number.
nCountryNumber
- the country number associated with the shipping zone to be used as key information.public java.lang.String getCountryName()
public void setCountryName(java.lang.String strCountryname)
setCountryname
followed by a call to setShippingSchemeID
and
get
will return details of the shipping zone for the specified country name.
strCountryname
- the country name associated with the shipping zone to be used as key information.public int getShippingSchemeID()
public void setShippingSchemeID(int nShippingSchemeID)
setShippingSchemeID
followed by a call to setCountryNumber
and
get
will return details of the shipping zone for the specified shipping scheme and country.
setShippingSchemeID
followed by a call to setCountryName
and
get
will return details of the shipping zone for the specified shipping scheme and country.
nShippingSchemeID
- the shipping zone's parent shipping scheme ID to be used as key information.public java.lang.String getName()
public void setName(java.lang.String strName)
strName
- the shipping zone's name.public java.lang.String getDescription()
public void setDescription(java.lang.String strDescription)
strDescription
- the shipping zone's description.public java.lang.String getRates()
For each Rate
there will be an associated DeliveryType
and Price
which can be found be calling getDeliveryTypes
and getPrices
respectively.
public void setRates(java.lang.String strRates)
For each Rate
there will be an associated DeliveryType
and Price
which can be found be calling getDeliveryTypes
and getPrices
respectively.
strRates
- the shipping zone's comma-separated list of rates.public java.lang.String getDeliveryTypes()
For each DeliveryType
there will be an associated Rate
and Price
which can be found be calling getRates
and getPrices
respectively.
public void setDeliveryTypes(java.lang.String strDeliveryTypes)
For each DeliveryType
there will be an associated Rate
and Price
which can be found be calling getRates
and getPrices
respectively.
strDeliveryTypes
- the shipping zone's comma-separated list of delivery types.public java.lang.String getPrices()
For each Price
there will be an associated DeliveryType
and Rates
which can be found be calling getDeliveryTypes
and getRates
respectively.
public void setPrices(java.lang.String strPrices)
For each Price
there will be an associated DeliveryType
and Rates
which can be found be calling getDeliveryTypes
and getRates
respectively.
strPrices
- the shipping zone's comma-separated list of prices.public java.lang.Boolean getDefaultZone()
public void setDefaultZone(java.lang.Boolean bDefaultZone)
bDefaultZone
- the shipping zone's flag indicating if its the default zone of the parent shipping scheme.public java.lang.String getUserData()
public void setUserData(java.lang.String strUserData)
strUserData
- the shipping zone's user data.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for a shipping zone are :
LEVEL_ID
Retrieves the ShippingZoneId and ShippingSchemeId.LEVEL_SUMMARY
Retrieves the ShippingZoneId, ShippingSchemeId, Name and Description.LEVEL_DETAIL
Retrieves all shipping zone data except for UserData.LEVEL_ALL
Retrieves all shipping zone 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 setShippingZoneID
followed by exist
to ascertain if there is a
shipping zone with the specified ID on the database.
setShippingSchemeID
followed by a call to
setCountryNumber
and exist
to ascertain if there is a shipping zone
with the specified parent shipping scheme ID and country number on the database.
setShippingSchemeID
followed by a call to setCountryName
and
get
to ascertain if there is a shipping zone with the specified parent shipping scheme ID and
country name on the database.
exist
in class CSItem
true
if this shipping zone 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 zone then specify the amount of detail
required using the setDetailLevel
method before calling this method.
Use setShippingZoneID
followed by get
to populate this
CSShippingZone
object with the details of the shipping zone identified by the specified ID.
Use setShippingSchemeID
and setCountryNumber
followed by get
to populate this CSShippingZone
object with the details of the
shipping zone identified by the specified parent shipping scheme ID and country number.
Use setShippingSchemeID
and setCountryName
followed by
get
to populate this CSShippingZone
object with the details of the shipping zone
identified by the specified parent shipping scheme ID and country name.
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 zone 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
CSShippingZone
.
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 zones cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSShippingZone
.
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 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.