Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes

BizDataObj_Abstract Class Reference

Inheritance diagram for BizDataObj_Abstract:
Inheritance graph
[legend]
Collaboration diagram for BizDataObj_Abstract:
Collaboration graph
[legend]

Public Member Functions

 __construct (&$xmlArr)
 getSessionVars ($sessionContext)
 setSessionVars ($sessCtxt)
 resetRules ()
 clearSearchRule ()
 clearSortRule ()
 clearOtherSQLRule ()
 clearAllRules ()
 setSearchRule ($rule, $overWrite=false)
 setQueryParam ($queryStr, $paramValues)
 setSortRule ($rule)
 setOtherSQLRule ($rule)
 setLimit ($count, $offset=0)
 getDBConnection ($type='default')
 getProperty ($propertyName)
 getParameter ($paramName)
 getRefObject ($objName)
 getAssociation ()
 newRecord ()
 insertRecord ($recArr)
 updateRecord ($recArr, $oldRec=null)
 deleteRecord ($recArr)
 fetch ()
 directFetch ($searchRule="", $count=-1, $offset=0)
 find ()
 count ()

Data Fields

 $m_Database
 $m_BaseSearchRule = null
 $m_BaseSortRule = null
 $m_BaseOtherSQLRule = null
 $m_MainTable = ""
 $m_BizRecord = null
 $m_InheritFrom
 $m_AccessRule = null
 $m_UpdateCondition = null
 $m_DeleteCondition = null
 $m_IdGeneration = null
 $m_ObjReferences = null
 $m_TableJoins = null
 $m_Parameters = null
 $m_Stateless = null
 $m_Uniqueness = null
 $m_SearchRule = null
 $m_SortRule = null
 $m_OtherSQLRule = null
 $m_CacheLifeTime = null
 $m_MessageFile = null
 $m_DataPermControl

Protected Member Functions

 readMetadata (&$xmlArr)
 inheritParentObj ()
 getMessage ($msgid, $params=array())
 setAssociation ($objRef, $asscObj)

Protected Attributes

 $m_Limit = array()
 $m_Messages

Detailed Description

Definition at line 32 of file BizDataObj_Abstract.php.


Constructor & Destructor Documentation

__construct ( &$  xmlArr )

Initialize BizDataObj_Abstract with xml array

Parameters:
array$xmlArr
Returns:
void

Reimplemented from MetaObject.

Reimplemented in BizDataObj.

Definition at line 192 of file BizDataObj_Abstract.php.

Here is the call graph for this function:


Member Function Documentation

clearAllRules (  )

Reset all rules (search, sort, other SQL rule)

Returns:
void

Definition at line 369 of file BizDataObj_Abstract.php.

clearOtherSQLRule (  )

Clear other SQL rule. Reset the other SQL rule to default other SQL rule set in metadata

Returns:
void

Definition at line 357 of file BizDataObj_Abstract.php.

clearSearchRule (  )

Clear search rule. Reset the search rule to default search rule set in metadata

Returns:
void

Definition at line 332 of file BizDataObj_Abstract.php.

Here is the caller graph for this function:

clearSortRule (  )

Clear sort rule. Reset the sort rule to default sort rule set in metadata

Returns:
void

Definition at line 344 of file BizDataObj_Abstract.php.

Here is the caller graph for this function:

count (  ) [abstract]

Count the number of record according to the search results set before. it ignores limit setting

Returns:
int number of records

Reimplemented in BizDataObj_Lite.

deleteRecord ( recArr ) [abstract]

Delete current record or delete the given input record

Parameters:
array$recArr- associated array whose keys are field names of this BizDataObj
Returns:
boolean - if return false, the caller can call GetErrorMessage to get the error.

Reimplemented in BizDataObj, and BizDataObj_Lite.

directFetch ( searchRule = "",
count = -1,
offset = 0 
) [abstract]

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

   // fetch all record with firstname starting with Mike
   $do->directFetch("[FirstName] LIKE 'Mike%'");
   // fetch first 10 records with firstname starting with Mike
   $do->directFetch("[FirstName] LIKE 'Mike%'", 10);
   // fetch 20th-30th records with firstname starting with Mike
   $do->directFetch("[FirstName] LIKE 'Mike%'", 10, 20);
 
Parameters:
string$searchRulethe search rule string
int$countnumber of records to return
int$offsetthe starting point of the return records
Returns:
array array of records
fetch (  ) [abstract]

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

   $do->resetRules();
   $do->setSearchRule($search_rule1);
   $do->setSearchRule($search_rule2);
   $do->setSortRule($sort_rule);
   $do->SetOtherRule($groupby);
   $total = $do->count();
   $do->setLimit($count, $offset=0);
   $recordSet = $do->fetch();
 
Returns:
array array of records

Reimplemented in BizDataObj_Lite.

find (  ) [abstract]

