public final class CSProductGroup extends CSItem
The CSProductGroup
class includes methods for the retrieval of a particular product group's details.
All such methods require that certain database and key information (product group ID, for example) be specified via
the set
methods provided, prior to their invocation.
All database access/connectivity is handled internally by the CSProductGroup
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 |
---|
CSProductGroup()
Creates an empty
CSProductGroup object. |
CSProductGroup(CSProductGroup objItem)
Creates an empty
CSProductGroup object, and initialises it from the contents of the supplied
CSItem object. |
CSProductGroup(java.lang.String strPropertyFile)
Creates a new
CSProductGroup , specifying a property file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSProductGroup . |
boolean |
exist()
Determines whether a product group exists on the database.
|
void |
get()
Retrieves the details of a product group from the database.
|
boolean |
getDisplay()
Gets the flag which indicates the display status of the product group.
|
java.lang.String |
getName()
Gets the name of the product group to be used as key information.
|
java.lang.String |
getParentData()
Gets the parent data of the product group.
|
int |
getParentGroupID()
Gets the parent group ID of the product group.
|
int |
getProductGroupID()
Gets the ID of the product group to be used as key information.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setDisplay(boolean bDisplay)
Sets the flag which indicates the display status of the product group.
|
void |
setName(java.lang.String strName)
Sets the name of the product group to be used as key information.
|
void |
setParentData(java.lang.String strParentData)
Sets the parent data of the product group.
|
void |
setParentGroupID(int nParentGroupID)
Sets the parent group ID of the product group.
|
void |
setProductGroupID(int nProductGroupID)
Sets the product group ID to be used as key information.
|
void |
update()
Not currently implemented for
CSProductGroup . |
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 CSProductGroup()
CSProductGroup
object.
Use the various set methods provided to initialise the CSProductGroup
object prior to invoking any
of its query methods.
public CSProductGroup(CSProductGroup objItem)
CSProductGroup
object, and initialises it from the contents of the supplied
CSItem object.
objItem
- the CSProductGroup
object to be used to initialise the new onepublic CSProductGroup(java.lang.String strPropertyFile)
CSProductGroup
, specifying a property file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSProductGroup
object prior to invoking any
of its query methods.
strPropertyFile
- the property file that contains the connection details.public int getProductGroupID()
public void setProductGroupID(int nProductGroupID)
setProductGroupID
followed by a call to get
will return details of the product
group with the specified ID.
nProductGroupID
- the product group's ID to be used as key information.public int getParentGroupID()
public void setParentGroupID(int nParentGroupID)
nParentGroupID
- the product group's parent group ID.public java.lang.String getParentData()
public void setParentData(java.lang.String strParentData)
strParentData
- the product group's parent data.public java.lang.String getName()
public void setName(java.lang.String strName)
setName
followed by a call to get
will return details of the product group with the
specified name.
strName
- the product group's name to be used as key information.public boolean getDisplay()
public void setDisplay(boolean bDisplay)
bDisplay
- the flag indicating the product group's display status.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method. Default is LEVEL_ALL.
Valid detail levels for a product group are :
LEVEL_ID
Retrieves the ProductGroupID.LEVEL_ALL
Retrieves the ParentGroupID, Name and Display.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 setProductGroupID
followed by exist
to ascertain if there is a
product group with the specified ID on the database.
Use setName
followed by exist
to ascertain if there is a product group
with the specified name on the database.
exist
in class CSItem
true
if this product group 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 product group then specify the amount of detail
required using the setDetailLevel
method before calling this method.
Use setProductGroupID
followed by get
to populate this
CSProductGroup
object with the details of the product group identified by the specified ID.
Use setName
followed by get
to populate this CSProductGroup
object with the details of the product group identified by the specified 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 product group 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
CSProductGroup
.
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 product group cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSProductGroup
.
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 product group cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.