phpDocumentor openbiz.bin.data
[ class tree: openbiz.bin.data ] [ index: openbiz.bin.data ] [ all elements ]

Class: BizDataObj_Lite

Source Location: /data/BizDataObj_Lite.php

Class BizDataObj_Lite

Direct descendents
Child Class Description
BizDataObj BizDataObj class is the base class of all data object classes

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From BizDataObj_Abstract

BizDataObj_Abstract::$m_AccessRule
BizDataObj_Abstract::$m_BaseOtherSQLRule
BizDataObj_Abstract::$m_BaseSearchRule
BizDataObj_Abstract::$m_BaseSortRule
BizDataObj_Abstract::$m_BizRecord
BizDataObj_Abstract::$m_CacheLifeTime
BizDataObj_Abstract::$m_Database
BizDataObj_Abstract::$m_DeleteCondition
BizDataObj_Abstract::$m_IdGeneration
BizDataObj_Abstract::$m_InheritFrom
BizDataObj_Abstract::$m_Limit
BizDataObj_Abstract::$m_MainTable
BizDataObj_Abstract::$m_MessageFile
BizDataObj_Abstract::$m_Messages
BizDataObj_Abstract::$m_ObjReferences
BizDataObj_Abstract::$m_OtherSQLRule
BizDataObj_Abstract::$m_Parameters
BizDataObj_Abstract::$m_SearchRule
BizDataObj_Abstract::$m_SortRule
BizDataObj_Abstract::$m_Stateless
BizDataObj_Abstract::$m_TableJoins
BizDataObj_Abstract::$m_Uniqueness
BizDataObj_Abstract::$m_UpdateCondition

Inherited From MetaObject

MetaObject::$m_Access
MetaObject::$m_Class
MetaObject::$m_Description
MetaObject::$m_Name
MetaObject::$m_Package

Inherited From BizDataObj_Abstract

BizDataObj_Abstract::__construct()
Initialize BizDataObj with xml array
BizDataObj_Abstract::ClearAllRules()
Reset all rules (search, sort, other SQL rule)
BizDataObj_Abstract::ClearOtherSQLRule()
Clear other SQL rule.
BizDataObj_Abstract::ClearSearchRule()
Clear search rule.
BizDataObj_Abstract::ClearSortRule()
Clear sort rule.
BizDataObj_Abstract::Count()
Count the number of record according to the search results set before.
BizDataObj_Abstract::DeleteRecord()
Delete current record or delete the given input record
BizDataObj_Abstract::DirectFetch()
Fetches SQL result rows as a sequential array without using query rules set before.
BizDataObj_Abstract::Fetch()
Fetches SQL result rows as a sequential array according the query rules set before.
BizDataObj_Abstract::Find()
Do the search query and return results set as PDOStatement
BizDataObj_Abstract::GetAssociation()
Get the Association
BizDataObj_Abstract::GetDBConnection()
Get database connection
BizDataObj_Abstract::GetMessage()
Get Message
BizDataObj_Abstract::GetParameter()
Get obejct parameter value
BizDataObj_Abstract::GetProperty()
Get the property of the object. Used in expression language
BizDataObj_Abstract::GetRefObject()
Get the object instance defined in the object reference
BizDataObj_Abstract::GetSessionVars()
Get session variables
BizDataObj_Abstract::InheritParentObj()
Inherit from parent object. Name, Package, Class cannot be inherited
BizDataObj_Abstract::InsertRecord()
Insert record using given input record array
BizDataObj_Abstract::NewRecord()
Create an new (empty) record
BizDataObj_Abstract::ReadMetadata()
Read Metadata from xml array
BizDataObj_Abstract::ResetRules()
Reset rules
BizDataObj_Abstract::SetAssociation()
Set the association of the object
BizDataObj_Abstract::SetLimit()
Set limit of the query.
BizDataObj_Abstract::SetOtherSQLRule()
Set other SQL rule, append extra SQL statment in sql. i.e. GROUP BY [fieldName]
BizDataObj_Abstract::SetQueryParam()
Set query parameter for parameter binding in the query
BizDataObj_Abstract::SetSearchRule()
Set search rule as text in sql where clause. i.e. [fieldName] opr Value
BizDataObj_Abstract::SetSessionVars()
Set session variables
BizDataObj_Abstract::SetSortRule()
Set search rule as text in sql order by clause. i.e. [fieldName] DESC|ASC
BizDataObj_Abstract::UpdateRecord()
Update record using given input record array

Inherited From MetaObject

MetaObject::__construct()
MetaObject::AllowAccess()
MetaObject::GetProperty()
Get property
MetaObject::PrefixPackage()
Set Prefix Package
MetaObject::ReadMetaCollection()
Read metadata collection
MetaObject::ReadMetaData()
Read meta data

[ Top ]
Property Summary
mixed   $m_CurrentRecord  
mixed   $m_ErrorFields  
mixed   $m_ErrorMessage  
mixed   $m_RecordId  

[ Top ]
Method Summary
int   Count()   Count the number of record according to the search results set before.
boolean   DeleteRecord()   Delete current record or delete the given input record
array   DirectFetch()   Fetches SQL result rows as a sequential array without using query rules set before.
array   Fetch()   Fetches SQL result rows as a sequential array according the query rules set before.
array   FetchById()   Fetch record by Id
boolean   FetchRecords()   Run query and get the query results without affecting DataObject internal state by default it gets number of records starting from the first row.
PDOStatement   Find()   Do the search query and return results set as PDOStatement
array   GetActiveRecord()   Get the active record
   GetErrorFields()   Get error fields
string   GetErrorMessage()   Get the error message caused by data action
BizField   GetField()   Get the BizField object
BizField   GetFieldNameByColumn()   Get field name by column
string   GetFieldValue()   Get the BizField value
void   GetSessionVars()   Get session variables data of this object
BizDataObj_SQLHelper   GetSQLHelper()   Get SQL helper
boolean   InsertRecord()   Insert record using given input record array
array   NewRecord()   Create an empty new record
void   SetActiveRecord()   Set the current working record values
void   SetActiveRecordId()   Set the active record according to the record id
void   SetSessionVars()   Save Session variables/data of this object
boolean   UpdateRecord()   Update record using given input record array
boolean   ValidateInput()   Validate user input data and trigger error message and adjust BizField if invalid.
array   _fetch_record()   Get record from result setand move the cursor to next row
PDOStatement   _run_search()   Run query with current search rule and returns PDO statement

[ Top ]
Properties
mixed   $m_CurrentRecord = null [line 34]
API Tags:
Access:  protected


[ Top ]
mixed   $m_ErrorFields = array() [line 36]
API Tags:
Access:  protected


[ Top ]
mixed   $m_ErrorMessage = "" [line 35]
API Tags:
Access:  protected


[ Top ]
mixed   $m_RecordId = null [line 33]
API Tags:
Access:  protected


[ Top ]
Methods
Count  [line 336]

  int Count( )

Count the number of record according to the search results set before.

It ignores limit setting


API Tags:
Return:  number of records
Access:  public


Redefinition of:
BizDataObj_Abstract::Count()
Count the number of record according to the search results set before.

[ Top ]
DeleteRecord  [line 531]

  boolean DeleteRecord( array $recArr  )

Delete current record or delete the given input record

Parameters:
array   $recArr:  - associated array whose keys are field names of this BizDataObj

API Tags:
Return:  - if return false, the caller can call GetErrorMessage to get the error.
Access:  public


Redefinition of:
BizDataObj_Abstract::DeleteRecord()
Delete current record or delete the given input record

Redefined in descendants as:

[ Top ]
DirectFetch  [line 214]

  array DirectFetch( [string $searchRule = ""], [int $count = -1], [int $offset = 0]  )

Fetches SQL result rows as a sequential array without using query rules set before.

Parameters:
string   $searchRule:  the search rule string
int   $count:  number of records to return
int   $offset:  the starting point of the return records

API Tags:
Return:  array of records
Access:  public


Redefinition of:
BizDataObj_Abstract::DirectFetch()
Fetches SQL result rows as a sequential array without using query rules set before.

[ Top ]
Fetch  [line 189]

  array Fetch( )

Fetches SQL result rows as a sequential array according the query rules set before.


API Tags:
Return:  array of records
Access:  public


Redefinition of:
BizDataObj_Abstract::Fetch()
Fetches SQL result rows as a sequential array according the query rules set before.

[ Top ]
FetchById  [line 252]

  array FetchById( mixed $id  )

Fetch record by Id


API Tags:
Return:  record array
Access:  public


[ Top ]
FetchRecords  [line 274]

  boolean FetchRecords( $searchRule $searchRule, $resultRecord &$resultRecords, [$recNum $count = -1], [$clearSearchRule $offset = 0], [$noAssociation $clearSearchRule = true], [mixed $noAssociation = false]  )

Run query and get the query results without affecting DataObject internal state by default it gets number of records starting from the first row.

if pageNum > 0, it gets number of records starting from the first row of the page

Parameters:
$searchRule   $searchRule:  search rule applied on the query
$resultRecord   &$resultRecords:  returned result record array
$recNum   $count:  number of records to be returned. if -1, all query results returned
$clearSearchRule   $offset:  indicates if search rule need to be cleared before query
$noAssociation   $clearSearchRule:  indicates if current association condition is not used in query

API Tags:
Return:  - if return false, the caller can call GetErrorMessage to get the error.
Access:  public


[ Top ]
Find  [line 315]

  PDOStatement Find( )

Do the search query and return results set as PDOStatement


API Tags:
Return:  PDO statement object
Access:  public


Redefinition of:
BizDataObj_Abstract::Find()
Do the search query and return results set as PDOStatement

[ Top ]
GetActiveRecord  [line 150]

  array GetActiveRecord( )

Get the active record


API Tags:
Return:  - record array
Access:  public


[ Top ]
GetErrorFields  [line 91]

  GetErrorFields( )

Get error fields


API Tags:
Access:  public


[ Top ]
GetErrorMessage  [line 81]

  string GetErrorMessage( )

Get the error message caused by data action


API Tags:
Return:  the error message string
Access:  public


[ Top ]
GetField  [line 102]

  BizField GetField( string $fieldName  )

Get the BizField object

Parameters:
string   $fieldName:  field name

API Tags:
Return:  BizField object
Access:  public


[ Top ]
GetFieldNameByColumn  [line 113]

  BizField GetFieldNameByColumn( string $column  )

Get field name by column

Parameters:
string   $column:  column name

API Tags:
Return:  BizField object
Access:  public


[ Top ]
GetFieldValue  [line 126]

  string GetFieldValue( string $fieldName  )

Get the BizField value

Parameters:
string   $fieldName:  field name

API Tags:
Return:  BizField value
Access:  public


[ Top ]
GetSessionVars  [line 44]

  void GetSessionVars( SessionContext $sessCtxt  )

Get session variables data of this object

Parameters:
SessionContext   $sessCtxt: 

API Tags:
Access:  public


Redefinition of:
BizDataObj_Abstract::GetSessionVars()
Get session variables

[ Top ]
GetSQLHelper  [line 325]

  BizDataObj_SQLHelper GetSQLHelper( )

Get SQL helper


API Tags:
Access:  protected


[ Top ]
InsertRecord  [line 512]

  boolean InsertRecord( array $recArr  )

Insert record using given input record array

Parameters:
array   $recArr:  - associated array whose keys are field names of this BizDataObj

API Tags:
Return:  - if return false, the caller can call GetErrorMessage to get the error.
Access:  public


Redefinition of:
BizDataObj_Abstract::InsertRecord()
Insert record using given input record array

Redefined in descendants as:

[ Top ]
NewRecord  [line 503]

  array NewRecord( )

Create an empty new record


API Tags:
Return:  - empty record array with default values
Access:  public


Redefinition of:
BizDataObj_Abstract::NewRecord()
Create an new (empty) record

Redefined in descendants as:

[ Top ]
SetActiveRecord  [line 138]

  void SetActiveRecord( array $currentRecord  )

Set the current working record values

Parameters:
array   $currentRecord:  record array

API Tags:
Access:  public


[ Top ]
SetActiveRecordId  [line 175]

  void SetActiveRecordId( $recordId $recordId  )

Set the active record according to the record id

Parameters:
$recordId   $recordId:  record id

API Tags:
Access:  public


[ Top ]
SetSessionVars  [line 65]

  void SetSessionVars( SessionContext $sessCtxt  )

Save Session variables/data of this object

Parameters:
SessionContext   $sessCtxt: 

API Tags:
Access:  public


Redefinition of:
BizDataObj_Abstract::SetSessionVars()
Set session variables

[ Top ]
UpdateRecord  [line 522]

  boolean UpdateRecord( array $recArr, [array $oldRec = null]  )

Update record using given input record array

Parameters:
array   $recArr:  - associated array whose keys are field names of this BizDataObj
array   $oldRec:  - associated array who is the old record field name / value pairs

API Tags:
Return:  - if return false, the caller can call GetErrorMessage to get the error.
Access:  public


Redefinition of:
BizDataObj_Abstract::UpdateRecord()
Update record using given input record array

Redefined in descendants as:

[ Top ]
ValidateInput  [line 495]

  boolean ValidateInput( )

Validate user input data and trigger error message and adjust BizField if invalid.


API Tags:
Access:  public


Redefined in descendants as:

[ Top ]
_fetch_record  [line 474]

  array _fetch_record( mixed &$resultSet  )

Get record from result setand move the cursor to next row


API Tags:
Return:  record array
Access:  protected


[ Top ]
_run_search  [line 350]

  PDOStatement _run_search( [array $limit = null]  )

Run query with current search rule and returns PDO statement

Parameters:
array   $limit:  - if limit is not null, do the limit search

API Tags:
Access:  protected


[ Top ]

Documentation generated on Tue, 22 Dec 2009 03:02:34 -0800 by phpDocumentor 1.3.0RC3