Public Member Functions | Protected Member Functions | Protected Attributes

BizDataObj_Lite Class Reference

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

Public Member Functions

 getSessionVars ($sessionContext)
 setSessionVars ($sessionContext)
 getErrorMessage ()
 getErrorFields ()
 getField ($fieldName)
 getProperty ($propertyName)
 getFieldNameByColumn ($column)
 getFieldValue ($fieldName)
 setActiveRecord ($currentRecord)
 getActiveRecord ()
 getRecordId ()
 setActiveRecordId ($recordId)
 fetch ()
 directFetch ($searchRule="", $count=-1, $offset=0, $sortRule="")
 fetchById ($id)
 fetchByName ($nameVal)
 fetchOne ($searchRule, $sortRule="")
 fetchRecords ($searchRule, &$resultRecords, $count=-1, $offset=0, $clearSearchRule=true, $noAssociation=false)
 find ()
 count ()
 validateInput ()
 newRecord ()
 insertRecord ($recArr)
 updateRecord ($recArr, $oldRec=null)
 deleteRecord ($recArr)

Protected Member Functions

 getSQLHelper ()
 _run_search ($limit=null)
 _fetch_record (&$resultSet)

Protected Attributes

 $m_RecordId = null
 $m_CurrentRecord = null
 $m_ErrorMessage = ""
 $m_ErrorFields = array()
 $_fetch4countQuery = null

Detailed Description

Definition at line 32 of file BizDataObj_Lite.php.


Member Function Documentation

_fetch_record ( &$  resultSet ) [protected]

Get record from result setand move the cursor to next row

Returns:
array record array

Definition at line 555 of file BizDataObj_Lite.php.

Here is the caller graph for this function:

_run_search ( limit = null ) [protected]

Run query with current search rule and returns PDO statement

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

Definition at line 433 of file BizDataObj_Lite.php.

Here is the call graph for this function:

Here is the caller graph for this function:

count (  )

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

Returns:
int number of records

Reimplemented from BizDataObj_Abstract.

Definition at line 415 of file BizDataObj_Lite.php.

Here is the call graph for this function:

Here is the caller graph for this function:

deleteRecord ( recArr )

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 from BizDataObj_Abstract.

Reimplemented in BizDataObj.

Definition at line 623 of file BizDataObj_Lite.php.

directFetch ( searchRule = "",
count = -1,
offset = 0,
sortRule = "" 
)

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

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

Definition at line 274 of file BizDataObj_Lite.php.

Here is the call graph for this function:

Here is the caller graph for this function:

fetch (  )

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

Returns:
array array of records

Reimplemented from BizDataObj_Abstract.

Definition at line 247 of file BizDataObj_Lite.php.

Here is the call graph for this function:

fetchById ( id )

Fetch record by Id

Returns:
array record array

Definition at line 320 of file BizDataObj_Lite.php.

fetchRecords ( searchRule,
&$  resultRecords,
count = -1,
offset = 0,
clearSearchRule = true,
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:
$searchRulesearch rule applied on the query
$resultRecordreturned result record array
$recNumnumber of records to be returned. if -1, all query results returned
$clearSearchRuleindicates if search rule need to be cleared before query
$noAssociationindicates if current association condition is not used in query
Returns:
boolean - if return false, the caller can call GetErrorMessage to get the error.

Definition at line 353 of file BizDataObj_Lite.php.

Here is the call graph for this function:

find (  )

Do the search query and return results set as PDOStatement

Returns:
PDOStatement PDO statement object

Reimplemented from BizDataObj_Abstract.

Definition at line 394 of file BizDataObj_Lite.php.

Here is the call graph for this function:

getActiveRecord (  )

Get the active record

Todo:
throw BDOException
Returns:
array - record array

Definition at line 204 of file BizDataObj_Lite.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getErrorFields (  )

Get error fields

Returns:
array

Definition at line 119 of file BizDataObj_Lite.php.

getErrorMessage (  )

Get the error message caused by data action

Returns:
string the error message string

Definition at line 109 of file BizDataObj_Lite.php.

getField ( fieldName )

Get the BizField object

Parameters:
string$fieldNamefield name
Returns:
BizField BizField object

Definition at line 130 of file BizDataObj_Lite.php.

Here is the caller graph for this function:

getFieldNameByColumn ( column )

Get field name by column

Parameters:
string$columncolumn name
Returns:
BizField BizField object

Definition at line 167 of file BizDataObj_Lite.php.

getFieldValue ( fieldName )

Get the BizField value

Parameters:
string$fieldNamefield name
Returns:
mixed BizField value

Definition at line 180 of file BizDataObj_Lite.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getProperty ( propertyName )

Get object property

Parameters:
string$propertyName
Returns:
BizField|string|mixed

Reimplemented from BizDataObj_Abstract.

Definition at line 141 of file BizDataObj_Lite.php.

Here is the call graph for this function:

getSessionVars ( sessionContext )

Get session variables data of this object

Parameters:
SessionContext$sessionContext
Returns:
void

Reimplemented from BizDataObj_Abstract.

Definition at line 70 of file BizDataObj_Lite.php.

getSQLHelper (  ) [protected]

Get SQL helper

Returns:
BizDataObj_SQLHelper

Definition at line 404 of file BizDataObj_Lite.php.

Here is the call graph for this function:

Here is the caller graph for this function:

insertRecord ( recArr )

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 from BizDataObj_Abstract.

Reimplemented in BizDataObj.

Definition at line 600 of file BizDataObj_Lite.php.

newRecord (  )

Create an empty new record

Returns:
array - empty record array with default values

Reimplemented from BizDataObj_Abstract.

Reimplemented in BizDataObj.

Definition at line 589 of file BizDataObj_Lite.php.

setActiveRecord ( currentRecord )

Set the current working record values

Parameters:
array$currentRecordrecord array
Returns:
void

Definition at line 192 of file BizDataObj_Lite.php.

setActiveRecordId ( recordId )

Set the active record according to the record id

Parameters:
mixed$recordIdrecord id
Returns:
void

Definition at line 233 of file BizDataObj_Lite.php.

setSessionVars ( sessionContext )

Save Session variables/data of this object

Parameters:
SessionContext$sessionContext
Returns:
void

Reimplemented from BizDataObj_Abstract.

Definition at line 91 of file BizDataObj_Lite.php.

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

Reimplemented from BizDataObj_Abstract.

Reimplemented in BizDataObj.

Definition at line 612 of file BizDataObj_Lite.php.

validateInput (  )

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

Returns:
boolean

Reimplemented in BizDataObj.

Definition at line 579 of file BizDataObj_Lite.php.


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