Class CalendarDatabase

    Definition

    Namespace:
    Tizen.Pims.Calendar
    Assembly:
    Tizen.Pims.Calendar.dll

    The CalendarDatabase provides methods to manage calendar information from/to the database.

    public class CalendarDatabase
    Inheritance
    object
    CalendarDatabase
    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Properties

    View Source

    LastChangeVersion

    Gets the last successful changed calendar database version on the current connection.

    Declaration
    public int LastChangeVersion { get; }
    Property Value
    Type Description
    int

    The last successful changed calendar database version on the current connection.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Version

    The calendar database version.

    Declaration
    public int Version { get; }
    Property Value
    Type Description
    int

    The current calendar database version.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Methods

    View Source

    AddDBChangedDelegate(string, EventHandler<DBChangedEventArgs>)

    Registers a callback function to be invoked when a record changes.

    Declaration
    public void AddDBChangedDelegate(string viewUri, EventHandler<DBChangedEventArgs> DBChanged)
    Parameters
    Type Name Description
    string viewUri

    The view URI of the record to subscribe for change notifications.

    System.EventHandler<TEventArgs><DBChangedEventArgs> DBChanged

    The EventHandler to register.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Delete(string, int)

    Deletes a record from the calendar database with related child records.

    Declaration
    public void Delete(string viewUri, int recordId)
    Parameters
    Type Name Description
    string viewUri

    The view URI of a record.

    int recordId

    The record ID to be deleted.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Delete(string, int[])

    Deletes multiple records with the related child records from the calendar database as a batch operation.

    Declaration
    public void Delete(string viewUri, int[] idArray)
    Parameters
    Type Name Description
    string viewUri

    The view URI of the records to delete.

    int[] idArray

    The record IDs to delete.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Delete(CalendarList)

    Deletes multiple records with the related child records from the calendar database as a batch operation.

    Declaration
    public void Delete(CalendarList list)
    Parameters
    Type Name Description
    CalendarList list

    The record list.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Get(string, int)

    Gets a record from the calendar database.

    Declaration
    public CalendarRecord Get(string viewUri, int recordId)
    Parameters
    Type Name Description
    string viewUri

    The view URI of a record.

    int recordId

    The record ID.

    Returns
    Type Description
    CalendarRecord

    The record associated with the record ID.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    GetAll(string, int, int)

    Retrieves all the records as a list.

    Declaration
    public CalendarList GetAll(string viewUri, int offset, int limit)
    Parameters
    Type Name Description
    string viewUri

    The view URI to get records from.

    int offset

    The index from which results are received.

    int limit

    The maximum number of results (value 0 is used for all the records).

    Returns
    Type Description
    CalendarList

    The record list.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    GetChangesByVersion(string, int, int, out int)

    Retrieves the records with the given calendar database version.

    Declaration
    public CalendarList GetChangesByVersion(string viewUri, int BookId, int calendarDBVersion, out int currentDBVersion)
    Parameters
    Type Name Description
    string viewUri

    The view URI to get records from.

    int BookId

    The calendar book ID to filter.

    int calendarDBVersion

    The calendar database version.

    int currentDBVersion

    The current calendar database version.

    Returns
    Type Description
    CalendarList

    The record list.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    GetCount(string)

    Gets the record count of a specific view.

    Declaration
    public int GetCount(string viewUri)
    Parameters
    Type Name Description
    string viewUri

    The view URI to get records from.

    Returns
    Type Description
    int

    The count of records.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    View Source

    GetCount(CalendarQuery)

    Gets the record count with a query.

    Declaration
    public int GetCount(CalendarQuery query)
    Parameters
    Type Name Description
    CalendarQuery query

    The query used for filtering the results.

    Returns
    Type Description
    int

    The count of records.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    View Source

    GetRecordsWithQuery(CalendarQuery, int, int)

    Retrieves the records using a query.

    Declaration
    public CalendarList GetRecordsWithQuery(CalendarQuery query, int offset, int limit)
    Parameters
    Type Name Description
    CalendarQuery query

    The query used to filter results.

    int offset

    The index from which results are received.

    int limit

    The maximum number of results (value 0 is used for all the records).

    Returns
    Type Description
    CalendarList

    CalendarList.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Insert(CalendarList)

    Inserts multiple records into the calendar database as a batch operation.

    Declaration
    public int[] Insert(CalendarList list)
    Parameters
    Type Name Description
    CalendarList list

    The record list.

    Returns
    Type Description
    int[]

    The inserted record ID array.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Insert(CalendarRecord)

    Inserts a record into the calendar database.

    Declaration
    public int Insert(CalendarRecord record)
    Parameters
    Type Name Description
    CalendarRecord record

    The record to be inserted.

    Returns
    Type Description
    int

    The ID of inserted record.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    LinkRecord(int, int)

    Links a record to another record.

    Declaration
    public void LinkRecord(int baseId, int recordId)
    Parameters
    Type Name Description
    int baseId

    The base record ID.

    int recordId

    The record ID to link to.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    RemoveDBChangedDelegate(string, EventHandler<DBChangedEventArgs>)

    Deregisters a callback function.

    Declaration
    public void RemoveDBChangedDelegate(string viewUri, EventHandler<DBChangedEventArgs> DBChanged)
    Parameters
    Type Name Description
    string viewUri

    The view URI of the record to subscribe for change notifications.

    System.EventHandler<TEventArgs><DBChangedEventArgs> DBChanged

    The EventHandler to deregister.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Replace(CalendarList, int[])

    Replaces multiple records in the calendar database as a batch operation.

    Declaration
    public void Replace(CalendarList list, int[] idArray)
    Parameters
    Type Name Description
    CalendarList list

    The record list.

    int[] idArray

    The record IDs.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Replace(CalendarRecord, int)

    Replaces a record in the calendar database.

    Declaration
    public void Replace(CalendarRecord record, int id)
    Parameters
    Type Name Description
    CalendarRecord record

    The record to be replaced.

    int id

    The record ID.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    UnlinkRecord(int)

    Unlinks a record from the base record.

    Declaration
    public void UnlinkRecord(int recordId)
    Parameters
    Type Name Description
    int recordId

    The record ID to unlink.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Update(CalendarList)

    Updates multiple records into the calendar database as a batch operation.

    Declaration
    public void Update(CalendarList list)
    Parameters
    Type Name Description
    CalendarList list

    The record list.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    View Source

    Update(CalendarRecord)

    Updates a record in the calendar database.

    Declaration
    public void Update(CalendarRecord record)
    Parameters
    Type Name Description
    CalendarRecord record

    The record to be updated.

    Remarks

    This class allows user to access/create/update/delete database operations for the calendar information. The CalendarDatabase is created by the CalendarManager.

    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown when the feature is not supported.

    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.ArgumentException

    Thrown when one of the arguments provided to a method is not valid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX