VCL
[ class tree: VCL ] [ index: VCL ] [ all elements ]

Class: DBDataSet

Source Location: /dbtables.inc.php

Class Overview

Object
   |
   --Persistent
      |
      --Component
         |
         --DataSet
            |
            --DBDataSet

DBDataSet encapsulates database connectivity for descendant dataset objects.


Variables

Methods


Child classes:

CustomTable
Table encapsulates a database table.

Inherited Variables

Inherited Methods

Class: DataSet

DataSet::__construct()
DataSet::append()
Adds a new, empty record to the end of the dataset.
DataSet::beginInsertAppend()
Begins an insert/append operation
DataSet::cancel()
Cancels modifications to the active record if those changes are not yet posted.
DataSet::checkActive()
Checks to see if the database connection is active.
DataSet::checkBrowseMode()
Automatically posts or cancels data changes when the active record changes.
DataSet::checkCanModify()
Checks to see if the dataset can be modified.
DataSet::checkOperation()
Checks if an specific operation can be made, if not, calls $ErrorEvent
DataSet::checkParentState()
Sets the parent dataset in edit state
DataSet::clearBuffers()
Clear buffers associated with the dataset
DataSet::close()
Closes a dataset.
DataSet::closeCursor()
Close the cursor for this dataset
DataSet::controlsDisabled()
Indicates whether data-aware controls update their display to reflect changes to the dataset.
DataSet::dataEvent()
Used to notify attached datasets about an specific event
DataSet::defaultActive()
DataSet::defaultBOF()
DataSet::defaultCanModify()
DataSet::defaultDataSetField()
DataSet::defaultEOF()
DataSet::defaultFilter()
DataSet::defaultLimitCount()
DataSet::defaultLimitStart()
DataSet::defaultMasterFields()
DataSet::defaultModified()
DataSet::defaultOnAfterCancel()
DataSet::defaultOnAfterClose()
DataSet::defaultOnAfterDelete()
DataSet::defaultOnAfterEdit()
DataSet::defaultOnAfterInsert()
DataSet::defaultOnAfterOpen()
DataSet::defaultOnAfterPost()
DataSet::defaultOnBeforeCancel()
DataSet::defaultOnBeforeClose()
DataSet::defaultOnBeforeDelete()
DataSet::defaultOnBeforeEdit()
DataSet::defaultOnBeforeInsert()
DataSet::defaultOnBeforeOpen()
DataSet::defaultOnBeforePost()
DataSet::defaultOnCalcFields()
DataSet::defaultOnDeleteError()
DataSet::defaultOnFilterRecord()
DataSet::defaultOnNewRecord()
DataSet::defaultOnPostError()
DataSet::defaultRecKey()
DataSet::defaultRecNo()
DataSet::defaultRecordCount()
DataSet::defaultState()
DataSet::delete()
Deletes the active record and positions the dataset on the next record.
DataSet::DisableControls()
Disables data display in data-aware controls associated with the dataset.
DataSet::doInternalOpen()
Performs an internal open of the dataset
DataSet::edit()
Enables editing of data in the dataset.
DataSet::EnableControls()
Enable controls attached to the datasource
DataSet::endInsertAppend()
Finishes an insert/append operation
DataSet::first()
Moves to the first record in the dataset.
DataSet::getLimitCount()
Defines how many records will be shown
DataSet::getLimitStart()
Defines the starting record to filter the dataset with
DataSet::initRecord()
To initialize the current record
DataSet::insert()
Inserts a new, empty record in the dataset.
DataSet::internalAddRecord()
DataSet::internalCancel()
To be overriden to perform a cancel() operation
DataSet::internalClose()
Override this method to perform the closing of the dataset
DataSet::internalDelete()
To be overriden to perform a delete() operation
DataSet::internalEdit()
To be overriden to perform a edit() operation
DataSet::internalFirst()
To be overriden to perform a first() operation
DataSet::internalHandleException()
Override this method to handle exceptions
DataSet::internalInitFieldDefs()
Override this method to init field definitions. Not used.
DataSet::internalInitRecord()
DataSet::internalInsert()
To be overriden to perform a insert() operation
DataSet::internalLast()
To be overriden to perform a last() operation
DataSet::internalOpen()
Override this method to perform the opening of the dataset
DataSet::internalPost()
To be overriden to perform a post() operation
DataSet::internalRefresh()
To be overriden to perform a refresh() operation
DataSet::isCursorOpen()
Override this method to return if the cursor is open or not
DataSet::last()
Moves to the last record in the dataset.
DataSet::loaded()
DataSet::moveBy()
Moves to another record relative to the active record in the dataset.
DataSet::next()
Moves to the next record in the dataset.
DataSet::open()
Opens the dataset.
DataSet::openCursor()
Opens the cursor for the dataset
DataSet::OpenCursorComplete()
Finishes the open cursor operation
DataSet::post()
Implements a virtual method to write a modified record to the database or change log.
DataSet::prior()
Moves to the previous record in the dataset.
DataSet::readActive()
Specifies whether or not a dataset is open.
DataSet::readBOF()
Indicates whether the first record in the dataset is active.
DataSet::readCanModify()
Indicates whether an application can insert, edit, and delete data in a table.
DataSet::readDataSetField()
Indicates the persistent DataSetField object that owns a nested dataset.
DataSet::readEOF()
Indicates whether a dataset is positioned at the last record.
DataSet::readFieldCount()
Indicates the number of field components associated with the dataset.
DataSet::readFields()
This property returns an array with the field names and values
DataSet::readFilter()
Specifies the text of the current filter for a dataset.
DataSet::readMasterFields()
Specifies one or more fields in a master table to link with corresponding fields in this table in order to establish a master-detail relationship between the tables.
DataSet::readMasterSource()
Specifies the name of the data source for a dataset to use as a master table in establishing a detail-master relationship between this table and another one.
DataSet::readModified()
Indicates whether the active record is modified.
DataSet::readOnAfterCancel()
Occurs after an application completes a request to cancel modifications to the active record.
DataSet::readOnAfterClose()
Occurs after an application closes a dataset.
DataSet::readOnAfterDelete()
Occurs after an application deletes a record.
DataSet::readOnAfterEdit()
Occurs after an application starts editing a record.
DataSet::readOnAfterInsert()
Occurs after an application inserts a new record.
DataSet::readOnAfterOpen()
Occurs after an application completes opening a dataset and before any data access occurs.
DataSet::readOnAfterPost()
Occurs after an application writes the active record to the database or change log and returns to browse state.
DataSet::readOnBeforeCancel()
Occurs before an application executes a request to cancel changes to the active record.
DataSet::readOnBeforeClose()
Occurs immediately before the dataset closes.
DataSet::readOnBeforeDelete()
Occurs before an application attempts to delete the active record.
DataSet::readOnBeforeEdit()
Occurs before an application enters edit mode for the active record.
DataSet::readOnBeforeInsert()
Occurs before an application enters insert mode.
DataSet::readOnBeforeOpen()
Occurs before an application executes a request to open a dataset.
DataSet::readOnBeforePost()
Occurs before an application posts changes for the active record to the database or change log.
DataSet::readOnCalcFields()
Occurs when an application recalculates calculated fields.
DataSet::readOnDeleteError()
Not used, reserved for future use
DataSet::readOnFilterRecord()
Not used, reserved for future use
DataSet::readOnNewRecord()
Not used, reserved for future use
DataSet::readOnPostError()
Not used, reserved for future use
DataSet::readRecKey()
Specifies the record key for this dataset
DataSet::readRecNo()
Indicates the current record in the dataset.
DataSet::readRecordCount()
Indicates the total number of records associated with the dataset.
DataSet::readState()
Indicates the current operating mode of the dataset.
DataSet::refresh()
Re-fetches data from the database to update a dataset’s view of data.
DataSet::serialize()
DataSet::setLimitCount()
DataSet::setLimitStart()
DataSet::unserialize()
DataSet::updateRecord()
Ensures that data-aware controls and detail datasets reflect record updates.
DataSet::writeActive()
DataSet::writeCanModify()
DataSet::writeDataSetField()
DataSet::writeFilter()
DataSet::writeMasterFields()
DataSet::writeMasterSource()
DataSet::writeModified()
DataSet::writeOnAfterCancel()
DataSet::writeOnAfterClose()
DataSet::writeOnAfterDelete()
DataSet::writeOnAfterEdit()
DataSet::writeOnAfterInsert()
DataSet::writeOnAfterOpen()
DataSet::writeOnAfterPost()
DataSet::writeOnBeforeCancel()
DataSet::writeOnBeforeClose()
DataSet::writeOnBeforeDelete()
DataSet::writeOnBeforeEdit()
DataSet::writeOnBeforeInsert()
DataSet::writeOnBeforeOpen()
DataSet::writeOnBeforePost()
DataSet::writeOnCalcFields()
DataSet::writeOnDeleteError()
DataSet::writeOnFilterRecord()
DataSet::writeOnNewRecord()
DataSet::writeOnPostError()
DataSet::writeRecKey()
DataSet::writeRecNo()
DataSet::writeState()

