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 |
Definition at line 32 of file BizDataObj_Abstract.php.
__construct | ( | &$ | xmlArr ) |
Initialize BizDataObj_Abstract with xml array
array | $xmlArr |
Reimplemented from MetaObject.
Reimplemented in BizDataObj.
Definition at line 192 of file BizDataObj_Abstract.php.
clearAllRules | ( | ) |
Reset all rules (search, sort, other SQL rule)
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
Definition at line 357 of file BizDataObj_Abstract.php.
clearSearchRule | ( | ) |
Clear search rule. Reset the search rule to default search rule set in metadata
Definition at line 332 of file BizDataObj_Abstract.php.
clearSortRule | ( | ) |
Clear sort rule. Reset the sort rule to default sort rule set in metadata
Definition at line 344 of file BizDataObj_Abstract.php.
count | ( | ) | [abstract] |
Count the number of record according to the search results set before. it ignores limit setting
Reimplemented in BizDataObj_Lite.
deleteRecord | ( | $ | recArr ) | [abstract] |
Delete current record or delete the given input record
array | $recArr | - associated array whose keys are field names of this BizDataObj |
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);
string | $searchRule | the search rule string |
int | $count | number of records to return |
int | $offset | the starting point of the return 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();
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); }
Reimplemented in BizDataObj_Lite.
getAssociation | ( | ) |
Get the Association (array)
Definition at line 555 of file BizDataObj_Abstract.php.
getDBConnection | ( | $ | type = 'default' ) |
Get database connection
Definition at line 463 of file BizDataObj_Abstract.php.
getMessage | ( | $ | msgid, |
$ | params = array() |
||
) | [protected] |
Get Message
<type> | $msgid message Id | |
array | $params |
Definition at line 288 of file BizDataObj_Abstract.php.
getParameter | ( | $ | paramName ) |
Get object parameter value
string | $paramName | name of the parameter |
Definition at line 523 of file BizDataObj_Abstract.php.
getProperty | ( | $ | propertyName ) |
Get the property of the object. Used in expression language
string | $propertyName | name of the property |
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
string | $objName | the object name list in the ObjectReference part |
Definition at line 534 of file BizDataObj_Abstract.php.
getSessionVars | ( | $ | sessionContext ) |
Get session variables
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
Definition at line 252 of file BizDataObj_Abstract.php.
insertRecord | ( | $ | recArr ) | [abstract] |
Insert record using given input record array
array | $recArr | - associated array whose keys are field names of this BizDataObj |
Reimplemented in BizDataObj, and BizDataObj_Lite.
newRecord | ( | ) | [abstract] |
Create an new (empty) record
Reimplemented in BizDataObj, and BizDataObj_Lite.
readMetadata | ( | &$ | xmlArr ) | [protected] |
Read Metadata from xml array
array | $xmlArr |
Reimplemented from MetaObject.
Definition at line 204 of file BizDataObj_Abstract.php.
resetRules | ( | ) |
setAssociation | ( | $ | objRef, |
$ | asscObj | ||
) | [protected] |
Set the association of the object
ObjReference | $objRef | |
BizDataObj | $asscObj |
Definition at line 567 of file BizDataObj_Abstract.php.
setLimit | ( | $ | count, |
$ | offset = 0 |
||
) |
Set limit of the query.
int | $count | the number of records to return |
int | $offset | the starting position of the result records |
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]
string | $rule | search rule with SQL format "GROUP BY [fieldName] HAVING ..." |
Definition at line 431 of file BizDataObj_Abstract.php.
setQueryParam | ( | $ | queryStr, |
$ | paramValues | ||
) |
Set query parameter for parameter binding in the query
string | $queryStr | |
array | $paramValues |
Definition at line 406 of file BizDataObj_Abstract.php.
setSearchRule | ( | $ | rule, |
$ | overWrite = false |
||
) |
Set search rule as text in sql where clause. i.e. [fieldName] opr Value
string | $rule | search rule has format "[fieldName] opr Value" |
boolean | $overWrite | specify if this rule should overwrite any existing rule |
Definition at line 385 of file BizDataObj_Abstract.php.
setSessionVars | ( | $ | sessCtxt ) |
Set session variables
SessionContext | sessCtxt |
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
string | $rule | sort rule has format "[fieldName] DESC|ASC" |
Definition at line 419 of file BizDataObj_Abstract.php.
updateRecord | ( | $ | recArr, |
$ | oldRec = null |
||
) | [abstract] |
Update record using given input record array
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 |
Reimplemented in BizDataObj, and BizDataObj_Lite.