Public Member Functions | Data Fields | Protected Attributes

BizRecord Class Reference

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

Public Member Functions

 __construct (&$xmlArr, $className, $parentObj=null)
 merge (&$anotherMIObj)
 getFieldByColumn ($column, $table=null)
 getEmptyRecordArr ()
 getKeyValue ($isUseOldValue=false)
 getKeyFields ()
 getKeySearchRule ($isUseOldValue=false, $isUseColumnName=false)
 setRecordArr ($recArr)
 setInputRecord (&$inputArr)
 saveOldRecord (&$inputArr)
 getRecordArr ($sqlArr=null)
 convertSqlArrToRecArr ($sqlArr)
 getJoinInputRecord ($join)
 getJoinSearchRule ($tableJoin, $isUseOldValue=false)
 getToSaveFields ($type)

Data Fields

 $m_InputFields

Protected Attributes

 $m_KeyFldColMap = array()
 $m_ColFldMap = array()
 $m_IgnoreInQuery = false

Detailed Description

Definition at line 24 of file BizRecord.php.


Constructor & Destructor Documentation

__construct ( &$  xmlArr,
className,
parentObj = null 
)

Initialize BizRecord with xml array

Parameters:
array$xmlArrarray data from xml file
string$classNamename of the class of the object
object$parentObjparent object
Returns:
void

Reimplemented from MetaIterator.

Definition at line 52 of file BizRecord.php.


Member Function Documentation

convertSqlArrToRecArr ( sqlArr )

Conver sql array to record array

Parameters:
array$sqlArrindexed-value pair array
Returns:
array field-value record array

Definition at line 295 of file BizRecord.php.

getEmptyRecordArr (  ) [final]

Get an empty record array. Called by BizDataObj::newRecord()

Returns:
array record array

Definition at line 125 of file BizRecord.php.

getFieldByColumn ( column,
table = null 
)

Get fielf by column name

Parameters:
string$columncolumn name
string$tabletable name
Returns:
BizField instant of BizField

Definition at line 112 of file BizRecord.php.

Here is the caller graph for this function:

getJoinInputRecord ( join )

Get join input record

Parameters:
<type>$join
Returns:
array

Definition at line 335 of file BizRecord.php.

getJoinSearchRule ( tableJoin,
isUseOldValue = false 
)

Get join search rule

NOTE: Added by Jixian on 2009-02-16 for implement onSaveDataObj

Parameters:
TableJoin$tableJoin
boolean$isUseOldValue
Returns:
string

Definition at line 367 of file BizRecord.php.

Here is the call graph for this function:

getKeyFields (  ) [final]

Get a list of fields (name) who are defined as keys columns

Returns:
array array of key fields

Definition at line 163 of file BizRecord.php.

Here is the caller graph for this function:

getKeySearchRule ( isUseOldValue = false,
isUseColumnName = false 
)

Get key search rule. The key search rule is used to find a single record by given key values

Parameters:
boolean$isUseOldValuetrue if old key value is used in the search rule
boolean$isUseColumnNametrue if column name is used in the search rule, false if [field] is used
Returns:
string search rule

Definition at line 181 of file BizRecord.php.

Here is the call graph for this function:

getKeyValue ( isUseOldValue = false ) [final]

Get key (Id) value. If Id is defined as composite key, the returned key value is the combination of key columns

Parameters:
boolean$isUseOldValue
Returns:
string key field string

Definition at line 143 of file BizRecord.php.

getRecordArr ( sqlArr = null ) [final]

Get record array by converting input indexed-Value array to Field-Value pairs

Parameters:
array$sqlArrcolumn value pair array
Returns:
array record array

Definition at line 272 of file BizRecord.php.

Here is the call graph for this function:

getToSaveFields ( type ) [final]

Get insert/update fields. Ignore unchanged field in UPDATE case

Returns:
array field value pair array

Definition at line 382 of file BizRecord.php.

merge ( &$  anotherMIObj )

Merge with another BizRecord object. Used in metedata inheritance.

Parameters:
BizRecord$anotherMIObjto be merged BizRecord object
Returns:
void

Reimplemented from MetaIterator.

Definition at line 64 of file BizRecord.php.

saveOldRecord ( &$  inputArr ) [final]

Save old recrod, used in update record when old record value is needed in the action

Parameters:
array$inputArrold record array
Returns:
avoid

Definition at line 254 of file BizRecord.php.

setInputRecord ( &$  inputArr ) [final]

Assign a record array as the internal record of the BizRecord

Parameters:
array$inpuArr
Returns:
void

Definition at line 221 of file BizRecord.php.

Here is the call graph for this function:

setRecordArr ( recArr )

Set record array to internal data structure

Parameters:
array$recArrrecord array
Returns:
void

Definition at line 204 of file BizRecord.php.


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