Class: Component

Component::__construct()
Component constructor
Component::ajaxCall()
Dumps the javascript code to make an ajax call to the server.
Component::callEvent()
Calls a server event.
Component::defaultName()
Component::defaultTag()
Component::dumpChildrenFormItems()
This method is called by the page just after dumping the starting form tag.
Component::dumpChildrenHeaderCode()
Dumps the header code for all the children
Component::dumpChildrenJavascript()
Dumps the javascript code for all the children
Component::dumpFormItems()
Dumps code just after the form tag, useful to dump hidden fields for state retrieving for non visible components
Component::dumpHeaderCode()
Dumps header code required
Component::dumpHiddenKeyFields()
Dumps hidden field values for the key record
Component::dumpJavascript()
Dumps the javascript code needed by this component
Component::dumpJSEvent()
Dumps javascript code for an event
Component::fixupProperty()
Resolves the right reference to an object property
Component::generateAjaxEvent()
Returns the javascript code to generate an ajax call.
Component::getName()
Specifies the name for the component. The name is used as an identifier and should be unique.
Component::getTag()
A versatile property of every Component that can be used in any way you want
Component::hasValidDataField()
Returns true if a valid data field is attached to the component
Component::init()
Initializes a component
Component::insertComponent()
Inserts a component into the component's collection
Component::loaded()
Initializes the component after the form file has been read into memory.
Component::loadedChildren()
Calls childrens loaded
Component::loadResource()
Loads this component from a string
Component::preinit()
Method called before init()
Component::readAccessibility()
Provides accessibility info to the embedded RPC engine.
Component::readComponentCount()
Indicates the number of components owned by the component.
Component::readComponents()
Lists all the components owned by this component.
Component::readControlState()
A flag to know the state of the control, csLoading, csDesigning
Component::readDataFieldValue()
This property returns the value of the datafield if any.
Component::readFromResource()
Reads a component from a resource file
Component::readNamePath()
Specifies the path to uniquely identify a component, qualified by the owner when required.
Component::readOwner()
Indicates the component that is responsible for streaming and freeing this component.
Component::removeComponent()
Removes a component from the component's collection
Component::serializeChildren()
Serializes all children
Component::setName()
Component::setTag()
Component::unserializeChildren()
Unserializes all children by calling unserialize for all the components
Component::updateDataField()
Updates the field on the dataset attached, if any
Component::writeControlState()

