public final class CSRackMultiple extends CSItemMultiple
The CSRackMultiple
class provides a method that retrieves several racks from the database. This method
requires that certain database and key information (article ID list, for example) be specified via the
set
methods provided, prior to its invocation.
All database access/connectivity is handled internally by the CSRackMultiple
class.
CSRack
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSRackMultiple()
Creates an empty
CSRackMultiple object. |
CSRackMultiple(java.lang.String strPropertyFile)
Creates a new
CSRackMultiple , specifying a properties file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSRackMultiple . |
boolean |
exist()
Not currently implemented for
CSRackMultiple . |
void |
get()
Retrieves the details of several racks from the database.
|
int |
getArticleID()
Gets the article ID specified as key information for which related racks are to be retrieved.
|
java.lang.String |
getGroupList()
Gets the list of IDs of the website User Groups to which the specified user belongs.
|
boolean |
getIgnoreVisibility()
Gets the flag which indicates if the display state will be ignored when racks are are to be retrieved.
|
int |
getParentRackID()
Gets the parent rack ID specified as key information for which child racks are to be retrieved.
|
java.lang.String |
getRackIDList()
Gets the list of rack IDs specified as key information.
|
java.lang.String |
getRackNameList()
Gets the list of rack names specified as key information.
|
boolean |
getRecurse()
Gets the flag which indicates if the rack hierarchy is to be recursed and retrieved.
|
boolean |
getSearchableOnly()
Gets the flag which indicates if only searchable racks are to be retrieved.
|
int |
getUserID()
Gets the website User ID specified as key information.
|
boolean |
isIgnoreVisibility()
Deprecated.
Replaced by
getIgnoreVisibility() |
boolean |
isRecurse()
Deprecated.
Replaced by
getRecurse() |
boolean |
isSearchableOnly()
Deprecated.
Replaced by
getSearchableOnly() |
void |
setArticleID(int nArticleID)
Sets the article ID specified as key information for which related racks are to be retrieved.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setGroupList(java.lang.String strGroupList)
Sets a list of the IDs of the User Groups to which the specified user belongs.
|
void |
setIgnoreVisibility(boolean bIgnoreVisibility)
Sets the flag which indicates if the display state will be ignored when racks are are to be retrieved.
|
void |
setParentRackID(int nParentRackID)
Sets the parent rack ID specified as key information for which child racks are to be retrieved.
|
void |
setRackIDList(java.lang.String strRackIDList)
Specifies the IDs of the racks that are to be retrieved.
|
void |
setRackNameList(java.lang.String strRackNameList)
Specifies the IDs of the racks that are to be retrieved.
|
void |
setRecurse(boolean bRecurse)
Sets the flag which indicates if the rack hierarchy is to be recursed and retrieved.
|
void |
setSearchableOnly(boolean bSearchableOnly)
Sets the flag which indicates if only searchable racks are to be retrieved.
|
void |
setSortOrder(java.lang.String strSortOrderList)
Sets the order in which the racks are to be retrieved.
|
void |
setUserID(int nUserID)
Sets the website User ID to be used as key information.
|
void |
update()
Not currently implemented for
CSRackMultiple . |
equals, getItems, getMaxRows, getSortOrder, getStartRow, iterator, setItems, setMaxRows, 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 CSRackMultiple()
CSRackMultiple
object.
Use the various set
methods provided to initialise the CSRackMultiple
object prior
to invoking any of its query methods.
public CSRackMultiple(java.lang.String strPropertyFile)
CSRackMultiple
, specifying a properties file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSRackMultiple
object prior to invoking any
of its query methods.
strPropertyFile
- the property file that contains the connection details.public java.lang.String getRackIDList()
public void setRackIDList(java.lang.String strRackIDList)
setRackIDList
followed by a call to get
returns details of all the specified racks.
strRackIDList
- a comma-separated list of rack IDs.public java.lang.String getRackNameList()
public void setRackNameList(java.lang.String strRackNameList)
setRackNameList
followed by a call to get
returns details of all the specified
racks.
strRackNameList
- a comma-separated list of rack names.public int getParentRackID()
public void setParentRackID(int nParentRackID)
setParentRackID
followed by a call to get
returns details of all the racks that are
children of the specified rack.
nParentRackID
- the parent rack ID.public int getArticleID()
public void setArticleID(int nArticleID)
setArticleID
followed by a call to get
returns details of all the racks that are
related to the specified article.
nArticleID
- the parent rack ID.public void setUserID(int nUserID)
Do not set User ID if you are only interested in unsecured articles, as this will result in a faster query.
setUserID
and an appropriate set
method for article ID followed by a call to
get
will return realted items for articles which are either unsecured articles, or secured articles
to which the specified has access.
nUserID
- the ID of the user to be used in article security checks.public int getUserID()
public void setGroupList(java.lang.String strGroupList)
Do not set this list unless User ID is also being specified using the setUserID
method.
Specifying the website User ID is sufficient to enable full article security to be implemented. However, for
performance reasons the list of group IDs should be also specified if it is already known.
strGroupList
- comma-separated list of the IDs of the website user groups to which the specified user belongs.public java.lang.String getGroupList()
This list is built up by the get
method only if a User ID is specified using the
setUserID
method.
public void setRecurse(boolean bRecurse)
Set true
to recurse and retrieve the rack hierarchy.
Set false
to not recurse the rack hierarchy.
Default is true
for setParentRackID
and
setArticleID
, and false
for
setRackIDList
and setRackNameList
.
bRecurse
- the flag indicating if the rack hierarchy is to be recursed and retrieved.public boolean getRecurse()
Set true
to recurse and retrieve the rack hierarchy.
Set false
to not recurse the rack hierarchy.
Default is true
for setParentRackID
and
setArticleID
, and false
for
setRackIDList
and setRackNameList
.
@Deprecated public boolean isRecurse()
getRecurse()
public void setIgnoreVisibility(boolean bIgnoreVisibility)
Set true
to return racks regardless of their display setting.
Set false
to return only those racks which are displayable.
Default is false
.
bIgnoreVisibility
- the flag indicating if the display state will be ignored when racks are are to be retrieved.public boolean getIgnoreVisibility()
Set true
to return racks regardless of their display setting.
Set false
to return only those racks which are displayable.
Default is false
.
@Deprecated public boolean isIgnoreVisibility()
getIgnoreVisibility()
public void setSearchableOnly(boolean bSearchableOnly)
Set true
to return only those racks which are searchable.
Set false
to return racks regardless of their searchable setting.
Default is false
.
bSearchableOnly
- the flag indicating if only searchable racks are to be retrieved.public boolean getSearchableOnly()
Set true
to return only those racks which are searchable.
Set false
to return racks regardless of their searchable setting.
Default is false
.
@Deprecated public boolean isSearchableOnly()
getSearchableOnly()
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 void setSortOrder(java.lang.String strSortOrderList) throws CSParameterException
This method should not be used if the setRackIDList
or
setRackNameList
key information is being supplied. One or more of the available
sort orders may be specified as a comma-delimited list. Use ASC or DESC to indicate the direction of ordering for
a sort order. For example, "RackName DESC" would order in descending order of the rack's name. By default,
setArticleID
and setParentRackID
return racks in the
order as configured via iCM.
Available sort orders are :
RackID - order by the rack ID
RackName - order by the rack name
ParentRackID - order by the parent rack ID
DisplayOrder - order by the display order of either the article ID or the rack
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
CSRackMultiple
.
exist
in class CSItemMultiple
true
if all racks 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 setRackIDList
followed by get
to populate this
CSRackMultiple
object with the details of the racks specified in the list. The retrieved racks
will appear within CSRackMultiple
in the order that their IDs appear within the supplied list. Key
information set using setSortOrder
, setMaxRows
and
setStartRow
is not valid in this instance.
Use setRackNameList
followed by get
to populate this
CSRackMultiple
object with the details of the racks specified in the list. The retrieved racks
will appear within CSRackMultiple
in the order that their names appear within the supplied list.
Key information set using setSortOrder
, setMaxRows
and
setStartRow
is not valid in this instance.
Use setParentRackID
followed by get
to populate this
CSRackMultiple
object with the details of the racks that are children of the specified rack.
Use setArticleID
followed by get
to populate this
CSRackMultiple
object with the details of the racks that are related to the specified article.
Each retrieved rack is stored as a CSRack
object within the item ArrayList
member of
CSRackMultiple
- use getItems
or iterator
to
access/navigate through them. These racks will be stored in the ArrayList
in the order specified
using the setSortOrder
method, or the default order as specified in iCM. However,
if a list of rack IDs or names was specified, the racks are stored in the same order as in the specified list.
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 one of the specified racks 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
CSRackMultiple
.
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 racks cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSRackMultiple
.
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 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.