Do the search query and return results set as PDOStatement. Sample code:

   $do->resetRules();
   $do->setSearchRule($search_rule1);
   $do->setSearchRule($search_rule2);
   $do->setSortRule($sort_rule);
   $do->SetOtherRule($groupby);
   $total = $do->count();
   $do->setLimit($count, $offset=0);
   $resultSet = $do->find();
   $do->getDBConnection()->setFetchMode(PDO::FETCH_ASSOC);
   while ($record = $resultSet->fetch())
   {
       print_r($record);
   }
 
Returns:
PDOStatement PDO statement object

Reimplemented in BizDataObj_Lite.

getAssociation (  )

Get the Association (array)

Returns:
array array of association

Definition at line 555 of file BizDataObj_Abstract.php.

getDBConnection ( type = 'default' )

Get database connection

Returns:
Zend_Db_Adapter_Abstract

Definition at line 463 of file BizDataObj_Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getMessage ( msgid,
params = array() 
) [protected]

Get Message

Parameters:
<type>$msgid message Id
array$params
Returns:
string

Definition at line 288 of file BizDataObj_Abstract.php.

Here is the caller graph for this function:

getParameter ( paramName )

Get object parameter value

Parameters:
string$paramNamename of the parameter
Returns:
string parameter value

Definition at line 523 of file BizDataObj_Abstract.php.

getProperty ( propertyName )

Get the property of the object. Used in expression language

Parameters:
string$propertyNamename of the property
Returns:
BizField|string property value

Reimplemented from MetaObject.

Reimplemented in BizDataObj_Lite.

Definition at line 496 of file BizDataObj_Abstract.php.

getRefObject ( objName )

Get the object instance defined in the object reference

Parameters:
string$objNamethe object name list in the ObjectReference part
Returns:
BizDataObj object instance

Definition at line 534 of file BizDataObj_Abstract.php.

Here is the call graph for this function:

getSessionVars ( sessionContext )

Get session variables

Parameters:
SessionContext$sessionContext

Implements iSessionObject.

Reimplemented in BizDataObj_Lite.

Definition at line 301 of file BizDataObj_Abstract.php.

inheritParentObj (  ) [protected]

Inherit from parent object. Name, Package, Class cannot be inherited

Returns:
void

Definition at line 252 of file BizDataObj_Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

insertRecord ( recArr ) [abstract]

Insert record using given input record array

Parameters:
array$recArr- associated array whose keys are field names of this BizDataObj
Returns:
boolean - if return false, the caller can call GetErrorMessage to get the error.

Reimplemented in BizDataObj, and BizDataObj_Lite.

newRecord (  ) [abstract]

Create an new (empty) record

Returns:
array - empty record array with default values

Reimplemented in BizDataObj, and BizDataObj_Lite.

readMetadata ( &$  xmlArr ) [protected]

Read Metadata from xml array

Parameters:
array$xmlArr
Returns:
void

Reimplemented from MetaObject.

Definition at line 204 of file BizDataObj_Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

resetRules (  )

Reset rules

Returns:
void

Definition at line 318 of file BizDataObj_Abstract.php.

setAssociation ( objRef,
asscObj 
) [protected]

Set the association of the object

Parameters:
ObjReference$objRef
BizDataObj$asscObj
Returns:
void

Definition at line 567 of file BizDataObj_Abstract.php.

setLimit ( count,
offset = 0 
)

Set limit of the query.

Parameters:
int$countthe number of records to return
int$offsetthe starting position of the result records
Returns:
void

Definition at line 444 of file BizDataObj_Abstract.php.

setOtherSQLRule ( rule )

Set other SQL rule, append extra SQL statment in sql. i.e. GROUP BY [fieldName]

Parameters:
string$rulesearch rule with SQL format "GROUP BY [fieldName] HAVING ..."
Returns:
void

Definition at line 431 of file BizDataObj_Abstract.php.

setQueryParam ( queryStr,
paramValues 
)

Set query parameter for parameter binding in the query

Parameters:
string$queryStr
array$paramValues
Returns:
void

Definition at line 406 of file BizDataObj_Abstract.php.

Here is the call graph for this function:

setSearchRule ( rule,
overWrite = false 
)

Set search rule as text in sql where clause. i.e. [fieldName] opr Value

Parameters:
string$rulesearch rule has format "[fieldName] opr Value"
boolean$overWritespecify if this rule should overwrite any existing rule
Returns:
void

Definition at line 385 of file BizDataObj_Abstract.php.

Here is the caller graph for this function:

setSessionVars ( sessCtxt )

Set session variables

Parameters:
SessionContextsessCtxt
Returns:
void

Implements iSessionObject.

Reimplemented in BizDataObj_Lite.

Definition at line 310 of file BizDataObj_Abstract.php.

setSortRule ( rule )

Set search rule as text in sql order by clause. i.e. [fieldName] DESC|ASC

Parameters:
string$rulesort rule has format "[fieldName] DESC|ASC"
Returns:
void

Definition at line 419 of file BizDataObj_Abstract.php.

Here is the caller graph for this function:

updateRecord ( recArr,
oldRec = null 
) [abstract]

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
Returns:
boolean - if return false, the caller can call GetErrorMessage to get the error.

Reimplemented in BizDataObj, and BizDataObj_Lite.


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