NotebookEntryId

Since: BlackBerry 10.0.0

#include <bb/pim/notebook/NotebookEntryId>

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

The NotebookEntryId class represents the unique ID of a NotebookEntry.

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

A NotebookEntry is automatically assigned a NotebookEntryId when it is committed to persistence using the NotebookService. The AccountKey is inherited from the parent Notebook of the NotebookEntry, and the NotebookEntryKey is assigned by the database at commit time.

See also:

NotebookEntry


Overview

Public Functions Index

NotebookEntryId ()
NotebookEntryId (bb::pim::account::AccountKey accountKey, NotebookEntryKey notebookEntryKey)
NotebookEntryId (const QString &notebookEntryId)
NotebookEntryId (const NotebookEntryId &other)
~NotebookEntryId ()
bb::pim::account::AccountKeyaccountKey () const
boolisValid () const
NotebookEntryKeynotebookEntryKey () const
booloperator!= (const NotebookEntryId &other) const
NotebookEntryId &operator= (const NotebookEntryId &other)
booloperator== (const NotebookEntryId &other) const
QStringtoString () const

Public Functions

NotebookEntryId ()

Constructs a new NotebookEntryId with default values.

See also:

isValid()

Since:

BlackBerry 10.0.0

NotebookEntryId (
  • bb::pim::account::AccountKeyaccountKey,
  • NotebookEntryKeynotebookEntryKey )

Constructs a new NotebookEntryId with the provided account key and notebook entry key.

The account key specifies the account that the NotebookEntry for this NotebookEntryId belongs to. The notebook entry key uniquely identifies a NotebookEntry within a particular account.

Parameters
accountKey

The account key.

notebookEntryKey

The notebook entry key.

Since:

BlackBerry 10.0.0

NotebookEntryId (

Constructs a new NotebookEntryId from the provided QString.

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

Parameters
notebookEntryId

The notebook entry ID as a human-readable string.

Since:

BlackBerry 10.0.0

NotebookEntryId (

Copy constructor.

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

Parameters
other

The NotebookEntryId to be copied.

Since:

BlackBerry 10.0.0

~NotebookEntryId ()

Destructor.

Since:

BlackBerry 10.0.0

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

Retrieves the account key for this NotebookEntryId.

The account key determines which account the NotebookEntry for this NotebookEntryId belongs to.

Return:

The account key for this NotebookEntryId.

Since:

BlackBerry 10.0.0

bool isValid ()

Indicates whether this NotebookEntryId is valid.

A default-constructed NotebookEntryId is considered invalid.

Return:

true if this NotebookEntryId is valid, false otherwise.

Since:

BlackBerry 10.0.0

NotebookEntryKey notebookEntryKey ()

Retrieves the notebook entry key for this NotebookEntryId.

The notebook entry key uniquely identifies a NotebookEntry within a particular account.

Return:

The notebook entry key for this NotebookEntryId.

Since:

BlackBerry 10.0.0

bool operator!= (

Inequality operator.

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

Parameters
other

The NotebookEntryId from which to compare.

Return:

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

Since:

BlackBerry 10.0.0

NotebookEntryId & operator= (

Assignment operator.

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

Parameters
other

The NotebookEntryId from which to copy all values.

Return:

A reference to this NotebookEntryId.

Since:

BlackBerry 10.0.0

bool operator== (

Equality operator.

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

Parameters
other

The NotebookEntryId 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 this NotebookEntryId.

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

Return:

The human-readable string representation of this NotebookEntryId.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



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

comments powered by Disqus