Пример #1
0
 /**
  * Instantiate a Company from a Database Row.
  * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
  * is calling this Company::InstantiateDbRow in order to perform
  * early binding on referenced objects.
  * @param QDatabaseRowBase $objDbRow
  * @param string $strAliasPrefix
  * @param string $strExpandAsArrayNodes
  * @param QBaseClass $objPreviousItem
  * @param string[] $strColumnAliasArray
  * @return Company
  */
 public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null, $strColumnAliasArray = array())
 {
     // If blank row, return null
     if (!$objDbRow) {
         return null;
     }
     // See if we're doing an array expansion on the previous item
     $strAlias = $strAliasPrefix . 'company_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intCompanyId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
         // We are.  Now, prepare to check for ExpandAsArray clauses
         $blnExpandedViaArray = false;
         if (!$strAliasPrefix) {
             $strAliasPrefix = 'company__';
         }
         $strAlias = $strAliasPrefix . 'address__address_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAddressArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAddressArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'address__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAddressArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAddressArray[] = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'address__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'contact__contact_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objContactArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objContactArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contact__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objContactArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objContactArray[] = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contact__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'receiptasfrom__receipt_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objReceiptAsFromArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objReceiptAsFromArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasfrom__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objReceiptAsFromArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objReceiptAsFromArray[] = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasfrom__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'shipmentasfrom__shipment_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objShipmentAsFromArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objShipmentAsFromArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasfrom__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objShipmentAsFromArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objShipmentAsFromArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasfrom__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'shipmentasto__shipment_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objShipmentAsToArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objShipmentAsToArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasto__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objShipmentAsToArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objShipmentAsToArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasto__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         // Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
         if ($blnExpandedViaArray) {
             return false;
         } else {
             if ($strAliasPrefix == 'company__') {
                 $strAliasPrefix = null;
             }
         }
     }
     // Create a new instance of the Company object
     $objToReturn = new Company();
     $objToReturn->__blnRestored = true;
     $strAliasName = array_key_exists($strAliasPrefix . 'company_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'company_id'] : $strAliasPrefix . 'company_id';
     $objToReturn->intCompanyId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'address_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'address_id'] : $strAliasPrefix . 'address_id';
     $objToReturn->intAddressId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'short_description', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'short_description'] : $strAliasPrefix . 'short_description';
     $objToReturn->strShortDescription = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'website', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'website'] : $strAliasPrefix . 'website';
     $objToReturn->strWebsite = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'telephone', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'telephone'] : $strAliasPrefix . 'telephone';
     $objToReturn->strTelephone = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'fax', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'fax'] : $strAliasPrefix . 'fax';
     $objToReturn->strFax = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'email', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'email'] : $strAliasPrefix . 'email';
     $objToReturn->strEmail = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'long_description', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'long_description'] : $strAliasPrefix . 'long_description';
     $objToReturn->strLongDescription = $objDbRow->GetColumn($strAliasName, 'Blob');
     $strAliasName = array_key_exists($strAliasPrefix . 'created_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'created_by'] : $strAliasPrefix . 'created_by';
     $objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'creation_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'creation_date'] : $strAliasPrefix . 'creation_date';
     $objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
     $strAliasName = array_key_exists($strAliasPrefix . 'modified_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_by'] : $strAliasPrefix . 'modified_by';
     $objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'modified_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_date'] : $strAliasPrefix . 'modified_date';
     $objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasName, 'VarChar');
     // Instantiate Virtual Attributes
     foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
         $strVirtualPrefix = $strAliasPrefix . '__';
         $strVirtualPrefixLength = strlen($strVirtualPrefix);
         if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
             $objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
         }
     }
     // Prepare to Check for Early/Virtual Binding
     if (!$strAliasPrefix) {
         $strAliasPrefix = 'company__';
     }
     // Check for Address Early Binding
     $strAlias = $strAliasPrefix . 'address_id__address_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objAddress = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'address_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for CreatedByObject Early Binding
     $strAlias = $strAliasPrefix . 'created_by__user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objCreatedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'created_by__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for ModifiedByObject Early Binding
     $strAlias = $strAliasPrefix . 'modified_by__user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objModifiedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'modified_by__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for CompanyCustomFieldHelper Unique ReverseReference Binding
     $strAlias = $strAliasPrefix . 'companycustomfieldhelper__company_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if ($objDbRow->ColumnExists($strAliasName)) {
         if (!is_null($objDbRow->GetColumn($strAliasName))) {
             $objToReturn->objCompanyCustomFieldHelper = CompanyCustomFieldHelper::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companycustomfieldhelper__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             // We ATTEMPTED to do an Early Bind but the Object Doesn't Exist
             // Let's set to FALSE so that the object knows not to try and re-query again
             $objToReturn->objCompanyCustomFieldHelper = false;
         }
     }
     // Check for Address Virtual Binding
     $strAlias = $strAliasPrefix . 'address__address_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAddressArray[] = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'address__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAddress = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'address__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for Contact Virtual Binding
     $strAlias = $strAliasPrefix . 'contact__contact_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objContactArray[] = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contact__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objContact = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contact__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ReceiptAsFrom Virtual Binding
     $strAlias = $strAliasPrefix . 'receiptasfrom__receipt_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objReceiptAsFromArray[] = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasfrom__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objReceiptAsFrom = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasfrom__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ShipmentAsFrom Virtual Binding
     $strAlias = $strAliasPrefix . 'shipmentasfrom__shipment_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objShipmentAsFromArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasfrom__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objShipmentAsFrom = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasfrom__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ShipmentAsTo Virtual Binding
     $strAlias = $strAliasPrefix . 'shipmentasto__shipment_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objShipmentAsToArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasto__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objShipmentAsTo = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasto__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     return $objToReturn;
 }
Пример #2
0
 /**
  * Instantiate an array of Shipments from a Database Result
  * @param DatabaseResultBase $objDbResult
  * @return Shipment[]
  */
 public static function InstantiateDbResult(QDatabaseResultBase $objDbResult, $strExpandAsArrayNodes = null)
 {
     $objToReturn = array();
     // If blank resultset, then return empty array
     if (!$objDbResult) {
         return $objToReturn;
     }
     // Load up the return array with each row
     if ($strExpandAsArrayNodes) {
         $objLastRowItem = null;
         while ($objDbRow = $objDbResult->GetNextRow()) {
             $objItem = Shipment::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, $objLastRowItem);
             if ($objItem) {
                 array_push($objToReturn, $objItem);
                 $objLastRowItem = $objItem;
             }
         }
     } else {
         while ($objDbRow = $objDbResult->GetNextRow()) {
             array_push($objToReturn, Shipment::InstantiateDbRow($objDbRow));
         }
     }
     return $objToReturn;
 }
Пример #3
0
 /**
  * Instantiate a single Shipment object from a query cursor (e.g. a DB ResultSet).
  * Cursor is automatically moved to the "next row" of the result set.
  * Will return NULL if no cursor or if the cursor has no more rows in the resultset.
  * @param QDatabaseResultBase $objDbResult cursor resource
  * @return Shipment next row resulting from the query
  */
 public static function InstantiateCursor(QDatabaseResultBase $objDbResult)
 {
     // If blank resultset, then return empty result
     if (!$objDbResult) {
         return null;
     }
     // If empty resultset, then return empty result
     $objDbRow = $objDbResult->GetNextRow();
     if (!$objDbRow) {
         return null;
     }
     // We need the Column Aliases
     $strColumnAliasArray = $objDbResult->QueryBuilder->ColumnAliasArray;
     if (!$strColumnAliasArray) {
         $strColumnAliasArray = array();
     }
     // Pull Expansions (if applicable)
     $strExpandAsArrayNodes = $objDbResult->QueryBuilder->ExpandAsArrayNodes;
     // Load up the return result with a row and return it
     return Shipment::InstantiateDbRow($objDbRow, null, $strExpandAsArrayNodes, null, $strColumnAliasArray);
 }
Пример #4
0
 /**
  * Instantiate a Courier from a Database Row.
  * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
  * is calling this Courier::InstantiateDbRow in order to perform
  * early binding on referenced objects.
  * @param QDatabaseRowBase $objDbRow
  * @param string $strAliasPrefix
  * @param string $strExpandAsArrayNodes
  * @param QBaseClass $objPreviousItem
  * @param string[] $strColumnAliasArray
  * @return Courier
  */
 public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null, $strColumnAliasArray = array())
 {
     // If blank row, return null
     if (!$objDbRow) {
         return null;
     }
     // See if we're doing an array expansion on the previous item
     $strAlias = $strAliasPrefix . 'courier_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intCourierId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
         // We are.  Now, prepare to check for ExpandAsArray clauses
         $blnExpandedViaArray = false;
         if (!$strAliasPrefix) {
             $strAliasPrefix = 'courier__';
         }
         $strAlias = $strAliasPrefix . 'shipment__shipment_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objShipmentArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objShipmentArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipment__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objShipmentArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objShipmentArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipment__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         // Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
         if ($blnExpandedViaArray) {
             return false;
         } else {
             if ($strAliasPrefix == 'courier__') {
                 $strAliasPrefix = null;
             }
         }
     }
     // Create a new instance of the Courier object
     $objToReturn = new Courier();
     $objToReturn->__blnRestored = true;
     $strAliasName = array_key_exists($strAliasPrefix . 'courier_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'courier_id'] : $strAliasPrefix . 'courier_id';
     $objToReturn->intCourierId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'short_description', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'short_description'] : $strAliasPrefix . 'short_description';
     $objToReturn->strShortDescription = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'active_flag', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'active_flag'] : $strAliasPrefix . 'active_flag';
     $objToReturn->blnActiveFlag = $objDbRow->GetColumn($strAliasName, 'Bit');
     // Instantiate Virtual Attributes
     foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
         $strVirtualPrefix = $strAliasPrefix . '__';
         $strVirtualPrefixLength = strlen($strVirtualPrefix);
         if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
             $objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
         }
     }
     // Prepare to Check for Early/Virtual Binding
     if (!$strAliasPrefix) {
         $strAliasPrefix = 'courier__';
     }
     // Check for Shipment Virtual Binding
     $strAlias = $strAliasPrefix . 'shipment__shipment_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objShipmentArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipment__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objShipment = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipment__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     return $objToReturn;
 }
Пример #5
0
 /**
  * Instantiate a Address from a Database Row.
  * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
  * is calling this Address::InstantiateDbRow in order to perform
  * early binding on referenced objects.
  * @param DatabaseRowBase $objDbRow
  * @param string $strAliasPrefix
  * @return Address
  */
 public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null)
 {
     // If blank row, return null
     if (!$objDbRow) {
         return null;
     }
     // See if we're doing an array expansion on the previous item
     if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intAddressId == $objDbRow->GetColumn($strAliasPrefix . 'address_id', 'Integer')) {
         // We are.  Now, prepare to check for ExpandAsArray clauses
         $blnExpandedViaArray = false;
         if (!$strAliasPrefix) {
             $strAliasPrefix = 'address__';
         }
         if (array_key_exists($strAliasPrefix . 'company__company_id', $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasPrefix . 'company__company_id'))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCompanyArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCompanyArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'company__', $strExpandAsArrayNodes, $objPreviousChildItem);
                 if ($objChildItem) {
                     array_push($objPreviousItem->_objCompanyArray, $objChildItem);
                 }
             } else {
                 array_push($objPreviousItem->_objCompanyArray, Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'company__', $strExpandAsArrayNodes));
             }
             $blnExpandedViaArray = true;
         }
         if (array_key_exists($strAliasPrefix . 'contact__contact_id', $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasPrefix . 'contact__contact_id'))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objContactArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objContactArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contact__', $strExpandAsArrayNodes, $objPreviousChildItem);
                 if ($objChildItem) {
                     array_push($objPreviousItem->_objContactArray, $objChildItem);
                 }
             } else {
                 array_push($objPreviousItem->_objContactArray, Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contact__', $strExpandAsArrayNodes));
             }
             $blnExpandedViaArray = true;
         }
         if (array_key_exists($strAliasPrefix . 'receiptasto__receipt_id', $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasPrefix . 'receiptasto__receipt_id'))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objReceiptAsToArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objReceiptAsToArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasto__', $strExpandAsArrayNodes, $objPreviousChildItem);
                 if ($objChildItem) {
                     array_push($objPreviousItem->_objReceiptAsToArray, $objChildItem);
                 }
             } else {
                 array_push($objPreviousItem->_objReceiptAsToArray, Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasto__', $strExpandAsArrayNodes));
             }
             $blnExpandedViaArray = true;
         }
         if (array_key_exists($strAliasPrefix . 'shipmentasfrom__shipment_id', $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasPrefix . 'shipmentasfrom__shipment_id'))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objShipmentAsFromArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objShipmentAsFromArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasfrom__', $strExpandAsArrayNodes, $objPreviousChildItem);
                 if ($objChildItem) {
                     array_push($objPreviousItem->_objShipmentAsFromArray, $objChildItem);
                 }
             } else {
                 array_push($objPreviousItem->_objShipmentAsFromArray, Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasfrom__', $strExpandAsArrayNodes));
             }
             $blnExpandedViaArray = true;
         }
         if (array_key_exists($strAliasPrefix . 'shipmentasto__shipment_id', $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasPrefix . 'shipmentasto__shipment_id'))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objShipmentAsToArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objShipmentAsToArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasto__', $strExpandAsArrayNodes, $objPreviousChildItem);
                 if ($objChildItem) {
                     array_push($objPreviousItem->_objShipmentAsToArray, $objChildItem);
                 }
             } else {
                 array_push($objPreviousItem->_objShipmentAsToArray, Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasto__', $strExpandAsArrayNodes));
             }
             $blnExpandedViaArray = true;
         }
         // Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
         if ($blnExpandedViaArray) {
             return false;
         } else {
             if ($strAliasPrefix == 'address__') {
                 $strAliasPrefix = null;
             }
         }
     }
     // Create a new instance of the Address object
     $objToReturn = new Address();
     $objToReturn->__blnRestored = true;
     $objToReturn->intAddressId = $objDbRow->GetColumn($strAliasPrefix . 'address_id', 'Integer');
     $objToReturn->intCompanyId = $objDbRow->GetColumn($strAliasPrefix . 'company_id', 'Integer');
     $objToReturn->strShortDescription = $objDbRow->GetColumn($strAliasPrefix . 'short_description', 'VarChar');
     $objToReturn->intCountryId = $objDbRow->GetColumn($strAliasPrefix . 'country_id', 'Integer');
     $objToReturn->strAddress1 = $objDbRow->GetColumn($strAliasPrefix . 'address_1', 'VarChar');
     $objToReturn->strAddress2 = $objDbRow->GetColumn($strAliasPrefix . 'address_2', 'VarChar');
     $objToReturn->strCity = $objDbRow->GetColumn($strAliasPrefix . 'city', 'VarChar');
     $objToReturn->intStateProvinceId = $objDbRow->GetColumn($strAliasPrefix . 'state_province_id', 'Integer');
     $objToReturn->strPostalCode = $objDbRow->GetColumn($strAliasPrefix . 'postal_code', 'VarChar');
     $objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasPrefix . 'created_by', 'Integer');
     $objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasPrefix . 'creation_date', 'DateTime');
     $objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasPrefix . 'modified_by', 'Integer');
     $objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasPrefix . 'modified_date', 'VarChar');
     // Instantiate Virtual Attributes
     foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
         $strVirtualPrefix = $strAliasPrefix . '__';
         $strVirtualPrefixLength = strlen($strVirtualPrefix);
         if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
             $objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
         }
     }
     // Prepare to Check for Early/Virtual Binding
     if (!$strAliasPrefix) {
         $strAliasPrefix = 'address__';
     }
     // Check for Company Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'company_id__company_id'))) {
         $objToReturn->objCompany = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'company_id__', $strExpandAsArrayNodes);
     }
     // Check for Country Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'country_id__country_id'))) {
         $objToReturn->objCountry = Country::InstantiateDbRow($objDbRow, $strAliasPrefix . 'country_id__', $strExpandAsArrayNodes);
     }
     // Check for StateProvince Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'state_province_id__state_province_id'))) {
         $objToReturn->objStateProvince = StateProvince::InstantiateDbRow($objDbRow, $strAliasPrefix . 'state_province_id__', $strExpandAsArrayNodes);
     }
     // Check for CreatedByObject Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'created_by__user_account_id'))) {
         $objToReturn->objCreatedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'created_by__', $strExpandAsArrayNodes);
     }
     // Check for ModifiedByObject Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'modified_by__user_account_id'))) {
         $objToReturn->objModifiedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'modified_by__', $strExpandAsArrayNodes);
     }
     // Check for Company Virtual Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'company__company_id'))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAliasPrefix . 'company__company_id', $strExpandAsArrayNodes)) {
             array_push($objToReturn->_objCompanyArray, Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'company__', $strExpandAsArrayNodes));
         } else {
             $objToReturn->_objCompany = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'company__', $strExpandAsArrayNodes);
         }
     }
     // Check for Contact Virtual Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'contact__contact_id'))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAliasPrefix . 'contact__contact_id', $strExpandAsArrayNodes)) {
             array_push($objToReturn->_objContactArray, Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contact__', $strExpandAsArrayNodes));
         } else {
             $objToReturn->_objContact = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contact__', $strExpandAsArrayNodes);
         }
     }
     // Check for ReceiptAsTo Virtual Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'receiptasto__receipt_id'))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAliasPrefix . 'receiptasto__receipt_id', $strExpandAsArrayNodes)) {
             array_push($objToReturn->_objReceiptAsToArray, Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasto__', $strExpandAsArrayNodes));
         } else {
             $objToReturn->_objReceiptAsTo = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasto__', $strExpandAsArrayNodes);
         }
     }
     // Check for ShipmentAsFrom Virtual Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'shipmentasfrom__shipment_id'))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAliasPrefix . 'shipmentasfrom__shipment_id', $strExpandAsArrayNodes)) {
             array_push($objToReturn->_objShipmentAsFromArray, Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasfrom__', $strExpandAsArrayNodes));
         } else {
             $objToReturn->_objShipmentAsFrom = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasfrom__', $strExpandAsArrayNodes);
         }
     }
     // Check for ShipmentAsTo Virtual Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'shipmentasto__shipment_id'))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAliasPrefix . 'shipmentasto__shipment_id', $strExpandAsArrayNodes)) {
             array_push($objToReturn->_objShipmentAsToArray, Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasto__', $strExpandAsArrayNodes));
         } else {
             $objToReturn->_objShipmentAsTo = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasto__', $strExpandAsArrayNodes);
         }
     }
     return $objToReturn;
 }
