NotebookId

Since: BlackBerry 10.0.0

#include <bb/pim/notebook/NotebookId>

To link against this class, add the following line to your .pro file: LIBS += -lbbpim

The NotebookId class represents the unique ID of a Notebook.

A NotebookId consists of an AccountKey and a NotebookKey. A NotebookKey is unique within an account, but not across accounts, and therefore an AccountKey must also be provided to ensure uniqueness across the system.

A Notebook is automatically assigned a NotebookId when it is committed to persistence using the NotebookService. The AccountKey is provided as an argument to the NotebookService::addNotebook() function, and the NotebookKey is assigned by the database at commit time.

See also:

Notebook


Overview

Public Functions Index

NotebookId ()
NotebookId (bb::pim::account::AccountKey accountKey, NotebookKey notebookKey)
NotebookId (const QString &notebookId)
NotebookId (const NotebookId &other)
~NotebookId ()
bb::pim::account::AccountKeyaccountKey () const
boolisValid () const
NotebookKeynotebookKey () const
booloperator!= (const NotebookId &other) const
NotebookId &operator= (const NotebookId &other)
booloperator== (const NotebookId &other) const
QStringtoString () const

Public Functions

NotebookId ()

Constructs a new NotebookId with default values.

See also:

isValid()

Since:

BlackBerry 10.0.0

NotebookId (
  • bb::pim::account::AccountKeyaccountKey,
  • NotebookKeynotebookKey )

Constructs a new NotebookId with the provided account key and notebook key.

The account key specifies the account that the Notebook for this NotebookId belongs to. The notebook key uniquely identifies a Notebook within a particular account.

Parameters
accountKey

The account key.

notebookKey

The notebook key.

Since:

BlackBerry 10.0.0

NotebookId (

Constructs a new NotebookId from the provided QString.

The notebookId as a QString contains an account key and notebook key separated by a ":". The account key specifies the account that the Notebook for this NotebookId belongs to. The notebook key uniquely identifies a Notebook within a particular account. If a malformed notebookId string is provided, the NotebookId will be default-constructed and considered invalid.

Parameters
notebookId

The notebook ID as a human-readable string.

Since:

BlackBerry 10.0.0

NotebookId (

Copy constructor.

This function constructs a NotebookId containing exactly the same values as the provided NotebookId.

Parameters
other

The NotebookId to be copied.

Since:

BlackBerry 10.0.0

~NotebookId ()

Destructor.

Since:

BlackBerry 10.0.0

bb::pim::account::AccountKey accountKey ()

Retrieves the account key for this NotebookId.

The account key determines which account the Notebook for this NotebookId belongs to.

Return:

The account key for this NotebookId.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether this NotebookId is valid.

A default-constructed NotebookId is considered invalid.

Return:

true if this NotebookId is valid, false otherwise.

Since:

BlackBerry 10.0.0

NotebookKey notebookKey ()

Retrieves the notebook key for this NotebookId.

The notebook key uniquely identifies a Notebook within a particular account.

Return:

The notebook key for this NotebookId.

Since:

BlackBerry 10.0.0

bool operator!= (

Inequality operator.

This operator determines if this NotebookId has any different values from another NotebookId. This operator should be used on the IDs of two Notebook objects to determine whether they represent different entities in the database.

Parameters
other

The NotebookId from which to compare.

Return:

true if any of the values are not considered equal, false otherwise.

Since:

BlackBerry 10.0.0

NotebookId & operator= (

Assignment operator.

This operator copies all values from the provided NotebookId into this NotebookId.

Parameters
other

The NotebookId from which to copy all values.

Return:

A reference to this NotebookId.

Since:

BlackBerry 10.0.0

bool operator== (

Equality operator.

This operator determines if this NotebookId has the same values as another NotebookId. This operator should be used on the IDs of two Notebook objects to determine whether they represent the same entity in the database.

Parameters
other

The NotebookId from which to compare.

Return:

true if the values are considered equal, false otherwise.

Since:

BlackBerry 10.0.0

QString toString ()

Returns the human-readable string representation of the NotebookId.

The account key and notebook key comprising the NotebookId is encoded as a string separated with a colon in the format of "<accountKey>:<notebookKey>".

Return:

The human-readable string representation of this NotebookId.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus