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