Class: Persistent

Persistent::allowserialize()
This method provides an opportunity for the component developer to prevent the serialization/unserialization of a property.
Persistent::assign()
Assigns the source properties to this object.
Persistent::assignError()
Raises an assignation error.
Persistent::assignTo()
Assigns this object to another object.
Persistent::inSession()
This method determines if this object exists in the current session.
Persistent::readNamePath()
Used to serialize/unserialize. It returns the full path to identify this component.
Persistent::readOwner()
Owner of the component.
Persistent::serialize()
Stores this object into the session.
Persistent::unserialize()
This method uses PHP reflection to iterate through published properties (the ones starting with get) and retrieve the properties stored by a previous serialize() call.

Class: Object

Object::__construct()
Constructs an object and initializes its data before the object is first used.
Object::className()
Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument).
Object::classNameIs()
Determines whether an object is of a specific type.
Object::classParent()
Returns the type of the immediate ancestor of a class.
Object::inheritsFrom()
Determines the relationship of two object types.
Object::methodExists()
Check if a method exists declared on this object instance.
Object::readProperty()
Reads a property from the streams
Object::__get()
To virtualize properties
Object::__set()
To virtualize properties

Class Details

[line 459]
DBDataSet encapsulates database connectivity for descendant dataset objects.

DBDataSet defines database-related connectivity properties and methods for a dataset. Applications never use DBDataSet objects directly. Instead they use the descendants of DBDataSet, such as Query, StoredProc, and Table, which inherit its database-related properties and methods.