Пример #6
0
 /**
  * Instantiate a Transaction from a Database Row.
  * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
  * is calling this Transaction::InstantiateDbRow in order to perform
  * early binding on referenced objects.
  * @param QDatabaseRowBase $objDbRow
  * @param string $strAliasPrefix
  * @param string $strExpandAsArrayNodes
  * @param QBaseClass $objPreviousItem
  * @param string[] $strColumnAliasArray
  * @return Transaction
  */
 public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null, $strColumnAliasArray = array())
 {
     // If blank row, return null
     if (!$objDbRow) {
         return null;
     }
     // See if we're doing an array expansion on the previous item
     $strAlias = $strAliasPrefix . 'transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intTransactionId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
         // We are.  Now, prepare to check for ExpandAsArray clauses
         $blnExpandedViaArray = false;
         if (!$strAliasPrefix) {
             $strAliasPrefix = 'transaction__';
         }
         $strAlias = $strAliasPrefix . 'assettransaction__asset_transaction_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetTransactionArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetTransactionArray[$intPreviousChildItemCount - 1];
                 $objChildItem = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransaction__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetTransactionArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetTransactionArray[] = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'inventorytransaction__inventory_transaction_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objInventoryTransactionArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objInventoryTransactionArray[$intPreviousChildItemCount - 1];
                 $objChildItem = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransaction__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objInventoryTransactionArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objInventoryTransactionArray[] = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         // Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
         if ($blnExpandedViaArray) {
             return false;
         } else {
             if ($strAliasPrefix == 'transaction__') {
                 $strAliasPrefix = null;
             }
         }
     }
     // Create a new instance of the Transaction object
     $objToReturn = new Transaction();
     $objToReturn->__blnRestored = true;
     $strAliasName = array_key_exists($strAliasPrefix . 'transaction_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'transaction_id'] : $strAliasPrefix . 'transaction_id';
     $objToReturn->intTransactionId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'entity_qtype_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'entity_qtype_id'] : $strAliasPrefix . 'entity_qtype_id';
     $objToReturn->intEntityQtypeId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'transaction_type_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'transaction_type_id'] : $strAliasPrefix . 'transaction_type_id';
     $objToReturn->intTransactionTypeId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'note', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'note'] : $strAliasPrefix . 'note';
     $objToReturn->strNote = $objDbRow->GetColumn($strAliasName, 'Blob');
     $strAliasName = array_key_exists($strAliasPrefix . 'created_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'created_by'] : $strAliasPrefix . 'created_by';
     $objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'creation_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'creation_date'] : $strAliasPrefix . 'creation_date';
     $objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
     $strAliasName = array_key_exists($strAliasPrefix . 'modified_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_by'] : $strAliasPrefix . 'modified_by';
     $objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'modified_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_date'] : $strAliasPrefix . 'modified_date';
     $objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasName, 'VarChar');
     // Instantiate Virtual Attributes
     foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
         $strVirtualPrefix = $strAliasPrefix . '__';
         $strVirtualPrefixLength = strlen($strVirtualPrefix);
         if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
             $objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
         }
     }
     // Prepare to Check for Early/Virtual Binding
     if (!$strAliasPrefix) {
         $strAliasPrefix = 'transaction__';
     }
     // Check for TransactionType Early Binding
     $strAlias = $strAliasPrefix . 'transaction_type_id__transaction_type_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objTransactionType = TransactionType::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transaction_type_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for CreatedByObject Early Binding
     $strAlias = $strAliasPrefix . 'created_by__user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objCreatedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'created_by__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for ModifiedByObject Early Binding
     $strAlias = $strAliasPrefix . 'modified_by__user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objModifiedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'modified_by__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for Receipt Unique ReverseReference Binding
     $strAlias = $strAliasPrefix . 'receipt__receipt_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if ($objDbRow->ColumnExists($strAliasName)) {
         if (!is_null($objDbRow->GetColumn($strAliasName))) {
             $objToReturn->objReceipt = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receipt__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             // We ATTEMPTED to do an Early Bind but the Object Doesn't Exist
             // Let's set to FALSE so that the object knows not to try and re-query again
             $objToReturn->objReceipt = false;
         }
     }
     // Check for Shipment Unique ReverseReference Binding
     $strAlias = $strAliasPrefix . 'shipment__shipment_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if ($objDbRow->ColumnExists($strAliasName)) {
         if (!is_null($objDbRow->GetColumn($strAliasName))) {
             $objToReturn->objShipment = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipment__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             // We ATTEMPTED to do an Early Bind but the Object Doesn't Exist
             // Let's set to FALSE so that the object knows not to try and re-query again
             $objToReturn->objShipment = false;
         }
     }
     // Check for AssetTransaction Virtual Binding
     $strAlias = $strAliasPrefix . 'assettransaction__asset_transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetTransactionArray[] = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetTransaction = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for InventoryTransaction Virtual Binding
     $strAlias = $strAliasPrefix . 'inventorytransaction__inventory_transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objInventoryTransactionArray[] = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objInventoryTransaction = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransaction__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     return $objToReturn;
 }
