BSchemaTableNode::RowNode Class Reference
[CoreDataManagerProvider]

#include <dmprovider/SchemaTableNode.h>

Inheritance diagram for BSchemaTableNode::RowNode:

BIndexedDataNode BnCatalog BnReferable BSchemaTableNode::DataAccessor SAtom BBinder IReferable BBinder ICatalog SDatumGeneratorInt BIndexedIterable BMetaDataNode List of all members.

Detailed Description

Node object generated for a row in BSchemaTableNode.

This object provides read/write access to a particular row in the table, based on the table's schema.


Implementation

Reimplement RowNode to modify the database contents.

virtual status_t AddEntry (const SString &name, const SValue &entry)
 If the entry exists, call through to StoreValueAtLocked.
virtual size_t CountEntriesLocked () const
 Return BSchemaTableNode::CountColumnsLocked().
virtual sptr< IDatumCreateDatum (SString *name, uint32_t flags, status_t *err)
 Return B_UNSUPPORTED - though should it allow "creation" of data with the right name?
virtual sptr< INodeCreateNode (SString *name, status_t *err)
 Return B_UNSUPPORTED - rows can't create new sub-tables without implementing a join.
virtual ssize_t EntryIndexOfLocked (const SString &entry) const
 Return BSchemaTableNode::ColumnIndexOfLocked().
virtual SString EntryNameAtLocked (size_t index) const
 Return BSchemaTableNode::ColumnNameAtLocked().
virtual SString MimeTypeLocked () const
 Return BSchemaTableNode::RowMimeTypeLocked().
virtual status_t RemoveEntry (const SString &name)
 Return B_UNSUPPORTED - can't remove entries from a single row, have to use ITable.
virtual status_t RenameEntry (const SString &entry, const SString &name)
 Return B_UNSUPPORTED - can't rename entries in a single row, have to use ITable.
virtual void ReportChangeAtLocked (size_t index, const sptr< IBinder > &editor, uint32_t changes, off_t start=-1, off_t length=-1)
 Call BIndexedTableNode::ReportChangeAtLocked(m_index, index, ...).
virtual off_t SizeAtLocked (size_t index) const
 Return size by directly accessing database.
virtual status_t StoreMimeTypeLocked (const SString &value)
 Return B_UNSUPPORTED (clients can not modify the MIME type).
virtual status_t StoreSizeAtLocked (size_t index, off_t size)
 Change size by directly accessing database, if this is a variable size column.
virtual status_t StoreValueAtLocked (size_t index, const SValue &value)
 Modify contents of database.
virtual status_t StoreValueTypeAtLocked (size_t index, uint32_t type)
 Return B_UNSUPPORTED -- value type comes from schema column.
virtual SValue ValueAtLocked (size_t index) const
 Retrieve data as a value.

Bookkeeping

Creation, destruction, locking, etc.

virtual lock_status_t Lock () const
 Reimplemented to use the BSchemaTableNode lock.
 RowNode (const SContext &context, const sptr< BSchemaTableNode > &owner, uint32_t rowID)
 Reimplemented to use the BSchemaTableNode lock.
virtual void Unlock () const
 Reimplemented to use the BSchemaTableNode lock.
SContext Context ()
 Disambiguate.
virtual status_t FinishAtom (const void *id)
 The destructor must call Lock(), so return FINISH_ATOM_ASYNC to avoid deadlocks.
virtual bool HoldRefForLink (const SValue &binding, uint32_t flags)
 Make this object stay around while there are links on it.
virtual void InitAtom ()
 Initialize both base classes.
virtual SValue Inspect (const sptr< IBinder > &caller, const SValue &which, uint32_t flags)
 Make BIndexedDataNode, ICatalog and IReferable accessible.
virtual ~RowNode ()
 Reimplemented to use the BSchemaTableNode lock.

IReferable Implementation

virtual SString Reference () const
 Official path to this object.

Public Attributes

const uint32_t m_rowID


Constructor & Destructor Documentation

RowNode const SContext context,
const sptr< BSchemaTableNode > &  owner,
uint32_t  rowID
 

Reimplemented to use the BSchemaTableNode lock.

~RowNode  )  [protected, virtual]
 

Reimplemented to use the BSchemaTableNode lock.


Member Function Documentation

status_t AddEntry const SString name,
const SValue entry
[virtual]
 

If the entry exists, call through to StoreValueAtLocked.

It seems like it wouldn't be hard to support all of the "extra" fields directly in the regular row, which would make the row impelenting ICatalog make a bit more sense. Not sure if we actually want to do this or not; it's a policy decision.

