public class CSMetaDataMultiple extends CSItemMultiple
The CSMetaDataMultiple
class provides a method that retrieves several metadata values from the
database. This method requires that certain database and key information be specified via the set
methods provided, prior to its invocation.
All database access/connectivity is handled internally by the CSMetaDataMultiple
class.
LEVEL_ALL, LEVEL_ALL_PLUS_RELATED, LEVEL_DETAIL, LEVEL_ID, LEVEL_SUMMARY
Constructor and Description |
---|
CSMetaDataMultiple()
Creates an empty
CSMetaDataMultiple object. |
CSMetaDataMultiple(java.lang.String strPropertyFile)
Creates an empty
CSMetaDataMultiple object, specifying a property file that contains all of the
database connection details. |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Not currently implemented for
CSMetaDataMultiple . |
boolean |
exist()
Not currently implemented for
CSMetaDataMultiple . |
void |
get()
Retrieves the details of several metadata values from the database.
|
int |
getArticleID()
Gets the article ID currently specified as key information.
|
int |
getEventID()
Gets the event ID currently specified as key information.
|
java.lang.String |
getExcludeGroupIDs()
Gets the list of exclude group IDs currently specified as key information.
|
java.lang.String |
getExcludePropertyIDs()
Gets the list of exclude property IDs currently specified as key information.
|
java.lang.String |
getExcludePropertyNames()
Gets the list of exclude property names currently specified as key information.
|
java.lang.String |
getExcludeRelatedMetaDataIDs()
Gets the list of exclude metadata values IDs specified as key information.
|
java.lang.String |
getExcludeValueIDs()
Gets the list of exclude value IDs currently specified as key information.
|
int |
getGroupID()
Gets the metadata group ID currently specified as key information.
|
java.lang.String |
getGroupName()
Gets the group name currently specified as key information.
|
int |
getMediaID()
Gets the media ID currently specified as key information.
|
int |
getMetadataID()
Gets the metadata ID currently specified as key information.
|
java.lang.String |
getMetaDataList()
Gets the list of metadata IDs specified as key information.
|
int |
getPropertyID()
Gets the property ID currently specified as key information.
|
java.lang.String |
getPropertyName()
Gets the property name currently specified as key information.
|
boolean |
getRelatedBothWays()
Gets the state of the bi-directional relationship flag used when retrieving metadata related to a specified
metadata value.
|
java.lang.String |
getRelatedMetaDataIDs()
Gets the list of metadata values IDs specified as key information.
|
java.lang.String |
getRelatedMetaDataOptionalIDs()
Gets the list of optional metadata values IDs specified as key information.
|
void |
setArticleID(int nArticleID)
Specifies the article ID to be used as key information.
|
void |
setDetailLevel(int nDetailLevel)
Sets the level of detail to be handled by the
get method. |
void |
setEventID(int nEventID)
Specifies the event ID to be used as key information.
|
void |
setExcludeGroupIDs(java.lang.String strGroupIDs)
Specifies IDs of any groups whose values are not to be retrieved by the
get method. |
void |
setExcludePropertyIDs(java.lang.String strPropertyIDs)
Specifies IDs of any properties whose values are not to be retrieved by the
get method. |
void |
setExcludePropertyNames(java.lang.String strPropertyNames)
Specifies names of any properties whose values are not to be retrieved by the
get method. |
void |
setExcludeRelatedMetaDataIDs(java.lang.String strExcludeMetaDataIDs)
Specifies IDs of the metadata values that all retrieved metadata must NOT be related to.
|
void |
setExcludeValueIDs(java.lang.String strValueIDs)
Specifies IDs of any values that are not to be retrieved by the
get method. |
void |
setGroupID(int nGroupID)
Specifies the metadata group ID to be used as key information.
|
void |
setGroupName(java.lang.String strGroupName)
Specifies the group name to be used as key information.
|
void |
setMediaID(int nMediaID)
Specifies the media ID to be used as key information.
|
void |
setMetadataID(int nMetadataID)
Specifies the metadata ID to be used as key information.
|
void |
setMetaDataList(java.lang.String strMetaDataList)
Specifies IDs of the metadata whose details are to be retrieved.
|
void |
setPropertyID(int nPropertyID)
Specifies the property ID to be used as key information.
|
void |
setPropertyName(java.lang.String strPropertyName)
Specifies the property name to be used as key information.
|
void |
setRelatedBothWays(boolean bBidirectional)
When retrieving metadata related to a specified key metadata value, specifies whether to return metadata that
relate the key value in addition to the values related by the key value.
|
void |
setRelatedMetaDataIDs(java.lang.String strMetaDataIDs)
Specifies IDs of the metadata values that all retrieved metadata must be related to.
|
void |
setRelatedMetaDataOptionalIDs(java.lang.String strMetaDataOptionalIDs)
Specifies IDs of the metadata values that all retrieved metadata must be related to one or more of.
|
void |
setSortOrder(java.lang.String strSortOrderList)
Sets the order in which the metadata values are to be retrieved.
|
java.lang.String |
toString()
Outputs the contents of this
CSMetaDataMultiple object to a String object in a
user-friendly format. |
void |
update()
Updates the details of several metadata values on the database.
|
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 CSMetaDataMultiple()
CSMetaDataMultiple
object.
Use the various set
methods provided to initialise the CSMetaDataMultiple
object
prior to invoking any of its query methods.
public CSMetaDataMultiple(java.lang.String strPropertyFile)
CSMetaDataMultiple
object, specifying a property file that contains all of the
database connection details.
Use the various set
methods provided to initialise the CSMetaDataMultiple
object
prior to invoking any of its query methods.
strPropertyFile
- the name of the property file from which the database connection details are to be read.public void setArticleID(int nArticleID)
setArticleID
followed by get
will result in this CSMetaDataMultiple
object being populated with the details of all metadata values that are related to the article specified. Each
metadata value will be stored as a CSMetaData
object within the item ArrayList
member -
use getItems
or iterator
to access/navigate through the values. By
default, the values will be stored in the ArrayList
in ascending group name order, and then
ascending property name order, and then in ascending value ID order within each property. This can be overridden
by using the setSortOrder
method.
The following methods can be used to filter values for a particular group or property.
setGroupID
setGroupName
setPropertyID
setPropertyName
The following methods can be used to omit values for a particular group or property.
setExcludeGroupIDs
or
setExcludePropertyIDs
or
setExcludePropertyNames
nArticleID
- the ID of the article whose related metadata values are required.public int getArticleID()
public void setMediaID(int nMediaID)
setMediaID
followed by get
will result in this CSMetaDataMultiple
object being populated with the details of all metadata values that are related to the media item specified. Each
metadata value will be stored as a CSMetaData
object within the item ArrayList
member -
use getItems
or iterator
to access/navigate through the values. By
default, the values will be stored in the ArrayList
in ascending group name order, and then
ascending property name order, and then in ascending value ID order within each property. This can be overridden
by using the setSortOrder
method.
This option is only available for iCM version 6.0.0.0 onwards.
The following methods can be used to filter values for a particular group or property.
setGroupID
setGroupName
setPropertyID
setPropertyName
The following methods can be used to omit values for a particular group or property.
setExcludeGroupIDs
or
setExcludePropertyIDs
or
setExcludePropertyNames
nMediaID
- the ID of the media item whose related metadata values are required.public int getMediaID()
public void setEventID(int nEventID)
setEventID
followed by get
will result in this CSMetaDataMultiple
object being populated with the details of all metadata values that are related to the event specified. Each
metadata value will be stored as a CSMetaData
object within the item ArrayList
member -
use getItems
or iterator
to access/navigate through the values. By
default, the values will be stored in the ArrayList
in ascending group name order, and then
ascending property name order, and then in ascending value ID order within each property. This can be overridden
by using the setSortOrder
method.
The following methods can be used to filter values for a particular group or property.
setGroupID
setGroupName
setPropertyID
setPropertyName
The following methods can be used to omit values for a particular group or property.
setExcludeGroupIDs
or
setExcludePropertyIDs
or
setExcludePropertyNames
nEventID
- the ID of the event whose related metadata values are required.public int getEventID()
public void setMetadataID(int nMetadataID)
setMetadataID
followed by get
will result in this CSMetaDataMultiple
object being populated with the details of all metadata values that are related to the metadata value specified.
Use setRelatedBothWays
to control whether or not metadata that relates the
key value will be returned in addition to the metadata related by the key value.
Each metadata value will be stored as a CSMetaData
object within the item ArrayList
member -
use getItems
or iterator
to access/navigate through the values. By
default, the values will be stored in the ArrayList
in ascending group name order, and then
ascending property name order, and then in ascending value ID order within each property. This can be overridden
by using the setSortOrder
method.
This option is only available for iCM version 6.0.0.0 onwards.
The following methods can be used to filter values for a particular group or property.
setGroupID
setGroupName
setPropertyID
setPropertyName
The following methods can be used to omit values for a particular group or property.
setExcludeGroupIDs
or
setExcludePropertyIDs
or
setExcludePropertyNames
nMetadataID
- the ID of the metadata value whose related metadata values are required.public int getMetadataID()
public void setRelatedBothWays(boolean bBidirectional)
This method is only useful when used in conjunction with the setMetadataID
method.
The default state is false
, so that only values related by the specified key value are returned.
This option is only available for iCM version 6.0.0.0 onwards.
bBidirectional
- whether related-from relationships should be examined in addition to the related-by relationships.public boolean getRelatedBothWays()
See the setRelatedBothWays
and setMetadataID
method descriptions for further information
public void setRelatedMetaDataIDs(java.lang.String strMetaDataIDs)
setRelatedMetaDataIDs
followed by a call to get
returns details of all the metadata
that are related to ALL of the specified metadata values.
setRelatedMetaDataIDs
may be used as a primary key or in conjunction with other primary keys (e.g.
setArticleID
, setEventID
) as a further filter.
strMetaDataIDs
- a comma-separated list of metadata value IDs.setRelatedMetaDataOptionalIDs
,
setExcludeRelatedMetaDataIDs
public java.lang.String getRelatedMetaDataIDs()
public void setRelatedMetaDataOptionalIDs(java.lang.String strMetaDataOptionalIDs)
setRelatedMetaDataOptionalIDs
followed by a call to get
returns details of all the
metadata that are related to at least one of the specified metadata values.
setRelatedMetaDataOptionalIDs
may be used as a primary key or in conjunction with other primary
keys (e.g. setArticleID
, setEventID
) as a further filter.
strMetaDataOptionalIDs
- a comma-separated list of metadata value IDs.setRelatedMetaDataIDs
,
setExcludeRelatedMetaDataIDs
public java.lang.String getRelatedMetaDataOptionalIDs()
public void setExcludeRelatedMetaDataIDs(java.lang.String strExcludeMetaDataIDs)
setExcludeRelatedMetaDataIDs
followed by a call to get
returns details of all the
metadata that are NOT related to any of the specified metadata values.
setExcludeRelatedMetaDataIDs
may be used as a primary key or in conjunction with other primary
keys (e.g. setArticleID
, setEventID
) as a further filter.
strExcludeMetaDataIDs
- a comma-separated list of metadata value IDs.setRelatedMetaDataIDs
,
setRelatedMetaDataOptionalIDs
public java.lang.String getExcludeRelatedMetaDataIDs()
public void setMetaDataList(java.lang.String strMetaDataList)
setMetaDataList
followed by a call to get
returns details of the metadata specified
in the list.
strMetaDataList
- a comma-separated list of metadata IDs.public java.lang.String getMetaDataList()
public void setGroupID(int nGroupID)
setGroupID
followed by get
will result in this CSMetaDataMultiple
object being populated with the details of all metadata values that are defined for the group specified. This
method may also be used in conjunction with the setArticleID
or
setEventID
methods as an additional filter.
Each metadata value will be stored as a CSMetaData
object within the item ArrayList
member -
use getItems
or iterator
to access/navigate through the values. By
default, the values will be stored in the ArrayList
in ascending group name order, and then
ascending property name order, and then in ascending value ID order within each property. This can be overridden
by using the setSortOrder
method.
nGroupID
- the ID of the group whose metadata values are required.public int getGroupID()
public void setGroupName(java.lang.String strGroupName)
setGroupName
followed by get
will result in this CSMetaDataMultiple
object being populated with the details of all metadata values that are defined for the group specified. This
method may also be used in conjunction with the setArticleID
or
setEventID
methods as an additional filter.
Each metadata value will be stored as a CSMetaData
object within the item ArrayList
member -
use getItems
or iterator
to access/navigate through the values. By
default, the values will be stored in the ArrayList
in ascending group name order, and then
ascending property name order, and then in ascending value ID order within each property. This can be overridden
by using the setSortOrder
method.
strGroupName
- the name of the group whose metadata values are required.public java.lang.String getGroupName()
public void setPropertyID(int nPropertyID)
setPropertyID
followed by get
will result in this CSMetaDataMultiple
object being populated with the details of all metadata values that are defined for the property specified. This
method may also be used in conjunction with the setArticleID
or
setEventID
methods as an additional filter.
Each metadata value will be stored as a CSMetaData
object within the item ArrayList
member -
use getItems
or iterator
to access/navigate through the values. By
default, the values will be stored in the ArrayList
in ascending group name order, and then
ascending property name order, and then in ascending value ID order within each property. This can be overridden
by using the setSortOrder
method.
nPropertyID
- the ID of the property whose metadata values are required.public int getPropertyID()
public void setPropertyName(java.lang.String strPropertyName)
setPropertyName
followed by get
will result in this CSMetaDataMultiple
object being populated with the details of all metadata values that are defined for the property specified. This
method may also be used in conjunction with the setArticleID
or
setEventID
methods as an additional filter.
Each metadata value will be stored as a CSMetaData
object within the item ArrayList
member -
use getItems
or iterator
to access/navigate through the values. By
default, the values will be stored in the ArrayList
in ascending group name order, and then
ascending property name order, and then in ascending value ID order within each property. This can be overridden
by using the setSortOrder
method.
strPropertyName
- the name of the property whose metadata values are required.public java.lang.String getPropertyName()
public void setExcludeGroupIDs(java.lang.String strGroupIDs)
get
method.
This is only relevant when retrieving values associated with a particular article (see
setArticleID
) or a particle event (see setEventID
). Values
of the group(s) specified by setExcludedGroupIDs
will not be retrieved.
strGroupIDs
- a comma-separated list of group IDs.public java.lang.String getExcludeGroupIDs()
String
object containing a comma-separated list of group IDs.public void setExcludePropertyIDs(java.lang.String strPropertyIDs)
get
method.
This is only relevant when retrieving values associated with a particular article (see
setArticleID
) or a particle event (see setEventID
). Values
of the property(ies) specified by setExcludedPropertyIDs
will not be retrieved.
strPropertyIDs
- a comma-separated list of property IDs.public java.lang.String getExcludePropertyIDs()
String
object containing a comma-separated list of property IDs.public void setExcludeValueIDs(java.lang.String strValueIDs)
get
method.
This is only relevant when retrieving values associated with a particular article (see
setArticleID
) or a particle event (see setEventID
). The
value(s) specified by setExcludedValueIDs
will not be retrieved.
strValueIDs
- a comma-separated list of value IDs.public java.lang.String getExcludeValueIDs()
String
object containing a comma-separated list of value IDs.public void setExcludePropertyNames(java.lang.String strPropertyNames)
get
method.
This is only relevant when retrieving values associated with a particular article (see
setArticleID
) or a particle event (see setEventID
). Values
of the property(ies) specified by setExcludedPropertyNames
will not be retrieved.
strPropertyNames
- a comma-separated separated list of property names.public java.lang.String getExcludePropertyNames()
String
object containing a comma-separated separated list of property names.public void setSortOrder(java.lang.String strSortOrderList) throws CSParameterException
This method should not be used if the setMetaDataList
key information is being
supplied.
DISPLAYORDER can only be specified if an ArticleID has been specified via setArticleID.
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, a "METAPROPERTYNAME ASC,METAVALUE DESC" would order in ascending property name order and the values for each property would be in descending value order. ASC is assumed if neither ASC or DESC are specified. The default sort ordering is "METAGROUPNAME ASC, METAPROPERTYNAME ASC, METAVALUEID ASC".
Available sort orders are :
METAGROUPID - order by group ID
METAGROUPNAME - order by group name
METAPROPERTYID - order by property ID
METAPROPERTYNAME - order by property name
METAVALUEID - order by value ID
METAVALUE - order by value
DISPLAYORDER - order by as specified for related article meta data
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 specified.public void setDetailLevel(int nDetailLevel) throws CSParameterException
get
method.
Valid detail levels for a metadata value are :
LEVEL_ALL - all details are processed.
setDetailLevel
in class CSDatabaseItem
nDetailLevel
- the detail level to be used.CSParameterException
- if an invalid detail level is specified.public boolean exist() throws CSException
CSMetaDataMultiple
.
exist
in class CSItemMultiple
true
if all metadata values 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 setMetaDataList
followed by get
to populate this
CSMetaDataMultiple
object with the details of the metadata specified in the list. The retrieved
metadata will appear within CSMetaDataMultiple
in the order that their IDs appear within the
supplied list. Key information set using setSortOrder
,
setMaxRows
and setStartRow
, therefore, is not valid in this
instance.
Use setArticleID
followed by get
to populate this
CSMetaDataMultiple
object with the details of all values associated with the specified article.
Use setMediaID
followed by get
to populate this
CSMetaDataMultiple
object with the details of all values associated with a particular media item.
This option is only available for iCM version 6.0.0.0 onwards.
Use setEventID
followed by get
to populate this
CSMetaDataMultiple
object with the details of all values associated with a particular event.
For setArticleID
, setMediaID
and
setEventID
the following methods can be used to filter values for a particular group or
property: setGroupID
setGroupName
setPropertyID
setPropertyName
For setArticleID
, setMediaID
and
setEventID
the following methods can be used to omit values for a particular group or
property: setExcludeGroupIDs
or
setExcludePropertyIDs
or
setExcludePropertyNames
Use setGroupID
or setGroupName
followed by
get
to populate this CSMetaDataMultiple
object with the details of all values
defined for the group specified. These methods may also be used in conjunction with the setArticleID
and setEventID
methods to further filter the retrieved articles.
Use setPropertyID
or setPropertyName
followed by
get
to populate this CSMetaDataMultiple
object with the details of all values
defined for the property specified. These methods may also be used in conjunction with the
setArticleID
and setEventID
methods to further filter the retrieved articles.
Use setRelatedMetaDataIDs
followed by get
to populate this
CSMetaDataMultiple
object with the details of the metadata that are related to ALL of the
specified metadata values. This option is only available for iCM version 6.0.0.0 onwards.
Use setRelatedMetaDataOptionalIDs
followed by get
to populate this CSMetaDataMultiple
object with the details of the metadata that are related to
one or more of the specified metadata values. This option is only available for iCM version 6.0.0.0 onwards.
Use setExcludeRelatedMetaDataIDs
followed by get
to
populate this CSMetaDataMultiple
object with the details of the metadata that are NOT related to
any of the specified metadata values. This option is only available for iCM version 6.0.0.0 onwards.
The setRelatedMetaDataIDs
, setRelatedMetaDataOptionalIDs
and
setExcludeRelatedMetaDataIDs
methods can be used on as primary key information or in conjunction
with other primary keys (setArticleID
, setMediaID
, etc) as a filter.
Each retrieved value will be stored as a CSMetaData
object within the item ArrayList
member of CSMetaDataMultiple
- use getItems
or iterator
to
access/navigate through them.
Metadata values will be stored in the order specified using the setSortOrder
method. The setStartRow
and setMaxRows
methods can be used to
restrict the number of metadata values that are retrieved.
get
in class CSItemMultiple
CSParameterException
- if an invalid combination of key information has been suppliedCSDatabaseException
- if there are problems accessing the databaseCSNotFoundException
- if a requested value cannot be found on the databaseCSSecurityException
- if security has been breachedCSException
- the base class for exceptions thrown by this method.public void update() throws CSException
Use setItems
followed by update
to save the supplied details
to the database.
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 values cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public void delete() throws CSException
CSMetaDataMultiple
.
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 values cannot be found on the database.CSException
- the base class for exceptions thrown by this method.public java.lang.String toString()
CSMetaDataMultiple
object to a String
object in a
user-friendly format.
toString
in class CSItemMultiple
String
containing the user-friendly output.Copyright © 2022 Goss Interactive Ltd. All Rights Reserved.