Пример #7
0
 /**
  * Instantiate a FedexShipment from a Database Row.
  * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
  * is calling this FedexShipment::InstantiateDbRow in order to perform
  * early binding on referenced objects.
  * @param DatabaseRowBase $objDbRow
  * @param string $strAliasPrefix
  * @return FedexShipment
  */
 public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null)
 {
     // If blank row, return null
     if (!$objDbRow) {
         return null;
     }
     // Create a new instance of the FedexShipment object
     $objToReturn = new FedexShipment();
     $objToReturn->__blnRestored = true;
     $objToReturn->intFedexShipmentId = $objDbRow->GetColumn($strAliasPrefix . 'fedex_shipment_id', 'Integer');
     $objToReturn->intShipmentId = $objDbRow->GetColumn($strAliasPrefix . 'shipment_id', 'Integer');
     $objToReturn->intPackageTypeId = $objDbRow->GetColumn($strAliasPrefix . 'package_type_id', 'Integer');
     $objToReturn->intShippingAccountId = $objDbRow->GetColumn($strAliasPrefix . 'shipping_account_id', 'Integer');
     $objToReturn->intFedexServiceTypeId = $objDbRow->GetColumn($strAliasPrefix . 'fedex_service_type_id', 'Integer');
     $objToReturn->intCurrencyUnitId = $objDbRow->GetColumn($strAliasPrefix . 'currency_unit_id', 'Integer');
     $objToReturn->intWeightUnitId = $objDbRow->GetColumn($strAliasPrefix . 'weight_unit_id', 'Integer');
     $objToReturn->intLengthUnitId = $objDbRow->GetColumn($strAliasPrefix . 'length_unit_id', 'Integer');
     $objToReturn->strToPhone = $objDbRow->GetColumn($strAliasPrefix . 'to_phone', 'VarChar');
     $objToReturn->intPayType = $objDbRow->GetColumn($strAliasPrefix . 'pay_type', 'Integer');
     $objToReturn->strPayerAccountNumber = $objDbRow->GetColumn($strAliasPrefix . 'payer_account_number', 'VarChar');
     $objToReturn->fltPackageWeight = $objDbRow->GetColumn($strAliasPrefix . 'package_weight', 'Float');
     $objToReturn->fltPackageLength = $objDbRow->GetColumn($strAliasPrefix . 'package_length', 'Float');
     $objToReturn->fltPackageWidth = $objDbRow->GetColumn($strAliasPrefix . 'package_width', 'Float');
     $objToReturn->fltPackageHeight = $objDbRow->GetColumn($strAliasPrefix . 'package_height', 'Float');
     $objToReturn->fltDeclaredValue = $objDbRow->GetColumn($strAliasPrefix . 'declared_value', 'Float');
     $objToReturn->strReference = $objDbRow->GetColumn($strAliasPrefix . 'reference', 'Blob');
     $objToReturn->blnSaturdayDeliveryFlag = $objDbRow->GetColumn($strAliasPrefix . 'saturday_delivery_flag', 'Bit');
     $objToReturn->strNotifySenderEmail = $objDbRow->GetColumn($strAliasPrefix . 'notify_sender_email', 'VarChar');
     $objToReturn->blnNotifySenderShipFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_sender_ship_flag', 'Bit');
     $objToReturn->blnNotifySenderExceptionFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_sender_exception_flag', 'Bit');
     $objToReturn->blnNotifySenderDeliveryFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_sender_delivery_flag', 'Bit');
     $objToReturn->strNotifyRecipientEmail = $objDbRow->GetColumn($strAliasPrefix . 'notify_recipient_email', 'VarChar');
     $objToReturn->blnNotifyRecipientShipFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_recipient_ship_flag', 'Bit');
     $objToReturn->blnNotifyRecipientExceptionFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_recipient_exception_flag', 'Bit');
     $objToReturn->blnNotifyRecipientDeliveryFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_recipient_delivery_flag', 'Bit');
     $objToReturn->strNotifyOtherEmail = $objDbRow->GetColumn($strAliasPrefix . 'notify_other_email', 'VarChar');
     $objToReturn->blnNotifyOtherShipFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_other_ship_flag', 'Bit');
     $objToReturn->blnNotifyOtherExceptionFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_other_exception_flag', 'Bit');
     $objToReturn->blnNotifyOtherDeliveryFlag = $objDbRow->GetColumn($strAliasPrefix . 'notify_other_delivery_flag', 'Bit');
     $objToReturn->blnHoldAtLocationFlag = $objDbRow->GetColumn($strAliasPrefix . 'hold_at_location_flag', 'Bit');
     $objToReturn->strHoldAtLocationAddress = $objDbRow->GetColumn($strAliasPrefix . 'hold_at_location_address', 'VarChar');
     $objToReturn->strHoldAtLocationCity = $objDbRow->GetColumn($strAliasPrefix . 'hold_at_location_city', 'VarChar');
     $objToReturn->intHoldAtLocationState = $objDbRow->GetColumn($strAliasPrefix . 'hold_at_location_state', 'Integer');
     $objToReturn->strHoldAtLocationPostalCode = $objDbRow->GetColumn($strAliasPrefix . 'hold_at_location_postal_code', 'VarChar');
     // Instantiate Virtual Attributes
     foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
         $strVirtualPrefix = $strAliasPrefix . '__';
         $strVirtualPrefixLength = strlen($strVirtualPrefix);
         if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
             $objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
         }
     }
     // Prepare to Check for Early/Virtual Binding
     if (!$strAliasPrefix) {
         $strAliasPrefix = 'fedex_shipment__';
     }
     // Check for Shipment Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'shipment_id__shipment_id'))) {
         $objToReturn->objShipment = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipment_id__', $strExpandAsArrayNodes);
     }
     // Check for PackageType Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'package_type_id__package_type_id'))) {
         $objToReturn->objPackageType = PackageType::InstantiateDbRow($objDbRow, $strAliasPrefix . 'package_type_id__', $strExpandAsArrayNodes);
     }
     // Check for ShippingAccount Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'shipping_account_id__shipping_account_id'))) {
         $objToReturn->objShippingAccount = ShippingAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipping_account_id__', $strExpandAsArrayNodes);
     }
     // Check for FedexServiceType Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'fedex_service_type_id__fedex_service_type_id'))) {
         $objToReturn->objFedexServiceType = FedexServiceType::InstantiateDbRow($objDbRow, $strAliasPrefix . 'fedex_service_type_id__', $strExpandAsArrayNodes);
     }
     // Check for CurrencyUnit Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'currency_unit_id__currency_unit_id'))) {
         $objToReturn->objCurrencyUnit = CurrencyUnit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'currency_unit_id__', $strExpandAsArrayNodes);
     }
     // Check for WeightUnit Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'weight_unit_id__weight_unit_id'))) {
         $objToReturn->objWeightUnit = WeightUnit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'weight_unit_id__', $strExpandAsArrayNodes);
     }
     // Check for LengthUnit Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'length_unit_id__length_unit_id'))) {
         $objToReturn->objLengthUnit = LengthUnit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'length_unit_id__', $strExpandAsArrayNodes);
     }
     // Check for HoldAtLocationStateObject Early Binding
     if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'hold_at_location_state__state_province_id'))) {
         $objToReturn->objHoldAtLocationStateObject = StateProvince::InstantiateDbRow($objDbRow, $strAliasPrefix . 'hold_at_location_state__', $strExpandAsArrayNodes);
     }
     return $objToReturn;
 }
 /**
  * Instantiate a ShipmentCustomFieldHelper from a Database Row.
  * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
  * is calling this ShipmentCustomFieldHelper::InstantiateDbRow in order to perform
  * early binding on referenced objects.
  * @param QDatabaseRowBase $objDbRow
  * @param string $strAliasPrefix
  * @param string $strExpandAsArrayNodes
  * @param QBaseClass $objPreviousItem
  * @param string[] $strColumnAliasArray
  * @return ShipmentCustomFieldHelper
  */
 public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null, $strColumnAliasArray = array())
 {
     // If blank row, return null
     if (!$objDbRow) {
         return null;
     }
     // Create a new instance of the ShipmentCustomFieldHelper object
     $objToReturn = new ShipmentCustomFieldHelper();
     $objToReturn->__blnRestored = true;
     $strAliasName = array_key_exists($strAliasPrefix . 'shipment_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'shipment_id'] : $strAliasPrefix . 'shipment_id';
     $objToReturn->intShipmentId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $objToReturn->__intShipmentId = $objDbRow->GetColumn($strAliasName, 'Integer');
     // Instantiate Virtual Attributes
     foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
         $strVirtualPrefix = $strAliasPrefix . '__';
         $strVirtualPrefixLength = strlen($strVirtualPrefix);
         if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
             $objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
         }
     }
     // Prepare to Check for Early/Virtual Binding
     if (!$strAliasPrefix) {
         $strAliasPrefix = 'shipment_custom_field_helper__';
     }
     // Check for Shipment Early Binding
     $strAlias = $strAliasPrefix . 'shipment_id__shipment_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objShipment = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipment_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     return $objToReturn;
 }
