public final class CSProductTypeStatus extends CSItemMultiple
The CSProductTypeStatus
class includes methods for the retrieval of a particular product type's
details.
All such methods require that certain database and key information (product type ID, for example) be specified via
the set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSProductTypeStatus
class.
CSProductType
,
CSProductOption
,
CSState
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSProductTypeStatus()
Creates an empty
CSProductTypeStatus object. |
CSProductTypeStatus(java.lang.String strPropertyFile)
Creates a new
CSProductTypeStatus , specifying a properties file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSProductTypeStatus . |
boolean |
exist()
Not currently implemented for
CSProductTypeStatus . |
void |
get()
Retrieves the details of the visible product options for the specified product type from the database.
|
java.lang.String |
getAttributeTypeNameList()
Gets the list of attribute type names specified as key information.
|
java.lang.String |
getCountryName()
Gets the official name of the country used to calculate country VAT, country net price and country gross price
when a product option is retrieved.
|
java.lang.Integer |
getDecimalPlaces()
Gets the decimal places setting to be applied to the product type's price.
|
int |
getProductTypeID()
Gets the ID of the product type specified as key information.
|
void |
setAttributeTypeNameList(java.lang.String strAttributeTypeNameList)
Specifies the names of the attribute types specified as key information.
|
void |
setCountryName(java.lang.String strCountryName)
Sets the official name of the country used to calculate country VAT, country net price and country gross price
when a product option is retrieved.
|
void |
setDecimalPlaces(java.lang.Integer nDecimalPlaces)
Sets the decimal places setting to be applied to the product type's price.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setProductTypeID(int nProductTypeID)
Sets the ID of the product type specified as key information.
|
void |
update()
Not currently implemented for
CSProductTypeStatus . |
equals, getItems, getMaxRows, getSortOrder, getStartRow, iterator, setItems, setMaxRows, setSortOrder, 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 CSProductTypeStatus()
CSProductTypeStatus
object.
Use the various set
methods provided to initialise the CSProductTypeStatus
object
prior to invoking any of its query methods.
public CSProductTypeStatus(java.lang.String strPropertyFile)
CSProductTypeStatus
, specifying a properties file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSProductTypeStatus
object prior to
invoking any of its query methods.
strPropertyFile
- the property file that contains the connection details.public int getProductTypeID()
public void setProductTypeID(int nProductTypeID)
nProductTypeID
- the product type ID.public java.lang.String getAttributeTypeNameList()
public void setAttributeTypeNameList(java.lang.String strAttributeTypeNameList)
setAttributeTypeNameList
followed by a call to get
returns details of all the
product options with the specified attribute types.
strAttributeTypeNameList
- a comma-separated list of attribute type names.public java.lang.String getCountryName()
When CountryName
is used that country, and its decimal places, will override the default country
and decimal places as defined in the iCM Commerce Settings. The country's decimal places can itself be overridden
by using setDecimalPlaces
.
If set to null then the default country as defined in the iCM Commerce Settings will be used.
public void setCountryName(java.lang.String strCountryName)
When CountryName
is used that country, and its decimal places, will override the default country
and decimal places as defined in the iCM Commerce Settings. The country's decimal places can itself be overridden
by using setDecimalPlaces
.
If set to null then the default country as defined in the iCM Commerce Settings will be used.
strCountryName
- the official name of the country used to calculate country VAT, country net price and country gross
price.public java.lang.Integer getDecimalPlaces()
When DecimalPlaces
is used its value will override the decimal places setting for a country
specified using setCountryName
and the decimal places as defined in the iCM
Commerce Settings.
If set to null and country name is specified using setCountryName
then the decimal places as
defined by that country will be used.
If set to null and country name is not specified then the decimal places as defined in the iCM Commerce Settings will be used.
public void setDecimalPlaces(java.lang.Integer nDecimalPlaces)
When DecimalPlaces
is used its value will override the decimal places setting for a country
specified using setCountryName
and the decimal places as defined in the iCM
Commerce Settings.
If set to null and country name is specified using setCountryName
then the decimal places as
defined by that country will be used.
If set to null and country name is not specified then the decimal places as defined in the iCM Commerce Settings will be used.
nDecimalPlaces
- the decimal places setting.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for a product type status are :
LEVEL_DETAIL
Will only retrieve visible product options. Retrieves all product option data;
calculated price, VAT and shipping information; associated attributes.LEVEL_ALL
Will only retrieve visible product options. Retrieves all product option data;
calculated price, VAT and shipping information; associated attributes and media.setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public boolean exist() throws CSException
CSProductTypeStatus
.
exist
in class CSItemMultiple
true
if all product options 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 setProductTypeID
followed by get
to populate this
CSProductTypeStatus
object with the details of the visible product options for the specified
product type.
Use setAttributeTypeNameList
in conjunction with
setProductTypeID
followed by get
to populate this CSProductTypeStatus
object with the details of the product options for the specified product type that also have the associated
attributes.
Key information set using setSortOrder
, setMaxRows
and
setStartRow
is not valid.
Each retrieved product option is stored as a CSProductOption
object within the item
ArrayList
member of CSProductTypeStatus
- use getItems
or
iterator
to access/navigate through them. These product options will be stored in the
ArrayList
in the order specified in iCM.
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 no product options can 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
CSProductTypeStatus
.
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 no product options cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSProductTypeStatus
.
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 no product options cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.