Implements ICatalog.

SContext Context  )  [inline, protected]
 

Disambiguate.

Reimplemented from BIndexedDataNode.

size_t CountEntriesLocked  )  const [virtual]
 

Return BSchemaTableNode::CountColumnsLocked().

Implements BIndexedDataNode.

sptr< IDatum > CreateDatum SString name,
uint32_t  flags,
status_t err
[virtual]
 

Return B_UNSUPPORTED - though should it allow "creation" of data with the right name?

Implements ICatalog.

sptr< INode > CreateNode SString name,
status_t err
[virtual]
 

Return B_UNSUPPORTED - rows can't create new sub-tables without implementing a join.

Implements ICatalog.

ssize_t EntryIndexOfLocked const SString entry  )  const [virtual]
 

Return BSchemaTableNode::ColumnIndexOfLocked().

Implements BIndexedDataNode.

SString EntryNameAtLocked size_t  index  )  const [virtual]
 

Return BSchemaTableNode::ColumnNameAtLocked().

Implements BIndexedDataNode.

status_t FinishAtom const void *  id  )  [protected, virtual]
 

The destructor must call Lock(), so return FINISH_ATOM_ASYNC to avoid deadlocks.

Reimplemented from SAtom.

bool HoldRefForLink const SValue binding,
uint32_t  flags
[protected, virtual]
 

Make this object stay around while there are links on it.

Reimplemented from BBinder.

void InitAtom  )  [protected, virtual]
 

Initialize both base classes.

Reimplemented from BSchemaTableNode::DataAccessor.

SValue Inspect const sptr< IBinder > &  caller,
const SValue which,
uint32_t  flags
[protected, virtual]
 

Make BIndexedDataNode, ICatalog and IReferable accessible.

Reimplemented from BnReferable.

lock_status_t Lock  )  const [virtual]
 

Reimplemented to use the BSchemaTableNode lock.

Reimplemented from BIndexedDataNode.

SString MimeTypeLocked  )  const [virtual]
 

Return BSchemaTableNode::RowMimeTypeLocked().

Reimplemented from BMetaDataNode.

SString Reference  )  const [virtual]
 

Official path to this object.

This property holds the canonical path at which you can find the object being queried. The returned path is always of the form "/some/path/to/me"; that is, SContext::Lookup() can be used to resolve the path back to the object.

Note:
Currently SContext::Lookup() always uses IDatum::REQUEST_DATA, so it will not work for retrieving IDatum objects. This should be fixed.

Implements IReferable.

status_t RemoveEntry const SString name  )  [virtual]
 

Return B_UNSUPPORTED - can't remove entries from a single row, have to use ITable.

Implements ICatalog.

status_t RenameEntry const SString entry,
const SString name
[virtual]
 

Return B_UNSUPPORTED - can't rename entries in a single row, have to use ITable.

Implements ICatalog.

void ReportChangeAtLocked size_t  index,
const sptr< IBinder > &  editor,
uint32_t  changes,
off_t  start = -1,
off_t  length = -1
[virtual]
 

Call BIndexedTableNode::ReportChangeAtLocked(m_index, index, ...).

Reimplemented from BIndexedDataNode.

off_t SizeAtLocked size_t  index  )  const [virtual]
 

Return size by directly accessing database.

Reimplemented from SDatumGeneratorInt.

status_t StoreMimeTypeLocked const SString value  )  [virtual]
 

Return B_UNSUPPORTED (clients can not modify the MIME type).

Reimplemented from BMetaDataNode.

status_t StoreSizeAtLocked size_t  index,
off_t  size
[virtual]
 

Change size by directly accessing database, if this is a variable size column.

Reimplemented from SDatumGeneratorInt.

status_t StoreValueAtLocked size_t  index,
const SValue value
[virtual]
 

Modify contents of database.

Implements BIndexedDataNode.

status_t StoreValueTypeAtLocked size_t  index,
uint32_t  type
[virtual]
 

Return B_UNSUPPORTED -- value type comes from schema column.

Reimplemented from SDatumGeneratorInt.

void Unlock  )  const [virtual]
 

Reimplemented to use the BSchemaTableNode lock.

Reimplemented from BIndexedDataNode.

SValue ValueAtLocked size_t  index  )  const [virtual]
 

Retrieve data as a value.

Implements BIndexedDataNode.


Member Data Documentation

const uint32_t m_rowID
 


The documentation for this class was generated from the following files: