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

Class: BizDataObj

Source Location: /data/BizDataObj.php

Class BizDataObj

Class Overview

BizDataObj class is the base class of all data object classes

Located in /data/BizDataObj.php [line 27]

MetaObject
   |
   --BizDataObj_Abstract
      |
      --BizDataObj_Lite
         |
         --BizDataObj
Author(s):
  • Rocky Swen
API Tags:
Access:  public

Information Tags:
Copyright:  Copyright (c) 2005-2009

Methods

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

Inherited From BizDataObj_Lite

BizDataObj_Lite::$m_CurrentRecord
BizDataObj_Lite::$m_ErrorFields
BizDataObj_Lite::$m_ErrorMessage
BizDataObj_Lite::$m_RecordId

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_Lite

BizDataObj_Lite::Count()
Count the number of record according to the search results set before.
BizDataObj_Lite::DeleteRecord()
Delete current record or delete the given input record
BizDataObj_Lite::DirectFetch()
Fetches SQL result rows as a sequential array without using query rules set before.
BizDataObj_Lite::Fetch()
Fetches SQL result rows as a sequential array according the query rules set before.
BizDataObj_Lite::FetchById()
Fetch record by Id
BizDataObj_Lite::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.
BizDataObj_Lite::Find()
Do the search query and return results set as PDOStatement
BizDataObj_Lite::GetActiveRecord()
Get the active record
BizDataObj_Lite::GetErrorFields()
Get error fields
BizDataObj_Lite::GetErrorMessage()
Get the error message caused by data action
BizDataObj_Lite::GetField()
Get the BizField object
BizDataObj_Lite::GetFieldNameByColumn()
Get field name by column
BizDataObj_Lite::GetFieldValue()
Get the BizField value
BizDataObj_Lite::GetSessionVars()
Get session variables data of this object
BizDataObj_Lite::GetSQLHelper()
Get SQL helper
BizDataObj_Lite::InsertRecord()
Insert record using given input record array
BizDataObj_Lite::NewRecord()
Create an empty new record
BizDataObj_Lite::SetActiveRecord()
Set the current working record values
BizDataObj_Lite::SetActiveRecordId()
Set the active record according to the record id
BizDataObj_Lite::SetSessionVars()
Save Session variables/data of this object
BizDataObj_Lite::UpdateRecord()
Update record using given input record array
BizDataObj_Lite::ValidateInput()
Validate user input data and trigger error message and adjust BizField if invalid.
BizDataObj_Lite::_fetch_record()
Get record from result setand move the cursor to next row
BizDataObj_Lite::_run_search()
Run query with current search rule and returns PDO statement

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 ]
Method Summary
BizDataObj   __construct()  
boolean   AddRecord()   Add a new record to current record set
boolean   CanDeleteRecord()   Check if the current record can be deleted
boolean   CanUpdateRecord()   Check if the current record can be updated
boolean   CascadeDelete()   Run cascade delete
void   CleanCache()  
boolean   DeleteRecord()   Delete current record or delete the given input record
mixed   GenerateId()   Generate Id according to the IdGeneration attribute
array   GetJoinFields()   Get all fields that belong to the same join of the input field
array   GetOnAuditFields()   Get auditable fields
boolean   InsertRecord()   Insert record using given input record array
boolean   JoinRecord()   Pick the joined object's current record to the current record
array   NewRecord()   Create an empty new record
boolean   RemoveRecord()   Remove a record from current record set of current association relationship
boolean   UpdateRecord()   Update record using given input record array
boolean   ValidateInput()   Validate user input data and trigger error message and adjust BizField if invalid.
boolean   ValidateUniqueness()   Validate uniqueness Uniqueness = "fld1,fld2;fld3,fld4;..."

[ Top ]
Methods
Constructor __construct  [line 29]

  BizDataObj __construct( mixed &$xmlArr  )



Redefinition of:
BizDataObj_Abstract::__construct()
Initialize BizDataObj with xml array

[ Top ]
AddRecord  [line 791]

  boolean AddRecord( array $recArr, boolean &$bPrtObjUpdated  )

Add a new record to current record set

Parameters:
array   $recArr: 
boolean   &$bPrtObjUpdated: 

API Tags:
Access:  public


[ Top ]
CanDeleteRecord  [line 152]

  boolean CanDeleteRecord( )

Check if the current record can be deleted


API Tags:
Access:  public


[ Top ]
CanUpdateRecord  [line 137]

  boolean CanUpdateRecord( )

Check if the current record can be updated


API Tags:
Access:  public


[ Top ]
CascadeDelete  [line 607]

  boolean CascadeDelete( [array $cascadeObjNames = null]  )

Run cascade delete

Parameters:
array   $cascadeObjNames:  names of the cascade objects

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


[ Top ]
CleanCache  [line 814]

  void CleanCache( )


API Tags:
Access:  protected


[ Top ]
DeleteRecord  [line 523]

  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_Lite::DeleteRecord()
Delete current record or delete the given input record

[ Top ]
GenerateId  [line 364]

  mixed GenerateId( [mixed $beforeInsert = true], [mixed $tableName = null], [mixed $idCloumnName = null]  )

Generate Id according to the IdGeneration attribute


API Tags:
Return:  long or string or false
Access:  protected


[ Top ]
GetJoinFields  [line 704]

  array GetJoinFields( BizDataObj $joinDataObj  )

Get all fields that belong to the same join of the input field

Parameters:
BizDataObj   $joinDataObj:  the join data object

API Tags:
Return:  joined fields array
Access:  public


[ Top ]
GetOnAuditFields  [line 665]

  array GetOnAuditFields( )

Get auditable fields


API Tags:
Return:  list of BizField objects who are auditable
Access:  public


[ Top ]
InsertRecord  [line 403]

  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_Lite::InsertRecord()
Insert record using given input record array

[ Top ]
JoinRecord  [line 746]

  boolean JoinRecord( BizDataObj $joinDataObj, [mixed $joinName = ""]  )

Pick the joined object's current record to the current record

Parameters:
BizDataObj   $joinDataObj: 

API Tags:
Access:  public


[ Top ]
NewRecord  [line 333]

  array NewRecord( )

Create an empty new record


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


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

[ Top ]
RemoveRecord  [line 803]

  boolean RemoveRecord( array $recArr, boolean &$bPrtObjUpdated  )

Remove a record from current record set of current association relationship

Parameters:
array   $recArr: 
boolean   &$bPrtObjUpdated: 

API Tags:
Access:  public


[ Top ]
UpdateRecord  [line 170]

  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_Lite::UpdateRecord()
Update record using given input record array

[ Top ]
ValidateInput  [line 40]

  boolean ValidateInput( )

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


API Tags:
Access:  public


Redefinition of:
BizDataObj_Lite::ValidateInput()
Validate user input data and trigger error message and adjust BizField if invalid.

[ Top ]
ValidateUniqueness  [line 88]

  boolean ValidateUniqueness( )

Validate uniqueness Uniqueness = "fld1,fld2;fld3,fld4;..."


API Tags:
Access:  protected


[ Top ]

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