CommsDat::CMDBElement Class Reference

class CommsDat::CMDBElement : public CBase

Every item stored in the database is represented as a CMDBElement This class contains the id and attributes of every item in the database and for individual fields it also contains the value.

Inherits from

Public Member Functions
CMDBElement ()
CMDBElement ( TMDBElementId )
~CMDBElement ()
IMPORT_C TMDBAttributeFlags Attributes ()
IMPORT_C void ClearAttributes ( TMDBAttributeFlags )
TMDBElementId * Data ()
IMPORT_C TMDBElementId ElementId ()
IMPORT_C TBool IsNull ()
IMPORT_C TBool IsSetAttribute ( TMDBAttributeFlags )
IMPORT_C TInt RecordId ()
IMPORT_C void SetAttributes ( TMDBAttributeFlags )
IMPORT_C void SetElementId ( TMDBElementId )
IMPORT_C void SetRecordId ( TInt )
IMPORT_C void SetTypeId ( TMDBElementId )
IMPORT_C TMDBElementId TableId ()
EXP_DATA_VTABLE TCDFieldValueTypes Type ()
IMPORT_C TMDBElementId TypeId ()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Protected Attributes
TMDBElementId iElementId
TAny * iValue

Constructor & Destructor Documentation

CMDBElement()

IMPORT_C CMDBElement ( )

Default Constructor

CMDBElement(TMDBElementId)

IMPORT_C CMDBElement ( TMDBElementId aElementId )

Constructor

Parameters

TMDBElementId aElementId

~CMDBElement()

IMPORT_C ~CMDBElement ( )

Destructor

Member Functions Documentation

Attributes()

IMPORT_C TMDBAttributeFlags Attributes ( ) const

Returns the Attributes of an object of this type.

Attributes express database access rights for the data of this element

ClearAttributes(TMDBAttributeFlags)

IMPORT_C void ClearAttributes ( TMDBAttributeFlags aAttributes )

Clears one or more attributes

Parameters

TMDBAttributeFlags aAttributes

Data()

TMDBElementId * Data ( ) [inline]

ElementId()

IMPORT_C TMDBElementId ElementId ( ) const

Returns the ElementId of an object of this type.

The TypeId is

<TableId><ColumnId><RecordId>

This identifies the meaning of the field in the database schema It also identifies the type of the data stored in this element and the instance of the type

IsNull()

IMPORT_C TBool IsNull ( ) const

Queries the state of the field value

Returns ETrue if the value of the element is not set Returns EFalse if the element contains a value

IsSetAttribute(TMDBAttributeFlags)

IMPORT_C TBool IsSetAttribute ( TMDBAttributeFlags aAttributes ) const

Queries the attributes

Returns ETrue if all queried attributes are set Returns EFalse if any queried attribute is not set.

Parameters

TMDBAttributeFlags aAttributes

RecordId()

IMPORT_C TInt RecordId ( ) const

Returns the RecordId of an object of this type.

The RecordId is part of the ElementId <x><x><RecordId>

It identifies a particular instance of this type of Element in the database

SetAttributes(TMDBAttributeFlags)

IMPORT_C void SetAttributes ( TMDBAttributeFlags aAttributes )

Sets one or more attributes

Parameters

TMDBAttributeFlags aAttributes

SetElementId(TMDBElementId)

IMPORT_C void SetElementId ( TMDBElementId aElementId )

Sets the ElementId

Parameters

TMDBElementId aElementId

SetRecordId(TInt)

IMPORT_C void SetRecordId ( TInt aRecordId )

Sets the RecordId

Parameters

TInt aRecordId

SetTypeId(TMDBElementId)

IMPORT_C void SetTypeId ( TMDBElementId aElementId )

Sets the TypeId

Parameters

TMDBElementId aElementId

TableId()

IMPORT_C TMDBElementId TableId ( ) const

Returns the TableId of an object of this type.

The TableId is part of the ElementId

<TableId><x><x>

It identifies the table in the database that holds the data contained in this element

Type()

EXP_DATA_VTABLE TCDFieldValueTypes Type ( ) [pure virtual]

Queries the type of the field value

Returns the enumeration TCDFieldValueTypes that represents the value that can be stored in this element

TypeId()

IMPORT_C TMDBElementId TypeId ( ) const

Returns the TypeId of an object of this type.

The TypeId is

<TableId><ColumnId><x>

This identifies the meaning of the data in this element in the database schema It also identifies the type of the data contained in this element

For an element that is a Table or a Record, the ColumnId field will be set to

KCDMaxColumnId

Member Data Documentation

TMDBElementId iElementId

TMDBElementId iElementId [protected]

TAny * iValue

TAny * iValue [protected]