public final class CSAttributeSetMultiple extends CSItemMultiple
The CSAttributeSetMultiple
class provides a method that retrieves several attribute types and their
attributes from the database. This method requires that certain database and key information (product type ID, for
example) be specified via the set
methods provided, prior to its invocation.
All database access/connectivity is handled internally by the CSAttributeSetMultiple
class.
CSAttributeType
,
CSAttribute
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSAttributeSetMultiple()
Creates an empty
CSAttributeSetMultiple object. |
CSAttributeSetMultiple(java.lang.String strPropertyFile)
Creates a new
CSAttributeSetMultiple , specifying a properties file that contains all of the
database connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSAttributeSetMultiple . |
boolean |
exist()
Not currently implemented for
CSAttributeSetMultiple . |
void |
get()
Retrieves the details of several attribute types and attributes from the database.
|
CSAttributeMultiple |
getAttributeMultiple()
Gets the retrieved attributes in a
CSAttributeMultiple object. |
java.lang.String |
getAttributeTypeIDList()
Gets the list of attribute type IDs specified as key information.
|
CSAttributeTypeMultiple |
getAttributeTypeMultiple()
Gets the retrieved attribute types in a
CSAttributeTypeMultiple object. |
java.lang.String |
getAttributeTypeNameList()
Gets the list of attribute type names specified as key information.
|
int |
getProductTypeID()
Gets the product type ID specified as key information.
|
void |
setAttributeTypeIDList(java.lang.String strAttributeTypeIDList)
Specifies the IDs of the attribute types for which their attributes are to be retrieved.
|
void |
setAttributeTypeNameList(java.lang.String strAttributeTypeNameList)
Specifies the names of the attribute types that are to be retrieved.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setProductTypeID(int nProductTypeID)
Specifies the ID of the product type for which its attributes are to be retrieved.
|
void |
setSortOrder(java.lang.String strSortOrderList)
Not currently implemented for
CSAttributeSetMultiple . |
java.lang.String |
toString()
Returns the contents of this
CSAttributeSetMultiple object as a string. |
void |
update()
Not currently implemented for
CSAttributeSetMultiple . |
equals, getItems, getMaxRows, getSortOrder, getStartRow, iterator, setItems, setMaxRows, setStartRow
clearRecordedGatewayMessages, clone, count, getCache, getCachingEnabled, getDatabaseVersion, getDatabaseVersion, getDebugOutput, getDetailLevel, getPreview, getPropertyFile, getPropertyFileExtension, getPropertyFilePathname, getRecordedGatewayMessages, getRecordGatewayMessages, getSendGatewayMessages, getUseCache, setDebugOutput, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSAttributeSetMultiple()
CSAttributeSetMultiple
object.
Use the various set
methods provided to initialise the CSAttributeSetMultiple
object prior to invoking any of its query methods.
public CSAttributeSetMultiple(java.lang.String strPropertyFile)
CSAttributeSetMultiple
, specifying a properties file that contains all of the
database connection details.
Use the various set methods provided to initialise the CSAttributeSetMultiple
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)
setProductTypeID
followed by a call to get
returns details of all the attributes of
the specified product type.
nProductTypeID
- the product type ID.public java.lang.String getAttributeTypeIDList()
public void setAttributeTypeIDList(java.lang.String strAttributeTypeIDList)
setAttributeTypeIDList
followed by a call to get
returns details of all attributes
which are children of the specified attribute types.
strAttributeTypeIDList
- a comma-separated list of attribute type IDs.public java.lang.String getAttributeTypeNameList()
public void setAttributeTypeNameList(java.lang.String strAttributeTypeNameList)
setAttributeTypeNameList
followed by a call to get
returns details of all
attributes which are children of the specified attribute types.
strAttributeTypeNameList
- a comma-separated list of attribute type names.public CSAttributeTypeMultiple getAttributeTypeMultiple()
CSAttributeTypeMultiple
object.
CSAttributeTypeMultiple
object containing the retrieved attribute types.public CSAttributeMultiple getAttributeMultiple()
CSAttributeMultiple
object.
CSAttributeMultiple
object containing the retrieved attributes.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for an attribute are :
LEVEL_ALL
Retrieves an attribute type's ID, Name and Description. Retrieves an attribute's ID
and Name.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
CSAttributeSetMultiple
.
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
CSAttributeSetMultiple
.
exist
in class CSItemMultiple
true
if all attribute types 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
CSAttributeSetMultiple
object with the details of the related attribute types, and their
attributes, of the specified product type.
Use setAttributeTypeIDList
followed by get
to populate
this CSAttributeSetMultiple
object with the details of the specified attribute types and their
attributes.
Use setAttributeTypeNameList
followed by get
to populate
this CSAttributeSetMultiple
object with the details of the specified attribute types and their
attributes.
Each retrieved attribute type is stored as a CSAttributeType
object within the attribute type multiple
CSAttributeTypeMultiple
member of CSAttributeSetMultiple
- use
getAttributeTypeMultiple
to access/navigate through them. These attribute
types will be stored in the CSAttributeTypeMultiple
in the default order as configured within iCM
i.e. by the product type's attribute type ordering if product type ID is being used, or by the main attribute
type ordering otherwise.
Each retrieved attribute is stored as a CSAttribute
object within the attribute multiple
CSAttributeMultiple
member of CSAttributeSetMultiple
- use
getAttributeMultiple
to access/navigate through them. These attributes will be
stored in the CSAttributeMultiple
in the default order as configured within iCM i.e. by the main
attribute type ordering.
get
in class CSItemMultiple
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 update() throws CSException
CSAttributeSetMultiple
.
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 attributes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSAttributeSetMultiple
.
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 attributes cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public java.lang.String toString()
CSAttributeSetMultiple
object as a string.
toString
in class CSItemMultiple
CSAttributeSetMultiple
object, and all the items which it contains.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.