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

Class: BizRecord

Source Location: /data/private/BizRecord.php

Class BizRecord

Inherited Properties, Constants, and Methods
Property Summary
mixed   $m_ColFldMap  
mixed   $m_InputFields  
mixed   $m_KeyFldColMap  

[ Top ]
Method Summary
void   __construct()   Initialize BizRecord with xml array
array   ConvertSqlArrToRecArr()   Conver sql array to record array
array   GetEmptyRecordArr()   Get an empty record array. Called by BizDataObj::NewRecord()
BizField   GetFieldByColumn()   Get fielf by column name
   GetJoinInputRecord()   Get join input record
string   GetJoinSearchRule()   Get join search rule
array   GetKeyFields()   Get a list of fields (name) who are defined as keys columns
string   GetKeySearchRule()   Get key search rule.
string   GetKeyValue()   Get key (Id) value.
array   GetRecordArr()   Get record array by converting input indexed-Value array to Field-Value pairs
array   GetToSaveFields()   Get insert/update fields.
void   merge()   Merge with another BizRecord object. Used in metedata inheritance.
avoid   SaveOldRecord()   Save old recrod, used in update record when old record value is needed in the action
void   SetInputRecord()  
void   SetRecordArr()   Set record array to internal data structure

[ Top ]
Properties
mixed   $m_ColFldMap = array() [line 27]
API Tags:
Access:  protected


[ Top ]
mixed   $m_InputFields [line 28]
API Tags:
Access:  public


[ Top ]
mixed   $m_KeyFldColMap = array() [line 26]
API Tags:
Access:  protected


[ Top ]
Methods
Constructor __construct  [line 38]

  void __construct( array &$xmlArr, string $className, [mixed $prtObj = null], BizDataObj $bizObj  )

Initialize BizRecord with xml array

Parameters:
array   $xmlArr:  xml array
string   $className:  name of the class of the object
BizDataObj   $bizObj:  BizDataObj instance


Redefinition of:
MetaIterator::__construct()
Contructor of class

[ Top ]
ConvertSqlArrToRecArr  [line 270]

  array ConvertSqlArrToRecArr( array $sqlArr  )

Conver sql array to record array

Parameters:
array   $sqlArr:  indexed-value pair array

API Tags:
Return:  field-value record array
Access:  public


[ Top ]
GetEmptyRecordArr  [line 111]

  array GetEmptyRecordArr( )

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


API Tags:
Return:  record array
Access:  public


[ Top ]
GetFieldByColumn  [line 98]

  BizField GetFieldByColumn( string $column, [string $table = null]  )

Get fielf by column name

Parameters:
string   $column:  column name
string   $table:  table name

API Tags:
Return:  BizField object
Access:  public


[ Top ]
GetJoinInputRecord  [line 312]

  GetJoinInputRecord( $join  )

Get join input record

NOTE: not used in. may used in the future release BedSmellInCode::SpeculativeGenerality() ?? >>

Parameters:
   $join: 

API Tags:
Access:  public


[ Top ]
GetJoinSearchRule  [line 344]

  string GetJoinSearchRule( $tableJoin, [boolean $useOldValue = false]  )

Get join search rule

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

Parameters:
   $tableJoin: 
boolean   $useOldValue: 

API Tags:
Access:  public


[ Top ]
GetKeyFields  [line 149]

  array GetKeyFields( )

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


API Tags:
Return:  array of key fields
Access:  public


[ Top ]
GetKeySearchRule  [line 167]

  string GetKeySearchRule( [boolean $useOldValue = false], [boolean $useColumnName = false]  )

Get key search rule.

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

Parameters:
boolean   $useOldValue:  true if old key value is used in the search rule
boolean   $useColumnName:  true if column name is used in the search rule, false if [field] is used

API Tags:
Return:  search rule
Access:  public


[ Top ]
GetKeyValue  [line 129]

  string GetKeyValue( [boolean $useOldValue = false]  )

Get key (Id) value.

If Id is defined as composite key, the returned key value is the combination of key columns

Parameters:
boolean   $useOldValue: 

API Tags:
Return:  key field string
Access:  public


[ Top ]
GetRecordArr  [line 254]

  array GetRecordArr( [array $sqlArr = null]  )

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

Parameters:
array   $sqlArr:  column value pair array

API Tags:
Return:  record array
Access:  public


[ Top ]
GetToSaveFields  [line 359]

  array GetToSaveFields( mixed $type  )

Get insert/update fields.

Ignore unchanged field in UPDATE case


API Tags:
Return:  field value pair array
Access:  public


[ Top ]
merge  [line 50]

  void merge( mixed &$anotherMIObj, BizRecord $anotherMIObject  )

Merge with another BizRecord object. Used in metedata inheritance.

Parameters:
BizRecord   $anotherMIObject:  to be merged BizRecord object

API Tags:
Access:  public


Redefinition of:
MetaIterator::merge()
Merge to another MetaIterator object

[ Top ]
SaveOldRecord  [line 236]

  avoid SaveOldRecord( array &$inputArr  )

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

Parameters:
array   $inputArr:  old record array

API Tags:
Access:  public


[ Top ]
SetInputRecord  [line 207]

  void SetInputRecord( mixed &$inputArr  )


API Tags:
Access:  public


[ Top ]
SetRecordArr  [line 190]

  void SetRecordArr( array $recArr  )

Set record array to internal data structure

Parameters:
array   $recArr:  record array

API Tags:
Access:  public


[ Top ]

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