Developers who create custom dataset components may want to derive them from DBDataSet to inherit to the database-specific properties of DBDataSet in addition to all the functionality of DataSet. In this case, developers should examine the source code to study the protected methods of DBDataSet that are not documented for this object.




[ Top ]


Class Variables

$_database = null

[line 462]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_keyfields = array()

[line 556]



Tags:

access:  public

Type:   mixed


[ Top ]

$_params = array()

[line 463]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_rs = null

[line 461]



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


method CheckDatabase [line 551]

void CheckDatabase( )

Checks if the assigned database is an object

This method checks for the database property to be an object, if not, raises a DatabaseError exception.




[ Top ]

method defaultDatabase [line 472]

void defaultDatabase( )



[ Top ]

method fieldget [line 635]

mixed fieldget( string $fieldname)

Returns the value of a field on the dataset

This method returns the value of the field specified in $fieldname, if not found, an EPropertyNotFound exception is raised




Parameters:

string   $fieldname   Name of the field to get

[ Top ]

method fieldset [line 673]

mixed fieldset( string $fieldname, mixed $value)

Sets the value of a field on the dataset

This method sets the value of the field specified in $fieldname, to the value specified in $value. If not found, an EPropertyNotFound exception is raised




Parameters:

string   $fieldname   Name of the field to set
mixed   $value   Value for the field

[ Top ]

method InternalClose [line 558]

void InternalClose( )



[ Top ]

method InternalFirst [line 598]

void InternalFirst( )



[ Top ]

method InternalLast [line 612]

void InternalLast( )



[ Top ]

method InternalOpen [line 563]

void InternalOpen( )



[ Top ]

method loaded [line 474]

void loaded( )



Overrides DataSet::loaded() (parent method not documented)

[ Top ]

method MoveBy [line 523]

void MoveBy( $distance)



Parameters:

   $distance  

[ Top ]

method readDatabase [line 470]

CustomConnection readDatabase( )

Specifies the database object to be used to connect to the server



[ Top ]

method readEOF [line 540]

boolean readEOF( )

If true, the pointer is at the end of the dataset



Overrides DataSet::readEOF() (Indicates whether a dataset is positioned at the last record.)

[ Top ]

method readFieldCount [line 500]

integer readFieldCount( )

Number of fields on the current record



Overrides DataSet::readFieldCount() (Indicates the number of field components associated with the dataset.)

[ Top ]

method readFields [line 485]

array readFields( )

Field array (name=>value) of the current record



Overrides DataSet::readFields() (This property returns an array with the field names and values)

[ Top ]

method readRecordCount [line 514]

integer readRecordCount( )

Number of records in the dataset



Overrides DataSet::readRecordCount() (Indicates the total number of records associated with the dataset.)

[ Top ]

method writeDatabase [line 471]

void writeDatabase( $value)



Parameters:

   $value  

[ Top ]

method __get [line 700]

mixed __get( string $nm)

Overriden to allow get field values as properties



Overrides Object::__get() (To virtualize properties)

Parameters:

string   $nm   Name of the property/field to get

[ Top ]

method __set [line 720]

void __set( string $nm, mixed $val)

Overriden to allow get field values as properties



Overrides Object::__set() (To virtualize properties)

Parameters:

string   $nm   Name of the property/field to set
mixed   $val   Value to set this property/field

[ Top ]


Documentation generated on Sat, 13 Jun 2009 10:51:28 -0700 by phpDocumentor 1.4.1