Class TagCommand
Definition
- Namespace:
- Tizen.Content.Media
Content
- Assembly:
- Tizen.Content.MediaContent.dll
Provides the commands to manage tags in the database.
public class TagCommand : MediaCommand
- Inheritance
Constructors
View SourceTagCommand(MediaDatabase)
Initializes a new instance of the Tag
Declaration
public TagCommand(MediaDatabase database)
Parameters
Type | Name | Description |
---|---|---|
Media |
database | The Media |
Exceptions
Type | Condition |
---|---|
System. |
|
System. |
|
See Also
Methods
View SourceAddMedia(int, IEnumerable<string>)
Adds the media set to a tag.
Declaration
public bool AddMedia(int tagId, IEnumerable<string> mediaIds)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID that the media will be added to. |
System. |
mediaIds | The media ID to add to the tag. |
Returns
Type | Description |
---|---|
bool | true if the matched record was found and updated, otherwise false. |
Remarks
The invalid media IDs will be ignored.
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
System. |
|
System. |
|
See Also
View SourceAddMedia(int, string)
Adds the media to a tag.
Declaration
public bool AddMedia(int tagId, string mediaId)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID that the media will be added to. |
string | mediaId | The media ID to add to the tag. |
Returns
Type | Description |
---|---|
bool | true if the matched record was found and updated, otherwise false. |
Remarks
The invalid media ID will be ignored.
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
System. |
|
System. |
|
See Also
View SourceCount()
Retrieves the number of tags.
Declaration
public int Count()
Returns
Type | Description |
---|---|
int | The number of tags. |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
See Also
View SourceCount(CountArguments)
Retrieves the number of tags with the Count
Declaration
public int Count(CountArguments arguments)
Parameters
Type | Name | Description |
---|---|---|
Count |
arguments | The criteria to use to filter. This value can be null. |
Returns
Type | Description |
---|---|
int | The number of tags filtered. |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
See Also
View SourceCountMedia(int, CountArguments)
Retrieves the number of the media information of the tag with the Count
Declaration
public int CountMedia(int tagId, CountArguments arguments)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID to query with. |
Count |
arguments | The criteria to use to filter. This value can be null. |
Returns
Type | Description |
---|---|
int | The number of the media information. |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
See Also
View SourceCountMedia(int)
Retrieves the number of media info of the tag.
Declaration
public int CountMedia(int tagId)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID. |
Returns
Type | Description |
---|---|
int | The number of the media information. |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
See Also
View SourceDelete(int)
Deletes a tag from the database.
Declaration
public bool Delete(int tagId)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID to delete. |
Returns
Type | Description |
---|---|
bool | true if the matched record was found and deleted, otherwise false. |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
System. |
The caller has no required privilege. |
See Also
View SourceInsert(string)
Inserts a tag into the database with the specified name.
Declaration
public Tag Insert(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of tag. |
Returns
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
System. |
The caller has no required privilege. |
See Also
View SourceRemoveMedia(int, IEnumerable<string>)
Removes the media set from a tag.
Declaration
public bool RemoveMedia(int tagId, IEnumerable<string> mediaIds)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID. |
System. |
mediaIds | The collection of media ID to remove from the tag. |
Returns
Type | Description |
---|---|
bool | true if the matched record was found and updated, otherwise false. |
Remarks
The invalid IDs will be ignored.
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
System. |
|
System. |
|
See Also
View SourceRemoveMedia(int, string)
Removes the media from a tag.
Declaration
public bool RemoveMedia(int tagId, string mediaId)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID. |
string | mediaId | The media ID to remove from the tag. |
Returns
Type | Description |
---|---|
bool | true if the matched record was found and updated, otherwise false. |
Remarks
The invalid media ID will be ignored.
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
System. |
|
System. |
|
See Also
View SourceSelect()
Retrieves all the tags.
Declaration
public MediaDataReader<Tag> Select()
Returns
Type | Description |
---|---|
Media |
The Media |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
See Also
View SourceSelect(int)
Retrieves the tag with the specified ID.
Declaration
public Tag Select(int tagId)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID to select. |
Returns
Type | Description |
---|---|
Tag | The Tag instance if the matched record was found in the database, otherwise null. |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
See Also
View SourceSelect(SelectArguments)
Retrieves the tags with the Select
Declaration
public MediaDataReader<Tag> Select(SelectArguments arguments)
Parameters
Type | Name | Description |
---|---|---|
Select |
arguments | The criteria to use to filter. This value can be null. |
Returns
Type | Description |
---|---|
Media |
The Media |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
See Also
View SourceSelectMedia(int, SelectArguments)
Retrieves the media information of the tag with the Select
Declaration
public MediaDataReader<MediaInfo> SelectMedia(int tagId, SelectArguments filter)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID. |
Select |
filter | The criteria to use to filter. This value can be null. |
Returns
Type | Description |
---|---|
Media |
The Media |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
See Also
View SourceSelectMedia(int)
Retrieves the media information of the tag.
Declaration
public MediaDataReader<MediaInfo> SelectMedia(int tagId)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID. |
Returns
Type | Description |
---|---|
Media |
The Media |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
See Also
View SourceUpdateName(int, string)
Updates a tag with the specified name.
Declaration
public bool UpdateName(int tagId, string name)
Parameters
Type | Name | Description |
---|---|---|
int | tagId | The tag ID to update. |
string | name | The new name. |
Returns
Type | Description |
---|---|
bool | true if the matched record was found and updated, otherwise false. |
Exceptions
Type | Condition |
---|---|
System. |
The Media |
System. |
The Media |
Media |
An error occurred while executing the command. |
System. |
|
System. |
|
System. |
The caller has no required privilege. |