Пример #9
0
 /**
  * Instantiate a UserAccount from a Database Row.
  * Takes in an optional strAliasPrefix, used in case another Object::InstantiateDbRow
  * is calling this UserAccount::InstantiateDbRow in order to perform
  * early binding on referenced objects.
  * @param QDatabaseRowBase $objDbRow
  * @param string $strAliasPrefix
  * @param string $strExpandAsArrayNodes
  * @param QBaseClass $objPreviousItem
  * @param string[] $strColumnAliasArray
  * @return UserAccount
  */
 public static function InstantiateDbRow($objDbRow, $strAliasPrefix = null, $strExpandAsArrayNodes = null, $objPreviousItem = null, $strColumnAliasArray = array())
 {
     // If blank row, return null
     if (!$objDbRow) {
         return null;
     }
     // See if we're doing an array expansion on the previous item
     $strAlias = $strAliasPrefix . 'user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if ($strExpandAsArrayNodes && $objPreviousItem && $objPreviousItem->intUserAccountId == $objDbRow->GetColumn($strAliasName, 'Integer')) {
         // We are.  Now, prepare to check for ExpandAsArray clauses
         $blnExpandedViaArray = false;
         if (!$strAliasPrefix) {
             $strAliasPrefix = 'user_account__';
         }
         $strAlias = $strAliasPrefix . 'addressascreatedby__address_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAddressAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAddressAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAddressAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAddressAsCreatedByArray[] = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'addressasmodifiedby__address_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAddressAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAddressAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAddressAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAddressAsModifiedByArray[] = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assetasmodifiedby__asset_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetAsModifiedByArray[] = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assetascreatedby__asset_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetAsCreatedByArray[] = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assetmodelasmodifiedby__asset_model_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetModelAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetModelAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetModelAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetModelAsModifiedByArray[] = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assetmodelascreatedby__asset_model_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetModelAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetModelAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetModelAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetModelAsCreatedByArray[] = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assettransactionascreatedby__asset_transaction_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetTransactionAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetTransactionAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactionascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetTransactionAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetTransactionAsCreatedByArray[] = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assettransactionasmodifiedby__asset_transaction_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetTransactionAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetTransactionAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactionasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetTransactionAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetTransactionAsModifiedByArray[] = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assettransactioncheckoutastouser__asset_transaction_checkout_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetTransactionCheckoutAsToUserArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetTransactionCheckoutAsToUserArray[$intPreviousChildItemCount - 1];
                 $objChildItem = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutastouser__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetTransactionCheckoutAsToUserArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetTransactionCheckoutAsToUserArray[] = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutastouser__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assettransactioncheckoutascreatedby__asset_transaction_checkout_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetTransactionCheckoutAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetTransactionCheckoutAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetTransactionCheckoutAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetTransactionCheckoutAsCreatedByArray[] = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'assettransactioncheckoutasmodifiedby__asset_transaction_checkout_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAssetTransactionCheckoutAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAssetTransactionCheckoutAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAssetTransactionCheckoutAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAssetTransactionCheckoutAsModifiedByArray[] = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'attachmentascreatedby__attachment_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAttachmentAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAttachmentAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Attachment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'attachmentascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAttachmentAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAttachmentAsCreatedByArray[] = Attachment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'attachmentascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'auditasmodifiedby__audit_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAuditAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAuditAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Audit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'auditasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAuditAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAuditAsModifiedByArray[] = Audit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'auditasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'auditascreatedby__audit_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objAuditAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objAuditAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Audit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'auditascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objAuditAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objAuditAsCreatedByArray[] = Audit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'auditascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'categoryasmodifiedby__category_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCategoryAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCategoryAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Category::InstantiateDbRow($objDbRow, $strAliasPrefix . 'categoryasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objCategoryAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objCategoryAsModifiedByArray[] = Category::InstantiateDbRow($objDbRow, $strAliasPrefix . 'categoryasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'categoryascreatedby__category_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCategoryAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCategoryAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Category::InstantiateDbRow($objDbRow, $strAliasPrefix . 'categoryascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objCategoryAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objCategoryAsCreatedByArray[] = Category::InstantiateDbRow($objDbRow, $strAliasPrefix . 'categoryascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'companyasmodifiedby__company_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCompanyAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCompanyAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companyasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objCompanyAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objCompanyAsModifiedByArray[] = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companyasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'companyascreatedby__company_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCompanyAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCompanyAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companyascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objCompanyAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objCompanyAsCreatedByArray[] = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companyascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'contactasmodifiedby__contact_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objContactAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objContactAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objContactAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objContactAsModifiedByArray[] = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'contactascreatedby__contact_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objContactAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objContactAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objContactAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objContactAsCreatedByArray[] = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'customfieldasmodifiedby__custom_field_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCustomFieldAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCustomFieldAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = CustomField::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objCustomFieldAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objCustomFieldAsModifiedByArray[] = CustomField::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'customfieldascreatedby__custom_field_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCustomFieldAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCustomFieldAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = CustomField::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objCustomFieldAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objCustomFieldAsCreatedByArray[] = CustomField::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'customfieldvalueascreatedby__custom_field_value_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCustomFieldValueAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCustomFieldValueAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = CustomFieldValue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldvalueascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objCustomFieldValueAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objCustomFieldValueAsCreatedByArray[] = CustomFieldValue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldvalueascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'customfieldvalueasmodifiedby__custom_field_value_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objCustomFieldValueAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objCustomFieldValueAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = CustomFieldValue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldvalueasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objCustomFieldValueAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objCustomFieldValueAsModifiedByArray[] = CustomFieldValue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldvalueasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'datagridcolumnpreference__datagrid_column_preference_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objDatagridColumnPreferenceArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objDatagridColumnPreferenceArray[$intPreviousChildItemCount - 1];
                 $objChildItem = DatagridColumnPreference::InstantiateDbRow($objDbRow, $strAliasPrefix . 'datagridcolumnpreference__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objDatagridColumnPreferenceArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objDatagridColumnPreferenceArray[] = DatagridColumnPreference::InstantiateDbRow($objDbRow, $strAliasPrefix . 'datagridcolumnpreference__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'inventorylocationascreatedby__inventory_location_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objInventoryLocationAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objInventoryLocationAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorylocationascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objInventoryLocationAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objInventoryLocationAsCreatedByArray[] = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorylocationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'inventorylocationasmodifiedby__inventory_location_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objInventoryLocationAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objInventoryLocationAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorylocationasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objInventoryLocationAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objInventoryLocationAsModifiedByArray[] = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorylocationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'inventorymodelasmodifiedby__inventory_model_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objInventoryModelAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objInventoryModelAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = InventoryModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorymodelasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objInventoryModelAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objInventoryModelAsModifiedByArray[] = InventoryModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorymodelasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'inventorymodelascreatedby__inventory_model_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objInventoryModelAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objInventoryModelAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = InventoryModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorymodelascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objInventoryModelAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objInventoryModelAsCreatedByArray[] = InventoryModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorymodelascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'inventorytransactionasmodifiedby__inventory_transaction_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objInventoryTransactionAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objInventoryTransactionAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransactionasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objInventoryTransactionAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objInventoryTransactionAsModifiedByArray[] = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'inventorytransactionascreatedby__inventory_transaction_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objInventoryTransactionAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objInventoryTransactionAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransactionascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objInventoryTransactionAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objInventoryTransactionAsCreatedByArray[] = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'locationasmodifiedby__location_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objLocationAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objLocationAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'locationasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objLocationAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objLocationAsModifiedByArray[] = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'locationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'locationascreatedby__location_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objLocationAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objLocationAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'locationascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objLocationAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objLocationAsCreatedByArray[] = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'locationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'manufacturerasmodifiedby__manufacturer_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objManufacturerAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objManufacturerAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Manufacturer::InstantiateDbRow($objDbRow, $strAliasPrefix . 'manufacturerasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objManufacturerAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objManufacturerAsModifiedByArray[] = Manufacturer::InstantiateDbRow($objDbRow, $strAliasPrefix . 'manufacturerasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'manufacturerascreatedby__manufacturer_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objManufacturerAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objManufacturerAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Manufacturer::InstantiateDbRow($objDbRow, $strAliasPrefix . 'manufacturerascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objManufacturerAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objManufacturerAsCreatedByArray[] = Manufacturer::InstantiateDbRow($objDbRow, $strAliasPrefix . 'manufacturerascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'notificationasmodifiedby__notification_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objNotificationAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objNotificationAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Notification::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objNotificationAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objNotificationAsModifiedByArray[] = Notification::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'notificationascreatedby__notification_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objNotificationAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objNotificationAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Notification::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objNotificationAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objNotificationAsCreatedByArray[] = Notification::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'notificationuseraccount__notification_user_account_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objNotificationUserAccountArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objNotificationUserAccountArray[$intPreviousChildItemCount - 1];
                 $objChildItem = NotificationUserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationuseraccount__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objNotificationUserAccountArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objNotificationUserAccountArray[] = NotificationUserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationuseraccount__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'receiptascreatedby__receipt_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objReceiptAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objReceiptAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objReceiptAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objReceiptAsCreatedByArray[] = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'receiptasmodifiedby__receipt_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objReceiptAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objReceiptAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objReceiptAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objReceiptAsModifiedByArray[] = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'roleasmodifiedby__role_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleAsModifiedByArray[] = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'roleascreatedby__role_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleAsCreatedByArray[] = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'roleentityqtypebuiltinauthorizationasmodifiedby__role_entity_built_in_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleEntityQtypeBuiltInAuthorizationAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleEntityQtypeBuiltInAuthorizationAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleEntityQtypeBuiltInAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypebuiltinauthorizationasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleEntityQtypeBuiltInAuthorizationAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleEntityQtypeBuiltInAuthorizationAsModifiedByArray[] = RoleEntityQtypeBuiltInAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypebuiltinauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'roleentityqtypebuiltinauthorizationascreatedby__role_entity_built_in_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleEntityQtypeBuiltInAuthorizationAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleEntityQtypeBuiltInAuthorizationAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleEntityQtypeBuiltInAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypebuiltinauthorizationascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleEntityQtypeBuiltInAuthorizationAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleEntityQtypeBuiltInAuthorizationAsCreatedByArray[] = RoleEntityQtypeBuiltInAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypebuiltinauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationasmodifiedby__role_entity_qtype_custom_field_authorization_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleEntityQtypeCustomFieldAuthorizationAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleEntityQtypeCustomFieldAuthorizationAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleEntityQtypeCustomFieldAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleEntityQtypeCustomFieldAuthorizationAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleEntityQtypeCustomFieldAuthorizationAsModifiedByArray[] = RoleEntityQtypeCustomFieldAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationascreatedby__role_entity_qtype_custom_field_authorization_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleEntityQtypeCustomFieldAuthorizationAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleEntityQtypeCustomFieldAuthorizationAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleEntityQtypeCustomFieldAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleEntityQtypeCustomFieldAuthorizationAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleEntityQtypeCustomFieldAuthorizationAsCreatedByArray[] = RoleEntityQtypeCustomFieldAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'rolemoduleasmodifiedby__role_module_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleModuleAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleModuleAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleModule::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleModuleAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleModuleAsModifiedByArray[] = RoleModule::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'rolemoduleascreatedby__role_module_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleModuleAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleModuleAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleModule::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleModuleAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleModuleAsCreatedByArray[] = RoleModule::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'rolemoduleauthorizationasmodifiedby__role_module_authorization_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleModuleAuthorizationAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleModuleAuthorizationAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleModuleAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleauthorizationasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleModuleAuthorizationAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleModuleAuthorizationAsModifiedByArray[] = RoleModuleAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'rolemoduleauthorizationascreatedby__role_module_authorization_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleModuleAuthorizationAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleModuleAuthorizationAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleModuleAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleauthorizationascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleModuleAuthorizationAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleModuleAuthorizationAsCreatedByArray[] = RoleModuleAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'roletransactiontypeauthorizationascreatedby__role_transaction_type_authorization_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleTransactionTypeAuthorizationAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleTransactionTypeAuthorizationAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleTransactionTypeAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roletransactiontypeauthorizationascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleTransactionTypeAuthorizationAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleTransactionTypeAuthorizationAsCreatedByArray[] = RoleTransactionTypeAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roletransactiontypeauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'roletransactiontypeauthorizationasmodifiedby__role_transaction_type_authorization_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objRoleTransactionTypeAuthorizationAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objRoleTransactionTypeAuthorizationAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = RoleTransactionTypeAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roletransactiontypeauthorizationasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objRoleTransactionTypeAuthorizationAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objRoleTransactionTypeAuthorizationAsModifiedByArray[] = RoleTransactionTypeAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roletransactiontypeauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'shipmentascreatedby__shipment_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objShipmentAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objShipmentAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objShipmentAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objShipmentAsCreatedByArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'shipmentasmodifiedby__shipment_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objShipmentAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objShipmentAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objShipmentAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objShipmentAsModifiedByArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'transactionascreatedby__transaction_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objTransactionAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objTransactionAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transactionascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objTransactionAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objTransactionAsCreatedByArray[] = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'transactionasmodifiedby__transaction_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objTransactionAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objTransactionAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transactionasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objTransactionAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objTransactionAsModifiedByArray[] = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'useraccountascreatedby__user_account_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objUserAccountAsCreatedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objUserAccountAsCreatedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'useraccountascreatedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objUserAccountAsCreatedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objUserAccountAsCreatedByArray[] = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'useraccountascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         $strAlias = $strAliasPrefix . 'useraccountasmodifiedby__user_account_id';
         $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
         if (array_key_exists($strAlias, $strExpandAsArrayNodes) && !is_null($objDbRow->GetColumn($strAliasName))) {
             if ($intPreviousChildItemCount = count($objPreviousItem->_objUserAccountAsModifiedByArray)) {
                 $objPreviousChildItem = $objPreviousItem->_objUserAccountAsModifiedByArray[$intPreviousChildItemCount - 1];
                 $objChildItem = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'useraccountasmodifiedby__', $strExpandAsArrayNodes, $objPreviousChildItem, $strColumnAliasArray);
                 if ($objChildItem) {
                     $objPreviousItem->_objUserAccountAsModifiedByArray[] = $objChildItem;
                 }
             } else {
                 $objPreviousItem->_objUserAccountAsModifiedByArray[] = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'useraccountasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
             }
             $blnExpandedViaArray = true;
         }
         // Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
         if ($blnExpandedViaArray) {
             return false;
         } else {
             if ($strAliasPrefix == 'user_account__') {
                 $strAliasPrefix = null;
             }
         }
     }
     // Create a new instance of the UserAccount object
     $objToReturn = new UserAccount();
     $objToReturn->__blnRestored = true;
     $strAliasName = array_key_exists($strAliasPrefix . 'user_account_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'user_account_id'] : $strAliasPrefix . 'user_account_id';
     $objToReturn->intUserAccountId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'first_name', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'first_name'] : $strAliasPrefix . 'first_name';
     $objToReturn->strFirstName = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'last_name', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'last_name'] : $strAliasPrefix . 'last_name';
     $objToReturn->strLastName = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'username', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'username'] : $strAliasPrefix . 'username';
     $objToReturn->strUsername = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'password_hash', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'password_hash'] : $strAliasPrefix . 'password_hash';
     $objToReturn->strPasswordHash = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'email_address', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'email_address'] : $strAliasPrefix . 'email_address';
     $objToReturn->strEmailAddress = $objDbRow->GetColumn($strAliasName, 'VarChar');
     $strAliasName = array_key_exists($strAliasPrefix . 'active_flag', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'active_flag'] : $strAliasPrefix . 'active_flag';
     $objToReturn->blnActiveFlag = $objDbRow->GetColumn($strAliasName, 'Bit');
     $strAliasName = array_key_exists($strAliasPrefix . 'admin_flag', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'admin_flag'] : $strAliasPrefix . 'admin_flag';
     $objToReturn->blnAdminFlag = $objDbRow->GetColumn($strAliasName, 'Bit');
     $strAliasName = array_key_exists($strAliasPrefix . 'portable_access_flag', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'portable_access_flag'] : $strAliasPrefix . 'portable_access_flag';
     $objToReturn->blnPortableAccessFlag = $objDbRow->GetColumn($strAliasName, 'Bit');
     $strAliasName = array_key_exists($strAliasPrefix . 'portable_user_pin', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'portable_user_pin'] : $strAliasPrefix . 'portable_user_pin';
     $objToReturn->intPortableUserPin = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'role_id', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'role_id'] : $strAliasPrefix . 'role_id';
     $objToReturn->intRoleId = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'created_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'created_by'] : $strAliasPrefix . 'created_by';
     $objToReturn->intCreatedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'creation_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'creation_date'] : $strAliasPrefix . 'creation_date';
     $objToReturn->dttCreationDate = $objDbRow->GetColumn($strAliasName, 'DateTime');
     $strAliasName = array_key_exists($strAliasPrefix . 'modified_by', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_by'] : $strAliasPrefix . 'modified_by';
     $objToReturn->intModifiedBy = $objDbRow->GetColumn($strAliasName, 'Integer');
     $strAliasName = array_key_exists($strAliasPrefix . 'modified_date', $strColumnAliasArray) ? $strColumnAliasArray[$strAliasPrefix . 'modified_date'] : $strAliasPrefix . 'modified_date';
     $objToReturn->strModifiedDate = $objDbRow->GetColumn($strAliasName, 'VarChar');
     // Instantiate Virtual Attributes
     foreach ($objDbRow->GetColumnNameArray() as $strColumnName => $mixValue) {
         $strVirtualPrefix = $strAliasPrefix . '__';
         $strVirtualPrefixLength = strlen($strVirtualPrefix);
         if (substr($strColumnName, 0, $strVirtualPrefixLength) == $strVirtualPrefix) {
             $objToReturn->__strVirtualAttributeArray[substr($strColumnName, $strVirtualPrefixLength)] = $mixValue;
         }
     }
     // Prepare to Check for Early/Virtual Binding
     if (!$strAliasPrefix) {
         $strAliasPrefix = 'user_account__';
     }
     // Check for Role Early Binding
     $strAlias = $strAliasPrefix . 'role_id__role_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objRole = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'role_id__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for CreatedByObject Early Binding
     $strAlias = $strAliasPrefix . 'created_by__user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objCreatedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'created_by__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for ModifiedByObject Early Binding
     $strAlias = $strAliasPrefix . 'modified_by__user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         $objToReturn->objModifiedByObject = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'modified_by__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
     }
     // Check for AddressAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'addressascreatedby__address_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAddressAsCreatedByArray[] = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAddressAsCreatedBy = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AddressAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'addressasmodifiedby__address_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAddressAsModifiedByArray[] = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAddressAsModifiedBy = Address::InstantiateDbRow($objDbRow, $strAliasPrefix . 'addressasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'assetasmodifiedby__asset_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetAsModifiedByArray[] = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetAsModifiedBy = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'assetascreatedby__asset_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetAsCreatedByArray[] = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetAsCreatedBy = Asset::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetModelAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'assetmodelasmodifiedby__asset_model_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetModelAsModifiedByArray[] = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetModelAsModifiedBy = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetModelAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'assetmodelascreatedby__asset_model_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetModelAsCreatedByArray[] = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetModelAsCreatedBy = AssetModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assetmodelascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetTransactionAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'assettransactionascreatedby__asset_transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetTransactionAsCreatedByArray[] = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetTransactionAsCreatedBy = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetTransactionAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'assettransactionasmodifiedby__asset_transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetTransactionAsModifiedByArray[] = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetTransactionAsModifiedBy = AssetTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetTransactionCheckoutAsToUser Virtual Binding
     $strAlias = $strAliasPrefix . 'assettransactioncheckoutastouser__asset_transaction_checkout_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetTransactionCheckoutAsToUserArray[] = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutastouser__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetTransactionCheckoutAsToUser = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutastouser__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetTransactionCheckoutAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'assettransactioncheckoutascreatedby__asset_transaction_checkout_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetTransactionCheckoutAsCreatedByArray[] = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetTransactionCheckoutAsCreatedBy = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AssetTransactionCheckoutAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'assettransactioncheckoutasmodifiedby__asset_transaction_checkout_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAssetTransactionCheckoutAsModifiedByArray[] = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAssetTransactionCheckoutAsModifiedBy = AssetTransactionCheckout::InstantiateDbRow($objDbRow, $strAliasPrefix . 'assettransactioncheckoutasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AttachmentAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'attachmentascreatedby__attachment_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAttachmentAsCreatedByArray[] = Attachment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'attachmentascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAttachmentAsCreatedBy = Attachment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'attachmentascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AuditAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'auditasmodifiedby__audit_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAuditAsModifiedByArray[] = Audit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'auditasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAuditAsModifiedBy = Audit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'auditasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for AuditAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'auditascreatedby__audit_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objAuditAsCreatedByArray[] = Audit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'auditascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objAuditAsCreatedBy = Audit::InstantiateDbRow($objDbRow, $strAliasPrefix . 'auditascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for CategoryAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'categoryasmodifiedby__category_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objCategoryAsModifiedByArray[] = Category::InstantiateDbRow($objDbRow, $strAliasPrefix . 'categoryasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objCategoryAsModifiedBy = Category::InstantiateDbRow($objDbRow, $strAliasPrefix . 'categoryasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for CategoryAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'categoryascreatedby__category_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objCategoryAsCreatedByArray[] = Category::InstantiateDbRow($objDbRow, $strAliasPrefix . 'categoryascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objCategoryAsCreatedBy = Category::InstantiateDbRow($objDbRow, $strAliasPrefix . 'categoryascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for CompanyAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'companyasmodifiedby__company_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objCompanyAsModifiedByArray[] = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companyasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objCompanyAsModifiedBy = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companyasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for CompanyAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'companyascreatedby__company_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objCompanyAsCreatedByArray[] = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companyascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objCompanyAsCreatedBy = Company::InstantiateDbRow($objDbRow, $strAliasPrefix . 'companyascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ContactAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'contactasmodifiedby__contact_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objContactAsModifiedByArray[] = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objContactAsModifiedBy = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ContactAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'contactascreatedby__contact_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objContactAsCreatedByArray[] = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objContactAsCreatedBy = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for CustomFieldAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'customfieldasmodifiedby__custom_field_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objCustomFieldAsModifiedByArray[] = CustomField::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objCustomFieldAsModifiedBy = CustomField::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for CustomFieldAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'customfieldascreatedby__custom_field_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objCustomFieldAsCreatedByArray[] = CustomField::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objCustomFieldAsCreatedBy = CustomField::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for CustomFieldValueAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'customfieldvalueascreatedby__custom_field_value_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objCustomFieldValueAsCreatedByArray[] = CustomFieldValue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldvalueascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objCustomFieldValueAsCreatedBy = CustomFieldValue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldvalueascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for CustomFieldValueAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'customfieldvalueasmodifiedby__custom_field_value_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objCustomFieldValueAsModifiedByArray[] = CustomFieldValue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldvalueasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objCustomFieldValueAsModifiedBy = CustomFieldValue::InstantiateDbRow($objDbRow, $strAliasPrefix . 'customfieldvalueasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for DatagridColumnPreference Virtual Binding
     $strAlias = $strAliasPrefix . 'datagridcolumnpreference__datagrid_column_preference_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objDatagridColumnPreferenceArray[] = DatagridColumnPreference::InstantiateDbRow($objDbRow, $strAliasPrefix . 'datagridcolumnpreference__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objDatagridColumnPreference = DatagridColumnPreference::InstantiateDbRow($objDbRow, $strAliasPrefix . 'datagridcolumnpreference__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for InventoryLocationAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'inventorylocationascreatedby__inventory_location_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objInventoryLocationAsCreatedByArray[] = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorylocationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objInventoryLocationAsCreatedBy = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorylocationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for InventoryLocationAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'inventorylocationasmodifiedby__inventory_location_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objInventoryLocationAsModifiedByArray[] = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorylocationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objInventoryLocationAsModifiedBy = InventoryLocation::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorylocationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for InventoryModelAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'inventorymodelasmodifiedby__inventory_model_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objInventoryModelAsModifiedByArray[] = InventoryModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorymodelasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objInventoryModelAsModifiedBy = InventoryModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorymodelasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for InventoryModelAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'inventorymodelascreatedby__inventory_model_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objInventoryModelAsCreatedByArray[] = InventoryModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorymodelascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objInventoryModelAsCreatedBy = InventoryModel::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorymodelascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for InventoryTransactionAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'inventorytransactionasmodifiedby__inventory_transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objInventoryTransactionAsModifiedByArray[] = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objInventoryTransactionAsModifiedBy = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for InventoryTransactionAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'inventorytransactionascreatedby__inventory_transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objInventoryTransactionAsCreatedByArray[] = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objInventoryTransactionAsCreatedBy = InventoryTransaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'inventorytransactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for LocationAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'locationasmodifiedby__location_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objLocationAsModifiedByArray[] = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'locationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objLocationAsModifiedBy = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'locationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for LocationAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'locationascreatedby__location_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objLocationAsCreatedByArray[] = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'locationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objLocationAsCreatedBy = Location::InstantiateDbRow($objDbRow, $strAliasPrefix . 'locationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ManufacturerAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'manufacturerasmodifiedby__manufacturer_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objManufacturerAsModifiedByArray[] = Manufacturer::InstantiateDbRow($objDbRow, $strAliasPrefix . 'manufacturerasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objManufacturerAsModifiedBy = Manufacturer::InstantiateDbRow($objDbRow, $strAliasPrefix . 'manufacturerasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ManufacturerAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'manufacturerascreatedby__manufacturer_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objManufacturerAsCreatedByArray[] = Manufacturer::InstantiateDbRow($objDbRow, $strAliasPrefix . 'manufacturerascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objManufacturerAsCreatedBy = Manufacturer::InstantiateDbRow($objDbRow, $strAliasPrefix . 'manufacturerascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for NotificationAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'notificationasmodifiedby__notification_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objNotificationAsModifiedByArray[] = Notification::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objNotificationAsModifiedBy = Notification::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for NotificationAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'notificationascreatedby__notification_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objNotificationAsCreatedByArray[] = Notification::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objNotificationAsCreatedBy = Notification::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for NotificationUserAccount Virtual Binding
     $strAlias = $strAliasPrefix . 'notificationuseraccount__notification_user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objNotificationUserAccountArray[] = NotificationUserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationuseraccount__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objNotificationUserAccount = NotificationUserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'notificationuseraccount__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ReceiptAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'receiptascreatedby__receipt_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objReceiptAsCreatedByArray[] = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objReceiptAsCreatedBy = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ReceiptAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'receiptasmodifiedby__receipt_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objReceiptAsModifiedByArray[] = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objReceiptAsModifiedBy = Receipt::InstantiateDbRow($objDbRow, $strAliasPrefix . 'receiptasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'roleasmodifiedby__role_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleAsModifiedByArray[] = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleAsModifiedBy = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'roleascreatedby__role_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleAsCreatedByArray[] = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleAsCreatedBy = Role::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleEntityQtypeBuiltInAuthorizationAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'roleentityqtypebuiltinauthorizationasmodifiedby__role_entity_built_in_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleEntityQtypeBuiltInAuthorizationAsModifiedByArray[] = RoleEntityQtypeBuiltInAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypebuiltinauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleEntityQtypeBuiltInAuthorizationAsModifiedBy = RoleEntityQtypeBuiltInAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypebuiltinauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleEntityQtypeBuiltInAuthorizationAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'roleentityqtypebuiltinauthorizationascreatedby__role_entity_built_in_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleEntityQtypeBuiltInAuthorizationAsCreatedByArray[] = RoleEntityQtypeBuiltInAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypebuiltinauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleEntityQtypeBuiltInAuthorizationAsCreatedBy = RoleEntityQtypeBuiltInAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypebuiltinauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleEntityQtypeCustomFieldAuthorizationAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationasmodifiedby__role_entity_qtype_custom_field_authorization_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleEntityQtypeCustomFieldAuthorizationAsModifiedByArray[] = RoleEntityQtypeCustomFieldAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleEntityQtypeCustomFieldAuthorizationAsModifiedBy = RoleEntityQtypeCustomFieldAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleEntityQtypeCustomFieldAuthorizationAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationascreatedby__role_entity_qtype_custom_field_authorization_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleEntityQtypeCustomFieldAuthorizationAsCreatedByArray[] = RoleEntityQtypeCustomFieldAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleEntityQtypeCustomFieldAuthorizationAsCreatedBy = RoleEntityQtypeCustomFieldAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roleentityqtypecustomfieldauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleModuleAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'rolemoduleasmodifiedby__role_module_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleModuleAsModifiedByArray[] = RoleModule::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleModuleAsModifiedBy = RoleModule::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleModuleAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'rolemoduleascreatedby__role_module_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleModuleAsCreatedByArray[] = RoleModule::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleModuleAsCreatedBy = RoleModule::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleModuleAuthorizationAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'rolemoduleauthorizationasmodifiedby__role_module_authorization_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleModuleAuthorizationAsModifiedByArray[] = RoleModuleAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleModuleAuthorizationAsModifiedBy = RoleModuleAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleModuleAuthorizationAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'rolemoduleauthorizationascreatedby__role_module_authorization_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleModuleAuthorizationAsCreatedByArray[] = RoleModuleAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleModuleAuthorizationAsCreatedBy = RoleModuleAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'rolemoduleauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleTransactionTypeAuthorizationAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'roletransactiontypeauthorizationascreatedby__role_transaction_type_authorization_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleTransactionTypeAuthorizationAsCreatedByArray[] = RoleTransactionTypeAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roletransactiontypeauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleTransactionTypeAuthorizationAsCreatedBy = RoleTransactionTypeAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roletransactiontypeauthorizationascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for RoleTransactionTypeAuthorizationAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'roletransactiontypeauthorizationasmodifiedby__role_transaction_type_authorization_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objRoleTransactionTypeAuthorizationAsModifiedByArray[] = RoleTransactionTypeAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roletransactiontypeauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objRoleTransactionTypeAuthorizationAsModifiedBy = RoleTransactionTypeAuthorization::InstantiateDbRow($objDbRow, $strAliasPrefix . 'roletransactiontypeauthorizationasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ShipmentAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'shipmentascreatedby__shipment_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objShipmentAsCreatedByArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objShipmentAsCreatedBy = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for ShipmentAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'shipmentasmodifiedby__shipment_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objShipmentAsModifiedByArray[] = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objShipmentAsModifiedBy = Shipment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'shipmentasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for TransactionAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'transactionascreatedby__transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objTransactionAsCreatedByArray[] = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objTransactionAsCreatedBy = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transactionascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for TransactionAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'transactionasmodifiedby__transaction_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objTransactionAsModifiedByArray[] = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objTransactionAsModifiedBy = Transaction::InstantiateDbRow($objDbRow, $strAliasPrefix . 'transactionasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for UserAccountAsCreatedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'useraccountascreatedby__user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objUserAccountAsCreatedByArray[] = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'useraccountascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objUserAccountAsCreatedBy = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'useraccountascreatedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     // Check for UserAccountAsModifiedBy Virtual Binding
     $strAlias = $strAliasPrefix . 'useraccountasmodifiedby__user_account_id';
     $strAliasName = array_key_exists($strAlias, $strColumnAliasArray) ? $strColumnAliasArray[$strAlias] : $strAlias;
     if (!is_null($objDbRow->GetColumn($strAliasName))) {
         if ($strExpandAsArrayNodes && array_key_exists($strAlias, $strExpandAsArrayNodes)) {
             $objToReturn->_objUserAccountAsModifiedByArray[] = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'useraccountasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         } else {
             $objToReturn->_objUserAccountAsModifiedBy = UserAccount::InstantiateDbRow($objDbRow, $strAliasPrefix . 'useraccountasmodifiedby__', $strExpandAsArrayNodes, null, $strColumnAliasArray);
         }
     }
     return $objToReturn;
 }