public final class CSContactMultiple extends CSItemMultiple
The CSContactMultiple
class provides a method that retrieves several contacts from the database. This
method requires that certain database and key information (contact name list, for example) be specified via the
set
methods provided, prior to its invocation.
All database access/connectivity is handled internally by the CSContactMultiple
class.
CSContact
,
Serialized FormLEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSContactMultiple()
Creates an empty
CSContactMultiple object. |
CSContactMultiple(java.lang.String strPropertyFile)
Creates a new
CSContactMultiple , specifying a properties file that contains all of the database
connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSContactMultiple . |
boolean |
exist()
Not currently implemented for
CSContactMultiple . |
void |
get()
Retrieves the details of several contacts from the database.
|
java.lang.String |
getContactIDList()
Gets the list of contact IDs specified as key information.
|
java.lang.String |
getContactNameList()
Gets the list of contact names specified as key information.
|
void |
setContactIDList(java.lang.String strContactIDList)
Specifies the IDs of the contacts that are to be retrieved.
|
void |
setContactNameList(java.lang.String strContactNameList)
Specifies the names of the contacts that are to be retrieved.
|
void |
setSortOrder(java.lang.String strSortOrderList)
Sets the order in which the contacts are to be retrieved.
|
void |
update()
Not currently implemented for
CSContactMultiple . |
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, setDetailLevel, setPreview, setPropertyFile, setRecordGatewayMessages, setSendGatewayMessages, setUseCache
public CSContactMultiple()
CSContactMultiple
object.
Use the various set
methods provided to initialise the CSContactMultiple
object
prior to invoking any of its query methods.
public CSContactMultiple(java.lang.String strPropertyFile)
CSContactMultiple
, specifying a properties file that contains all of the database
connection details.
Use the various set methods provided to initialise the CSContactMultiple
object prior to invoking
any of its query methods.
strPropertyFile
- the property file that contains the connection details.public java.lang.String getContactIDList()
public void setContactIDList(java.lang.String strContactIDList)
setContactIDList
followed by a call to get
returns details of all the specified
contacts.
strContactIDList
- a comma-separated list of contact IDs.public java.lang.String getContactNameList()
public void setContactNameList(java.lang.String strContactNameList)
setContactNameList
followed by a call to get
returns details of all the specified
contacts.
strContactNameList
- a comma-separated list of contact names.public void setSortOrder(java.lang.String strSortOrderList) throws CSParameterException
This method should not be used if the setContactIDList
or
setContactNameList
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, "ContactNameID DESC" would order in descending order of contact name. The
default sort order in this instance is 'DisplayOrder ASC'.
Available sort orders are :
ContactID - order by the contact ID
ContactName - order by the contact name
DisplayOrder - order by the display order of the contact
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
CSContactMultiple
.
exist
in class CSItemMultiple
true
if all contacts 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 get
without any key information to populate this CSContactMultiple
object with
the details of all the contacts from the database.
Use setContactIDList
followed by get
to populate this
CSContactMultiple
object with the details of the contacts specified in the list. The retrieved
contacts will appear within CSContactMultiple
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 setContactNameList
followed by get
to populate this
CSContactMultiple
object with the details of the contacts specified in the list. The retrieved
contacts will appear within CSContactMultiple
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.
Each retrieved contact is stored as a CSContact
object within the item ArrayList
member of
CSContactMultiple
- use getItems
or iterator
to
access/navigate through them. These contacts will be stored in the ArrayList
in the order
specified using the setSortOrder
method, or the default sort order of 'DisplayOrder
ASC'. However, if a list of contacts was specified, the contacts 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 contacts 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
CSContactMultiple
.
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 contacts cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSContactMultiple
.
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 contacts cannot be found on the database.CSException
- the base class for exceptions thrown by this method.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.