本文整理汇总了PHP中UserAccount::ExpandQuery方法的典型用法代码示例。如果您正苦于以下问题:PHP UserAccount::ExpandQuery方法的具体用法?PHP UserAccount::ExpandQuery怎么用?PHP UserAccount::ExpandQuery使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserAccount
的用法示例。
在下文中一共展示了UserAccount::ExpandQuery方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `inventory_model` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`inventory_model_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`inventory_model_id` AS `%s__%s__inventory_model_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`category_id` AS `%s__%s__category_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`manufacturer_id` AS `%s__%s__manufacturer_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`inventory_model_code` AS `%s__%s__inventory_model_code`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`short_description` AS `%s__%s__short_description`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`long_description` AS `%s__%s__long_description`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`image_path` AS `%s__%s__image_path`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`price` AS `%s__%s__price`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'category_id':
try {
Category::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'manufacturer_id':
try {
Manufacturer::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例2: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `role_entity_qtype_built_in_authorization` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`role_entity_built_in_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`role_entity_built_in_id` AS `%s__%s__role_entity_built_in_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`role_id` AS `%s__%s__role_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`entity_qtype_id` AS `%s__%s__entity_qtype_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`authorization_id` AS `%s__%s__authorization_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`authorized_flag` AS `%s__%s__authorized_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'role_id':
try {
Role::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'authorization_id':
try {
Authorization::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例3: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `datagrid_column_preference` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`datagrid_column_preference_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`datagrid_column_preference_id` AS `%s__%s__datagrid_column_preference_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`datagrid_id` AS `%s__%s__datagrid_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`column_name` AS `%s__%s__column_name`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`user_account_id` AS `%s__%s__user_account_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`display_flag` AS `%s__%s__display_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'datagrid_id':
try {
Datagrid::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'user_account_id':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例4: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `shipping_account` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`shipping_account_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`shipping_account_id` AS `%s__%s__shipping_account_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`courier_id` AS `%s__%s__courier_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`short_description` AS `%s__%s__short_description`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`access_id` AS `%s__%s__access_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`access_code` AS `%s__%s__access_code`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'courier_id':
try {
Courier::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例5: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `asset` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`asset_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`asset_id` AS `%s__%s__asset_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`asset_model_id` AS `%s__%s__asset_model_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`location_id` AS `%s__%s__location_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`asset_code` AS `%s__%s__asset_code`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`image_path` AS `%s__%s__image_path`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`checked_out_flag` AS `%s__%s__checked_out_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`reserved_flag` AS `%s__%s__reserved_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'asset_model_id':
try {
AssetModel::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'location_id':
try {
Location::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例6: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `shipment` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`shipment_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`shipment_id` AS `%s__%s__shipment_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`shipment_number` AS `%s__%s__shipment_number`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`transaction_id` AS `%s__%s__transaction_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`from_company_id` AS `%s__%s__from_company_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`from_contact_id` AS `%s__%s__from_contact_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`from_address_id` AS `%s__%s__from_address_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`to_company_id` AS `%s__%s__to_company_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`to_contact_id` AS `%s__%s__to_contact_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`to_address_id` AS `%s__%s__to_address_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`courier_id` AS `%s__%s__courier_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`tracking_number` AS `%s__%s__tracking_number`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`ship_date` AS `%s__%s__ship_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`shipped_flag` AS `%s__%s__shipped_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'transaction_id':
try {
Transaction::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'from_company_id':
try {
Company::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'from_contact_id':
try {
Contact::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'from_address_id':
try {
Address::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'to_company_id':
try {
Company::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'to_contact_id':
try {
Contact::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'to_address_id':
try {
Address::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'courier_id':
try {
Courier::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
//.........这里部分代码省略.........
示例7: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `asset_transaction` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`asset_transaction_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`asset_transaction_id` AS `%s__%s__asset_transaction_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`asset_id` AS `%s__%s__asset_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`transaction_id` AS `%s__%s__transaction_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`parent_asset_transaction_id` AS `%s__%s__parent_asset_transaction_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`source_location_id` AS `%s__%s__source_location_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`destination_location_id` AS `%s__%s__destination_location_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`new_asset_flag` AS `%s__%s__new_asset_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`new_asset_id` AS `%s__%s__new_asset_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`schedule_receipt_flag` AS `%s__%s__schedule_receipt_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`schedule_receipt_due_date` AS `%s__%s__schedule_receipt_due_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'asset_id':
try {
Asset::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'transaction_id':
try {
Transaction::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'parent_asset_transaction_id':
try {
AssetTransaction::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'source_location_id':
try {
Location::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'destination_location_id':
try {
Location::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'new_asset_id':
try {
Asset::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
//.........这里部分代码省略.........
示例8: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `attachment` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`attachment_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`attachment_id` AS `%s__%s__attachment_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`entity_qtype_id` AS `%s__%s__entity_qtype_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`entity_id` AS `%s__%s__entity_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`filename` AS `%s__%s__filename`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`tmp_filename` AS `%s__%s__tmp_filename`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`file_type` AS `%s__%s__file_type`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`path` AS `%s__%s__path`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`SIZE` AS `%s__%s__SIZE`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例9: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `custom_field` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`custom_field_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`custom_field_id` AS `%s__%s__custom_field_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`custom_field_qtype_id` AS `%s__%s__custom_field_qtype_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`default_custom_field_value_id` AS `%s__%s__default_custom_field_value_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`short_description` AS `%s__%s__short_description`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`active_flag` AS `%s__%s__active_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`required_flag` AS `%s__%s__required_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`all_asset_models_flag` AS `%s__%s__all_asset_models_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`searchable_flag` AS `%s__%s__searchable_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'default_custom_field_value_id':
try {
CustomFieldValue::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例10: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `contact` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`contact_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`contact_id` AS `%s__%s__contact_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`company_id` AS `%s__%s__company_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`address_id` AS `%s__%s__address_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`first_name` AS `%s__%s__first_name`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`last_name` AS `%s__%s__last_name`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`title` AS `%s__%s__title`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`email` AS `%s__%s__email`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`phone_office` AS `%s__%s__phone_office`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`phone_home` AS `%s__%s__phone_home`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`phone_mobile` AS `%s__%s__phone_mobile`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`fax` AS `%s__%s__fax`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`description` AS `%s__%s__description`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'company_id':
try {
Company::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'address_id':
try {
Address::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例11: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `asset_transaction_checkout` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`asset_transaction_checkout_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`asset_transaction_checkout_id` AS `%s__%s__asset_transaction_checkout_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`asset_transaction_id` AS `%s__%s__asset_transaction_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`to_contact_id` AS `%s__%s__to_contact_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`to_user_id` AS `%s__%s__to_user_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`due_date` AS `%s__%s__due_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'asset_transaction_id':
try {
AssetTransaction::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'to_contact_id':
try {
Contact::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'to_user_id':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例12: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `user_account` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`user_account_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`user_account_id` AS `%s__%s__user_account_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`first_name` AS `%s__%s__first_name`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`last_name` AS `%s__%s__last_name`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`username` AS `%s__%s__username`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`password_hash` AS `%s__%s__password_hash`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`email_address` AS `%s__%s__email_address`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`active_flag` AS `%s__%s__active_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`admin_flag` AS `%s__%s__admin_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`portable_access_flag` AS `%s__%s__portable_access_flag`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`portable_user_pin` AS `%s__%s__portable_user_pin`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`role_id` AS `%s__%s__role_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`created_by` AS `%s__%s__created_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`creation_date` AS `%s__%s__creation_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_by` AS `%s__%s__modified_by`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`modified_date` AS `%s__%s__modified_date`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'role_id':
try {
Role::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'created_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'modified_by':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}
示例13: ExpandQuery
/**
* Internally called method to assist with early binding of objects
* on load methods. Can only early-bind references that this class owns in the database.
* @param string $strParentAlias the alias of the parent (if any)
* @param string $strAlias the alias of this object
* @param array $objExpansionMap map of referenced columns to be immediately expanded via early-binding
* @param QueryExpansion an already instantiated QueryExpansion object (used as a utility object to assist with object expansion)
*/
public static function ExpandQuery($strParentAlias, $strAlias, $objExpansionMap, QQueryExpansion $objQueryExpansion)
{
if ($strAlias) {
$objQueryExpansion->AddFromItem(sprintf('LEFT JOIN `notification_user_account` AS `%s__%s` ON `%s`.`%s` = `%s__%s`.`notification_user_account_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`notification_user_account_id` AS `%s__%s__notification_user_account_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`user_account_id` AS `%s__%s__user_account_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`notification_id` AS `%s__%s__notification_id`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$objQueryExpansion->AddSelectItem(sprintf('`%s__%s`.`level` AS `%s__%s__level`', $strParentAlias, $strAlias, $strParentAlias, $strAlias));
$strParentAlias = $strParentAlias . '__' . $strAlias;
}
if (is_array($objExpansionMap)) {
foreach ($objExpansionMap as $strKey => $objValue) {
switch ($strKey) {
case 'user_account_id':
try {
UserAccount::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
case 'notification_id':
try {
Notification::ExpandQuery($strParentAlias, $strKey, $objValue, $objQueryExpansion);
break;
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
default:
throw new QCallerException(sprintf('Unknown Object to Expand in %s: %s', $strParentAlias, $strKey));
}
}
}
}