Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 31

Přidáno uživatelem Tomáš Dulík před více než 16 roky(ů)

Zobrazit rozdíly:

freenetis/trunk/wwwroot/includes/data_classes/generated/MemberGen.class.php
$strAliasPrefix = 'member__';
if ((array_key_exists($strAliasPrefix . 'creditmodasid__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'creditmodasid__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objCreditModAsIdArray)) {
$objPreviousChildItem = $objPreviousItem->_objCreditModAsIdArray[$intPreviousChildItemCount - 1];
$objChildItem = CreditMod::InstantiateDbRow($objDbRow, $strAliasPrefix . 'creditmodasid__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ((array_key_exists($strAliasPrefix . 'accountasidowner__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'accountasidowner__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objAccountAsIDOwnerArray)) {
$objPreviousChildItem = $objPreviousItem->_objAccountAsIDOwnerArray[$intPreviousChildItemCount - 1];
$objChildItem = Account::InstantiateDbRow($objDbRow, $strAliasPrefix . 'accountasidowner__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ($objChildItem)
array_push($objPreviousItem->_objCreditModAsIdArray, $objChildItem);
array_push($objPreviousItem->_objAccountAsIDOwnerArray, $objChildItem);
} else
array_push($objPreviousItem->_objCreditModAsIdArray, CreditMod::InstantiateDbRow($objDbRow, $strAliasPrefix . 'creditmodasid__', $strExpandAsArrayNodes));
array_push($objPreviousItem->_objAccountAsIDOwnerArray, Account::InstantiateDbRow($objDbRow, $strAliasPrefix . 'accountasidowner__', $strExpandAsArrayNodes));
$blnExpandedViaArray = true;
}
if ((array_key_exists($strAliasPrefix . 'paymentassignmentasid__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'paymentassignmentasid__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objPaymentAssignmentAsIdArray)) {
$objPreviousChildItem = $objPreviousItem->_objPaymentAssignmentAsIdArray[$intPreviousChildItemCount - 1];
$objChildItem = PaymentAssignment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentassignmentasid__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ($objChildItem)
array_push($objPreviousItem->_objPaymentAssignmentAsIdArray, $objChildItem);
} else
array_push($objPreviousItem->_objPaymentAssignmentAsIdArray, PaymentAssignment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentassignmentasid__', $strExpandAsArrayNodes));
$blnExpandedViaArray = true;
}
if ((array_key_exists($strAliasPrefix . 'paymentassignmentasidpayment__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'paymentassignmentasidpayment__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objPaymentAssignmentAsIDPaymentArray)) {
$objPreviousChildItem = $objPreviousItem->_objPaymentAssignmentAsIDPaymentArray[$intPreviousChildItemCount - 1];
$objChildItem = PaymentAssignment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentassignmentasidpayment__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ($objChildItem)
array_push($objPreviousItem->_objPaymentAssignmentAsIDPaymentArray, $objChildItem);
} else
array_push($objPreviousItem->_objPaymentAssignmentAsIDPaymentArray, PaymentAssignment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentassignmentasidpayment__', $strExpandAsArrayNodes));
$blnExpandedViaArray = true;
}
if ((array_key_exists($strAliasPrefix . 'userasid__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'userasid__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objUserAsIdArray)) {
......
// Check for CreditModAsId Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'creditmodasid__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'creditmodasid__ID', $strExpandAsArrayNodes)))
array_push($objToReturn->_objCreditModAsIdArray, CreditMod::InstantiateDbRow($objDbRow, $strAliasPrefix . 'creditmodasid__', $strExpandAsArrayNodes));
// Check for AccountAsIDOwner Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'accountasidowner__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'accountasidowner__ID', $strExpandAsArrayNodes)))
array_push($objToReturn->_objAccountAsIDOwnerArray, Account::InstantiateDbRow($objDbRow, $strAliasPrefix . 'accountasidowner__', $strExpandAsArrayNodes));
else
$objToReturn->_objCreditModAsId = CreditMod::InstantiateDbRow($objDbRow, $strAliasPrefix . 'creditmodasid__', $strExpandAsArrayNodes);
$objToReturn->_objAccountAsIDOwner = Account::InstantiateDbRow($objDbRow, $strAliasPrefix . 'accountasidowner__', $strExpandAsArrayNodes);
}
// Check for PaymentAssignmentAsId Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'paymentassignmentasid__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'paymentassignmentasid__ID', $strExpandAsArrayNodes)))
array_push($objToReturn->_objPaymentAssignmentAsIdArray, PaymentAssignment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentassignmentasid__', $strExpandAsArrayNodes));
else
$objToReturn->_objPaymentAssignmentAsId = PaymentAssignment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentassignmentasid__', $strExpandAsArrayNodes);
}
// Check for PaymentAssignmentAsIDPayment Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'paymentassignmentasidpayment__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'paymentassignmentasidpayment__ID', $strExpandAsArrayNodes)))
array_push($objToReturn->_objPaymentAssignmentAsIDPaymentArray, PaymentAssignment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentassignmentasidpayment__', $strExpandAsArrayNodes));
else
$objToReturn->_objPaymentAssignmentAsIDPayment = PaymentAssignment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentassignmentasidpayment__', $strExpandAsArrayNodes);
}
// Check for UserAsId Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'userasid__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'userasid__ID', $strExpandAsArrayNodes)))
......
// (If restored via a "Many-to" expansion)
////////////////////////////
case '_CreditModAsId':
case '_AccountAsIDOwner':
/**
* Gets the value for the private _objCreditModAsId (Read-Only)
* if set due to an expansion on the credit_mod.ID_member reverse relationship
* @return CreditMod
* Gets the value for the private _objAccountAsIDOwner (Read-Only)
* if set due to an expansion on the account.ID_owner reverse relationship
* @return Account
*/
return $this->_objCreditModAsId;
return $this->_objAccountAsIDOwner;
case '_CreditModAsIdArray':
case '_AccountAsIDOwnerArray':
/**
* Gets the value for the private _objCreditModAsIdArray (Read-Only)
* if set due to an ExpandAsArray on the credit_mod.ID_member reverse relationship
* @return CreditMod[]
* Gets the value for the private _objAccountAsIDOwnerArray (Read-Only)
* if set due to an ExpandAsArray on the account.ID_owner reverse relationship
* @return Account[]
*/
return (array) $this->_objCreditModAsIdArray;
return (array) $this->_objAccountAsIDOwnerArray;
case '_PaymentAssignmentAsId':
/**
* Gets the value for the private _objPaymentAssignmentAsId (Read-Only)
* if set due to an expansion on the payment_assignment.ID_member reverse relationship
* @return PaymentAssignment
*/
return $this->_objPaymentAssignmentAsId;
case '_PaymentAssignmentAsIdArray':
/**
* Gets the value for the private _objPaymentAssignmentAsIdArray (Read-Only)
* if set due to an ExpandAsArray on the payment_assignment.ID_member reverse relationship
* @return PaymentAssignment[]
*/
return (array) $this->_objPaymentAssignmentAsIdArray;
case '_PaymentAssignmentAsIDPayment':
/**
* Gets the value for the private _objPaymentAssignmentAsIDPayment (Read-Only)
* if set due to an expansion on the payment_assignment.ID_payment reverse relationship
* @return PaymentAssignment
*/
return $this->_objPaymentAssignmentAsIDPayment;
case '_PaymentAssignmentAsIDPaymentArray':
/**
* Gets the value for the private _objPaymentAssignmentAsIDPaymentArray (Read-Only)
* if set due to an ExpandAsArray on the payment_assignment.ID_payment reverse relationship
* @return PaymentAssignment[]
*/
return (array) $this->_objPaymentAssignmentAsIDPaymentArray;
case '_UserAsId':
/**
* Gets the value for the private _objUserAsId (Read-Only)
......
// Related Objects' Methods for CreditModAsId
// Related Objects' Methods for AccountAsIDOwner
//-------------------------------------------------------------------
/**
* Gets all associated CreditModsAsId as an array of CreditMod objects
* Gets all associated AccountsAsIDOwner as an array of Account objects
* @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
* @return CreditMod[]
* @return Account[]
*/
public function GetCreditModAsIdArray($objOptionalClauses = null) {
public function GetAccountAsIDOwnerArray($objOptionalClauses = null) {
if ((is_null($this->intId)))
return array();
try {
return CreditMod::LoadArrayByIDMember($this->intId, $objOptionalClauses);
return Account::LoadArrayByIDOwner($this->intId, $objOptionalClauses);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
......
}
/**
* Counts all associated CreditModsAsId
* Counts all associated AccountsAsIDOwner
* @return int
*/
public function CountCreditModsAsId() {
public function CountAccountsAsIDOwner() {
if ((is_null($this->intId)))
return 0;
return CreditMod::CountByIDMember($this->intId);
return Account::CountByIDOwner($this->intId);
}
/**
* Associates a CreditModAsId
* @param CreditMod $objCreditMod
* Associates a AccountAsIDOwner
* @param Account $objAccount
* @return void
*/
public function AssociateCreditModAsId(CreditMod $objCreditMod) {
public function AssociateAccountAsIDOwner(Account $objAccount) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateCreditModAsId on this unsaved Member.');
if ((is_null($objCreditMod->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateCreditModAsId on this Member with an unsaved CreditMod.');
throw new QUndefinedPrimaryKeyException('Unable to call AssociateAccountAsIDOwner on this unsaved Member.');
if ((is_null($objAccount->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateAccountAsIDOwner on this Member with an unsaved Account.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`credit_mod`
`account`
SET
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID_owner` = ' . $objDatabase->SqlVariable($this->intId) . '
WHERE
`ID` = ' . $objDatabase->SqlVariable($objCreditMod->Id) . '
`ID` = ' . $objDatabase->SqlVariable($objAccount->Id) . '
');
}
/**
* Unassociates a CreditModAsId
* @param CreditMod $objCreditMod
* Unassociates a AccountAsIDOwner
* @param Account $objAccount
* @return void
*/
public function UnassociateCreditModAsId(CreditMod $objCreditMod) {
public function UnassociateAccountAsIDOwner(Account $objAccount) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsId on this unsaved Member.');
if ((is_null($objCreditMod->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsId on this Member with an unsaved CreditMod.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAccountAsIDOwner on this unsaved Member.');
if ((is_null($objAccount->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAccountAsIDOwner on this Member with an unsaved Account.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`credit_mod`
`account`
SET
`ID_member` = null
`ID_owner` = null
WHERE
`ID` = ' . $objDatabase->SqlVariable($objCreditMod->Id) . ' AND
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID` = ' . $objDatabase->SqlVariable($objAccount->Id) . ' AND
`ID_owner` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Unassociates all CreditModsAsId
* Unassociates all AccountsAsIDOwner
* @return void
*/
public function UnassociateAllCreditModsAsId() {
public function UnassociateAllAccountsAsIDOwner() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsId on this unsaved Member.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAccountAsIDOwner on this unsaved Member.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`credit_mod`
`account`
SET
`ID_member` = null
`ID_owner` = null
WHERE
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID_owner` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes an associated CreditModAsId
* @param CreditMod $objCreditMod
* Deletes an associated AccountAsIDOwner
* @param Account $objAccount
* @return void
*/
public function DeleteAssociatedCreditModAsId(CreditMod $objCreditMod) {
public function DeleteAssociatedAccountAsIDOwner(Account $objAccount) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsId on this unsaved Member.');
if ((is_null($objCreditMod->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsId on this Member with an unsaved CreditMod.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAccountAsIDOwner on this unsaved Member.');
if ((is_null($objAccount->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAccountAsIDOwner on this Member with an unsaved Account.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`credit_mod`
`account`
WHERE
`ID` = ' . $objDatabase->SqlVariable($objCreditMod->Id) . ' AND
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID` = ' . $objDatabase->SqlVariable($objAccount->Id) . ' AND
`ID_owner` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes all associated CreditModsAsId
* Deletes all associated AccountsAsIDOwner
* @return void
*/
public function DeleteAllCreditModsAsId() {
public function DeleteAllAccountsAsIDOwner() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsId on this unsaved Member.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateAccountAsIDOwner on this unsaved Member.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`credit_mod`
`account`
WHERE
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID_owner` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
// Related Objects' Methods for PaymentAssignmentAsId
//-------------------------------------------------------------------
/**
* Gets all associated PaymentAssignmentsAsId as an array of PaymentAssignment objects
* @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
* @return PaymentAssignment[]
*/
public function GetPaymentAssignmentAsIdArray($objOptionalClauses = null) {
if ((is_null($this->intId)))
return array();
try {
return PaymentAssignment::LoadArrayByIDMember($this->intId, $objOptionalClauses);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
/**
* Counts all associated PaymentAssignmentsAsId
* @return int
*/
public function CountPaymentAssignmentsAsId() {
if ((is_null($this->intId)))
return 0;
return PaymentAssignment::CountByIDMember($this->intId);
}
/**
* Associates a PaymentAssignmentAsId
* @param PaymentAssignment $objPaymentAssignment
* @return void
*/
public function AssociatePaymentAssignmentAsId(PaymentAssignment $objPaymentAssignment) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociatePaymentAssignmentAsId on this unsaved Member.');
if ((is_null($objPaymentAssignment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociatePaymentAssignmentAsId on this Member with an unsaved PaymentAssignment.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment_assignment`
SET
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPaymentAssignment->Id) . '
');
}
/**
* Unassociates a PaymentAssignmentAsId
* @param PaymentAssignment $objPaymentAssignment
* @return void
*/
public function UnassociatePaymentAssignmentAsId(PaymentAssignment $objPaymentAssignment) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsId on this unsaved Member.');
if ((is_null($objPaymentAssignment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsId on this Member with an unsaved PaymentAssignment.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment_assignment`
SET
`ID_member` = null
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPaymentAssignment->Id) . ' AND
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Unassociates all PaymentAssignmentsAsId
* @return void
*/
public function UnassociateAllPaymentAssignmentsAsId() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsId on this unsaved Member.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment_assignment`
SET
`ID_member` = null
WHERE
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes an associated PaymentAssignmentAsId
* @param PaymentAssignment $objPaymentAssignment
* @return void
*/
public function DeleteAssociatedPaymentAssignmentAsId(PaymentAssignment $objPaymentAssignment) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsId on this unsaved Member.');
if ((is_null($objPaymentAssignment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsId on this Member with an unsaved PaymentAssignment.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`payment_assignment`
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPaymentAssignment->Id) . ' AND
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes all associated PaymentAssignmentsAsId
* @return void
*/
public function DeleteAllPaymentAssignmentsAsId() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsId on this unsaved Member.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`payment_assignment`
WHERE
`ID_member` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
// Related Objects' Methods for PaymentAssignmentAsIDPayment
//-------------------------------------------------------------------
/**
* Gets all associated PaymentAssignmentsAsIDPayment as an array of PaymentAssignment objects
* @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
* @return PaymentAssignment[]
*/
public function GetPaymentAssignmentAsIDPaymentArray($objOptionalClauses = null) {
if ((is_null($this->intId)))
return array();
try {
return PaymentAssignment::LoadArrayByIDPayment($this->intId, $objOptionalClauses);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
}
}
/**
* Counts all associated PaymentAssignmentsAsIDPayment
* @return int
*/
public function CountPaymentAssignmentsAsIDPayment() {
if ((is_null($this->intId)))
return 0;
return PaymentAssignment::CountByIDPayment($this->intId);
}
/**
* Associates a PaymentAssignmentAsIDPayment
* @param PaymentAssignment $objPaymentAssignment
* @return void
*/
public function AssociatePaymentAssignmentAsIDPayment(PaymentAssignment $objPaymentAssignment) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociatePaymentAssignmentAsIDPayment on this unsaved Member.');
if ((is_null($objPaymentAssignment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociatePaymentAssignmentAsIDPayment on this Member with an unsaved PaymentAssignment.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment_assignment`
SET
`ID_payment` = ' . $objDatabase->SqlVariable($this->intId) . '
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPaymentAssignment->Id) . '
');
}
/**
* Unassociates a PaymentAssignmentAsIDPayment
* @param PaymentAssignment $objPaymentAssignment
* @return void
*/
public function UnassociatePaymentAssignmentAsIDPayment(PaymentAssignment $objPaymentAssignment) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsIDPayment on this unsaved Member.');
if ((is_null($objPaymentAssignment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsIDPayment on this Member with an unsaved PaymentAssignment.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment_assignment`
SET
`ID_payment` = null
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPaymentAssignment->Id) . ' AND
`ID_payment` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Unassociates all PaymentAssignmentsAsIDPayment
* @return void
*/
public function UnassociateAllPaymentAssignmentsAsIDPayment() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsIDPayment on this unsaved Member.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment_assignment`
SET
`ID_payment` = null
WHERE
`ID_payment` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes an associated PaymentAssignmentAsIDPayment
* @param PaymentAssignment $objPaymentAssignment
* @return void
*/
public function DeleteAssociatedPaymentAssignmentAsIDPayment(PaymentAssignment $objPaymentAssignment) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsIDPayment on this unsaved Member.');
if ((is_null($objPaymentAssignment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsIDPayment on this Member with an unsaved PaymentAssignment.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`payment_assignment`
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPaymentAssignment->Id) . ' AND
`ID_payment` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes all associated PaymentAssignmentsAsIDPayment
* @return void
*/
public function DeleteAllPaymentAssignmentsAsIDPayment() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAssignmentAsIDPayment on this unsaved Member.');
// Get the Database Object for this Class
$objDatabase = Member::GetDatabase();
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`payment_assignment`
WHERE
`ID_payment` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
// Related Objects' Methods for UserAsId
//-------------------------------------------------------------------
......
/**
* Private member variable that stores a reference to a single CreditModAsId object
* (of type CreditMod), if this Member object was restored with
* an expansion on the credit_mod association table.
* @var CreditMod _objCreditModAsId;
* Private member variable that stores a reference to a single AccountAsIDOwner object
* (of type Account), if this Member object was restored with
* an expansion on the account association table.
* @var Account _objAccountAsIDOwner;
*/
private $_objCreditModAsId;
private $_objAccountAsIDOwner;
/**
* Private member variable that stores a reference to an array of CreditModAsId objects
* (of type CreditMod[]), if this Member object was restored with
* an ExpandAsArray on the credit_mod association table.
* @var CreditMod[] _objCreditModAsIdArray;
* Private member variable that stores a reference to an array of AccountAsIDOwner objects
* (of type Account[]), if this Member object was restored with
* an ExpandAsArray on the account association table.
* @var Account[] _objAccountAsIDOwnerArray;
*/
private $_objCreditModAsIdArray = array();
private $_objAccountAsIDOwnerArray = array();
/**
* Private member variable that stores a reference to a single PaymentAssignmentAsId object
* (of type PaymentAssignment), if this Member object was restored with
* an expansion on the payment_assignment association table.
* @var PaymentAssignment _objPaymentAssignmentAsId;
*/
private $_objPaymentAssignmentAsId;
/**
* Private member variable that stores a reference to an array of PaymentAssignmentAsId objects
* (of type PaymentAssignment[]), if this Member object was restored with
* an ExpandAsArray on the payment_assignment association table.
* @var PaymentAssignment[] _objPaymentAssignmentAsIdArray;
*/
private $_objPaymentAssignmentAsIdArray = array();
/**
* Private member variable that stores a reference to a single PaymentAssignmentAsIDPayment object
* (of type PaymentAssignment), if this Member object was restored with
* an expansion on the payment_assignment association table.
* @var PaymentAssignment _objPaymentAssignmentAsIDPayment;
*/
private $_objPaymentAssignmentAsIDPayment;
/**
* Private member variable that stores a reference to an array of PaymentAssignmentAsIDPayment objects
* (of type PaymentAssignment[]), if this Member object was restored with
* an ExpandAsArray on the payment_assignment association table.
* @var PaymentAssignment[] _objPaymentAssignmentAsIDPaymentArray;
*/
private $_objPaymentAssignmentAsIDPaymentArray = array();
/**
* Private member variable that stores a reference to a single UserAsId object
* (of type User), if this Member object was restored with
* an expansion on the user association table.
......
return new QQNode('entrance_date', 'QDateTime', $this);
case 'Comment':
return new QQNode('comment', 'string', $this);
case 'CreditModAsId':
return new QQReverseReferenceNodeCreditMod($this, 'creditmodasid', 'reverse_reference', 'ID_member');
case 'PaymentAssignmentAsId':
return new QQReverseReferenceNodePaymentAssignment($this, 'paymentassignmentasid', 'reverse_reference', 'ID_member');
case 'PaymentAssignmentAsIDPayment':
return new QQReverseReferenceNodePaymentAssignment($this, 'paymentassignmentasidpayment', 'reverse_reference', 'ID_payment');
case 'AccountAsIDOwner':
return new QQReverseReferenceNodeAccount($this, 'accountasidowner', 'reverse_reference', 'ID_owner');
case 'UserAsId':
return new QQReverseReferenceNodeUser($this, 'userasid', 'reverse_reference', 'ID_member');
......
return new QQNode('entrance_date', 'QDateTime', $this);
case 'Comment':
return new QQNode('comment', 'string', $this);
case 'CreditModAsId':
return new QQReverseReferenceNodeCreditMod($this, 'creditmodasid', 'reverse_reference', 'ID_member');
case 'PaymentAssignmentAsId':
return new QQReverseReferenceNodePaymentAssignment($this, 'paymentassignmentasid', 'reverse_reference', 'ID_member');
case 'PaymentAssignmentAsIDPayment':
return new QQReverseReferenceNodePaymentAssignment($this, 'paymentassignmentasidpayment', 'reverse_reference', 'ID_payment');
case 'AccountAsIDOwner':
return new QQReverseReferenceNodeAccount($this, 'accountasidowner', 'reverse_reference', 'ID_owner');
case 'UserAsId':
return new QQReverseReferenceNodeUser($this, 'userasid', 'reverse_reference', 'ID_member');
freenetis/trunk/wwwroot/includes/data_classes/generated/UserGen.class.php
$blnExpandedViaArray = true;
}
if ((array_key_exists($strAliasPrefix . 'creditmodasidadmin__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'creditmodasidadmin__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objCreditModAsIDAdminArray)) {
$objPreviousChildItem = $objPreviousItem->_objCreditModAsIDAdminArray[$intPreviousChildItemCount - 1];
$objChildItem = CreditMod::InstantiateDbRow($objDbRow, $strAliasPrefix . 'creditmodasidadmin__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ($objChildItem)
array_push($objPreviousItem->_objCreditModAsIDAdminArray, $objChildItem);
} else
array_push($objPreviousItem->_objCreditModAsIDAdminArray, CreditMod::InstantiateDbRow($objDbRow, $strAliasPrefix . 'creditmodasidadmin__', $strExpandAsArrayNodes));
$blnExpandedViaArray = true;
}
if ((array_key_exists($strAliasPrefix . 'deviceasid__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'deviceasid__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objDeviceAsIdArray)) {
......
$blnExpandedViaArray = true;
}
if ((array_key_exists($strAliasPrefix . 'paymentasidpayer__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'paymentasidpayer__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objPaymentAsIDPayerArray)) {
$objPreviousChildItem = $objPreviousItem->_objPaymentAsIDPayerArray[$intPreviousChildItemCount - 1];
$objChildItem = Payment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentasidpayer__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ((array_key_exists($strAliasPrefix . 'workasid__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'workasid__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objWorkAsIdArray)) {
$objPreviousChildItem = $objPreviousItem->_objWorkAsIdArray[$intPreviousChildItemCount - 1];
$objChildItem = Work::InstantiateDbRow($objDbRow, $strAliasPrefix . 'workasid__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ($objChildItem)
array_push($objPreviousItem->_objPaymentAsIDPayerArray, $objChildItem);
array_push($objPreviousItem->_objWorkAsIdArray, $objChildItem);
} else
array_push($objPreviousItem->_objPaymentAsIDPayerArray, Payment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentasidpayer__', $strExpandAsArrayNodes));
array_push($objPreviousItem->_objWorkAsIdArray, Work::InstantiateDbRow($objDbRow, $strAliasPrefix . 'workasid__', $strExpandAsArrayNodes));
$blnExpandedViaArray = true;
}
if ((array_key_exists($strAliasPrefix . 'workasidconfirmedby__ID', $strExpandAsArrayNodes)) &&
(!is_null($objDbRow->GetColumn($strAliasPrefix . 'workasidconfirmedby__ID')))) {
if ($intPreviousChildItemCount = count($objPreviousItem->_objWorkAsIDConfirmedByArray)) {
$objPreviousChildItem = $objPreviousItem->_objWorkAsIDConfirmedByArray[$intPreviousChildItemCount - 1];
$objChildItem = Work::InstantiateDbRow($objDbRow, $strAliasPrefix . 'workasidconfirmedby__', $strExpandAsArrayNodes, $objPreviousChildItem);
if ($objChildItem)
array_push($objPreviousItem->_objWorkAsIDConfirmedByArray, $objChildItem);
} else
array_push($objPreviousItem->_objWorkAsIDConfirmedByArray, Work::InstantiateDbRow($objDbRow, $strAliasPrefix . 'workasidconfirmedby__', $strExpandAsArrayNodes));
$blnExpandedViaArray = true;
}
// Either return false to signal array expansion, or check-to-reset the Alias prefix and move on
if ($blnExpandedViaArray)
return false;
......
$objToReturn->_objContactAsId = Contact::InstantiateDbRow($objDbRow, $strAliasPrefix . 'contactasid__', $strExpandAsArrayNodes);
}
// Check for CreditModAsIDAdmin Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'creditmodasidadmin__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'creditmodasidadmin__ID', $strExpandAsArrayNodes)))
array_push($objToReturn->_objCreditModAsIDAdminArray, CreditMod::InstantiateDbRow($objDbRow, $strAliasPrefix . 'creditmodasidadmin__', $strExpandAsArrayNodes));
else
$objToReturn->_objCreditModAsIDAdmin = CreditMod::InstantiateDbRow($objDbRow, $strAliasPrefix . 'creditmodasidadmin__', $strExpandAsArrayNodes);
}
// Check for DeviceAsId Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'deviceasid__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'deviceasid__ID', $strExpandAsArrayNodes)))
......
$objToReturn->_objDeviceAsId = Device::InstantiateDbRow($objDbRow, $strAliasPrefix . 'deviceasid__', $strExpandAsArrayNodes);
}
// Check for PaymentAsIDPayer Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'paymentasidpayer__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'paymentasidpayer__ID', $strExpandAsArrayNodes)))
array_push($objToReturn->_objPaymentAsIDPayerArray, Payment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentasidpayer__', $strExpandAsArrayNodes));
// Check for WorkAsId Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'workasid__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'workasid__ID', $strExpandAsArrayNodes)))
array_push($objToReturn->_objWorkAsIdArray, Work::InstantiateDbRow($objDbRow, $strAliasPrefix . 'workasid__', $strExpandAsArrayNodes));
else
$objToReturn->_objPaymentAsIDPayer = Payment::InstantiateDbRow($objDbRow, $strAliasPrefix . 'paymentasidpayer__', $strExpandAsArrayNodes);
$objToReturn->_objWorkAsId = Work::InstantiateDbRow($objDbRow, $strAliasPrefix . 'workasid__', $strExpandAsArrayNodes);
}
// Check for WorkAsIDConfirmedBy Virtual Binding
if (!is_null($objDbRow->GetColumn($strAliasPrefix . 'workasidconfirmedby__ID'))) {
if (($strExpandAsArrayNodes) && (array_key_exists($strAliasPrefix . 'workasidconfirmedby__ID', $strExpandAsArrayNodes)))
array_push($objToReturn->_objWorkAsIDConfirmedByArray, Work::InstantiateDbRow($objDbRow, $strAliasPrefix . 'workasidconfirmedby__', $strExpandAsArrayNodes));
else
$objToReturn->_objWorkAsIDConfirmedBy = Work::InstantiateDbRow($objDbRow, $strAliasPrefix . 'workasidconfirmedby__', $strExpandAsArrayNodes);
}
return $objToReturn;
}
......
*/
return (array) $this->_objContactAsIdArray;
case '_CreditModAsIDAdmin':
/**
* Gets the value for the private _objCreditModAsIDAdmin (Read-Only)
* if set due to an expansion on the credit_mod.ID_user_admin reverse relationship
* @return CreditMod
*/
return $this->_objCreditModAsIDAdmin;
case '_CreditModAsIDAdminArray':
/**
* Gets the value for the private _objCreditModAsIDAdminArray (Read-Only)
* if set due to an ExpandAsArray on the credit_mod.ID_user_admin reverse relationship
* @return CreditMod[]
*/
return (array) $this->_objCreditModAsIDAdminArray;
case '_DeviceAsId':
/**
* Gets the value for the private _objDeviceAsId (Read-Only)
......
*/
return (array) $this->_objDeviceAsIdArray;
case '_PaymentAsIDPayer':
case '_WorkAsId':
/**
* Gets the value for the private _objPaymentAsIDPayer (Read-Only)
* if set due to an expansion on the payment.ID_payer reverse relationship
* @return Payment
* Gets the value for the private _objWorkAsId (Read-Only)
* if set due to an expansion on the work.ID_user reverse relationship
* @return Work
*/
return $this->_objPaymentAsIDPayer;
return $this->_objWorkAsId;
case '_PaymentAsIDPayerArray':
case '_WorkAsIdArray':
/**
* Gets the value for the private _objPaymentAsIDPayerArray (Read-Only)
* if set due to an ExpandAsArray on the payment.ID_payer reverse relationship
* @return Payment[]
* Gets the value for the private _objWorkAsIdArray (Read-Only)
* if set due to an ExpandAsArray on the work.ID_user reverse relationship
* @return Work[]
*/
return (array) $this->_objPaymentAsIDPayerArray;
return (array) $this->_objWorkAsIdArray;
case '_WorkAsIDConfirmedBy':
/**
* Gets the value for the private _objWorkAsIDConfirmedBy (Read-Only)
* if set due to an expansion on the work.ID_confirmed_by reverse relationship
* @return Work
*/
return $this->_objWorkAsIDConfirmedBy;
case '_WorkAsIDConfirmedByArray':
/**
* Gets the value for the private _objWorkAsIDConfirmedByArray (Read-Only)
* if set due to an ExpandAsArray on the work.ID_confirmed_by reverse relationship
* @return Work[]
*/
return (array) $this->_objWorkAsIDConfirmedByArray;
default:
try {
return parent::__get($strName);
......
// Related Objects' Methods for CreditModAsIDAdmin
// Related Objects' Methods for DeviceAsId
//-------------------------------------------------------------------
/**
* Gets all associated CreditModsAsIDAdmin as an array of CreditMod objects
* Gets all associated DevicesAsId as an array of Device objects
* @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
* @return CreditMod[]
* @return Device[]
*/
public function GetCreditModAsIDAdminArray($objOptionalClauses = null) {
public function GetDeviceAsIdArray($objOptionalClauses = null) {
if ((is_null($this->intId)))
return array();
try {
return CreditMod::LoadArrayByIDUserAdmin($this->intId, $objOptionalClauses);
return Device::LoadArrayByIDUser($this->intId, $objOptionalClauses);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
......
}
/**
* Counts all associated CreditModsAsIDAdmin
* Counts all associated DevicesAsId
* @return int
*/
public function CountCreditModsAsIDAdmin() {
public function CountDevicesAsId() {
if ((is_null($this->intId)))
return 0;
return CreditMod::CountByIDUserAdmin($this->intId);
return Device::CountByIDUser($this->intId);
}
/**
* Associates a CreditModAsIDAdmin
* @param CreditMod $objCreditMod
* Associates a DeviceAsId
* @param Device $objDevice
* @return void
*/
public function AssociateCreditModAsIDAdmin(CreditMod $objCreditMod) {
public function AssociateDeviceAsId(Device $objDevice) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateCreditModAsIDAdmin on this unsaved User.');
if ((is_null($objCreditMod->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateCreditModAsIDAdmin on this User with an unsaved CreditMod.');
throw new QUndefinedPrimaryKeyException('Unable to call AssociateDeviceAsId on this unsaved User.');
if ((is_null($objDevice->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateDeviceAsId on this User with an unsaved Device.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`credit_mod`
`device`
SET
`ID_user_admin` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
WHERE
`ID` = ' . $objDatabase->SqlVariable($objCreditMod->Id) . '
`ID` = ' . $objDatabase->SqlVariable($objDevice->Id) . '
');
}
/**
* Unassociates a CreditModAsIDAdmin
* @param CreditMod $objCreditMod
* Unassociates a DeviceAsId
* @param Device $objDevice
* @return void
*/
public function UnassociateCreditModAsIDAdmin(CreditMod $objCreditMod) {
public function UnassociateDeviceAsId(Device $objDevice) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsIDAdmin on this unsaved User.');
if ((is_null($objCreditMod->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsIDAdmin on this User with an unsaved CreditMod.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this unsaved User.');
if ((is_null($objDevice->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this User with an unsaved Device.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`credit_mod`
`device`
SET
`ID_user_admin` = null
`ID_user` = null
WHERE
`ID` = ' . $objDatabase->SqlVariable($objCreditMod->Id) . ' AND
`ID_user_admin` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID` = ' . $objDatabase->SqlVariable($objDevice->Id) . ' AND
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Unassociates all CreditModsAsIDAdmin
* Unassociates all DevicesAsId
* @return void
*/
public function UnassociateAllCreditModsAsIDAdmin() {
public function UnassociateAllDevicesAsId() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsIDAdmin on this unsaved User.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this unsaved User.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`credit_mod`
`device`
SET
`ID_user_admin` = null
`ID_user` = null
WHERE
`ID_user_admin` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes an associated CreditModAsIDAdmin
* @param CreditMod $objCreditMod
* Deletes an associated DeviceAsId
* @param Device $objDevice
* @return void
*/
public function DeleteAssociatedCreditModAsIDAdmin(CreditMod $objCreditMod) {
public function DeleteAssociatedDeviceAsId(Device $objDevice) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsIDAdmin on this unsaved User.');
if ((is_null($objCreditMod->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsIDAdmin on this User with an unsaved CreditMod.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this unsaved User.');
if ((is_null($objDevice->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this User with an unsaved Device.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`credit_mod`
`device`
WHERE
`ID` = ' . $objDatabase->SqlVariable($objCreditMod->Id) . ' AND
`ID_user_admin` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID` = ' . $objDatabase->SqlVariable($objDevice->Id) . ' AND
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes all associated CreditModsAsIDAdmin
* Deletes all associated DevicesAsId
* @return void
*/
public function DeleteAllCreditModsAsIDAdmin() {
public function DeleteAllDevicesAsId() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateCreditModAsIDAdmin on this unsaved User.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this unsaved User.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`credit_mod`
`device`
WHERE
`ID_user_admin` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
// Related Objects' Methods for DeviceAsId
// Related Objects' Methods for WorkAsId
//-------------------------------------------------------------------
/**
* Gets all associated DevicesAsId as an array of Device objects
* Gets all associated WorksAsId as an array of Work objects
* @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
* @return Device[]
* @return Work[]
*/
public function GetDeviceAsIdArray($objOptionalClauses = null) {
public function GetWorkAsIdArray($objOptionalClauses = null) {
if ((is_null($this->intId)))
return array();
try {
return Device::LoadArrayByIDUser($this->intId, $objOptionalClauses);
return Work::LoadArrayByIDUser($this->intId, $objOptionalClauses);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
......
}
/**
* Counts all associated DevicesAsId
* Counts all associated WorksAsId
* @return int
*/
public function CountDevicesAsId() {
public function CountWorksAsId() {
if ((is_null($this->intId)))
return 0;
return Device::CountByIDUser($this->intId);
return Work::CountByIDUser($this->intId);
}
/**
* Associates a DeviceAsId
* @param Device $objDevice
* Associates a WorkAsId
* @param Work $objWork
* @return void
*/
public function AssociateDeviceAsId(Device $objDevice) {
public function AssociateWorkAsId(Work $objWork) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateDeviceAsId on this unsaved User.');
if ((is_null($objDevice->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateDeviceAsId on this User with an unsaved Device.');
throw new QUndefinedPrimaryKeyException('Unable to call AssociateWorkAsId on this unsaved User.');
if ((is_null($objWork->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateWorkAsId on this User with an unsaved Work.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`device`
`work`
SET
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
WHERE
`ID` = ' . $objDatabase->SqlVariable($objDevice->Id) . '
`ID` = ' . $objDatabase->SqlVariable($objWork->Id) . '
');
}
/**
* Unassociates a DeviceAsId
* @param Device $objDevice
* Unassociates a WorkAsId
* @param Work $objWork
* @return void
*/
public function UnassociateDeviceAsId(Device $objDevice) {
public function UnassociateWorkAsId(Work $objWork) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this unsaved User.');
if ((is_null($objDevice->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this User with an unsaved Device.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsId on this unsaved User.');
if ((is_null($objWork->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsId on this User with an unsaved Work.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`device`
`work`
SET
`ID_user` = null
WHERE
`ID` = ' . $objDatabase->SqlVariable($objDevice->Id) . ' AND
`ID` = ' . $objDatabase->SqlVariable($objWork->Id) . ' AND
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Unassociates all DevicesAsId
* Unassociates all WorksAsId
* @return void
*/
public function UnassociateAllDevicesAsId() {
public function UnassociateAllWorksAsId() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this unsaved User.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsId on this unsaved User.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`device`
`work`
SET
`ID_user` = null
WHERE
......
}
/**
* Deletes an associated DeviceAsId
* @param Device $objDevice
* Deletes an associated WorkAsId
* @param Work $objWork
* @return void
*/
public function DeleteAssociatedDeviceAsId(Device $objDevice) {
public function DeleteAssociatedWorkAsId(Work $objWork) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this unsaved User.');
if ((is_null($objDevice->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this User with an unsaved Device.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsId on this unsaved User.');
if ((is_null($objWork->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsId on this User with an unsaved Work.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`device`
`work`
WHERE
`ID` = ' . $objDatabase->SqlVariable($objDevice->Id) . ' AND
`ID` = ' . $objDatabase->SqlVariable($objWork->Id) . ' AND
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes all associated DevicesAsId
* Deletes all associated WorksAsId
* @return void
*/
public function DeleteAllDevicesAsId() {
public function DeleteAllWorksAsId() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateDeviceAsId on this unsaved User.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsId on this unsaved User.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`device`
`work`
WHERE
`ID_user` = ' . $objDatabase->SqlVariable($this->intId) . '
');
......
// Related Objects' Methods for PaymentAsIDPayer
// Related Objects' Methods for WorkAsIDConfirmedBy
//-------------------------------------------------------------------
/**
* Gets all associated PaymentsAsIDPayer as an array of Payment objects
* Gets all associated WorksAsIDConfirmedBy as an array of Work objects
* @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query
* @return Payment[]
* @return Work[]
*/
public function GetPaymentAsIDPayerArray($objOptionalClauses = null) {
public function GetWorkAsIDConfirmedByArray($objOptionalClauses = null) {
if ((is_null($this->intId)))
return array();
try {
return Payment::LoadArrayByIDPayer($this->intId, $objOptionalClauses);
return Work::LoadArrayByIDConfirmedBy($this->intId, $objOptionalClauses);
} catch (QCallerException $objExc) {
$objExc->IncrementOffset();
throw $objExc;
......
}
/**
* Counts all associated PaymentsAsIDPayer
* Counts all associated WorksAsIDConfirmedBy
* @return int
*/
public function CountPaymentsAsIDPayer() {
public function CountWorksAsIDConfirmedBy() {
if ((is_null($this->intId)))
return 0;
return Payment::CountByIDPayer($this->intId);
return Work::CountByIDConfirmedBy($this->intId);
}
/**
* Associates a PaymentAsIDPayer
* @param Payment $objPayment
* Associates a WorkAsIDConfirmedBy
* @param Work $objWork
* @return void
*/
public function AssociatePaymentAsIDPayer(Payment $objPayment) {
public function AssociateWorkAsIDConfirmedBy(Work $objWork) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociatePaymentAsIDPayer on this unsaved User.');
if ((is_null($objPayment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociatePaymentAsIDPayer on this User with an unsaved Payment.');
throw new QUndefinedPrimaryKeyException('Unable to call AssociateWorkAsIDConfirmedBy on this unsaved User.');
if ((is_null($objWork->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call AssociateWorkAsIDConfirmedBy on this User with an unsaved Work.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment`
`work`
SET
`ID_payer` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID_confirmed_by` = ' . $objDatabase->SqlVariable($this->intId) . '
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPayment->Id) . '
`ID` = ' . $objDatabase->SqlVariable($objWork->Id) . '
');
}
/**
* Unassociates a PaymentAsIDPayer
* @param Payment $objPayment
* Unassociates a WorkAsIDConfirmedBy
* @param Work $objWork
* @return void
*/
public function UnassociatePaymentAsIDPayer(Payment $objPayment) {
public function UnassociateWorkAsIDConfirmedBy(Work $objWork) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAsIDPayer on this unsaved User.');
if ((is_null($objPayment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAsIDPayer on this User with an unsaved Payment.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsIDConfirmedBy on this unsaved User.');
if ((is_null($objWork->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsIDConfirmedBy on this User with an unsaved Work.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment`
`work`
SET
`ID_payer` = null
`ID_confirmed_by` = null
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPayment->Id) . ' AND
`ID_payer` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID` = ' . $objDatabase->SqlVariable($objWork->Id) . ' AND
`ID_confirmed_by` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Unassociates all PaymentsAsIDPayer
* Unassociates all WorksAsIDConfirmedBy
* @return void
*/
public function UnassociateAllPaymentsAsIDPayer() {
public function UnassociateAllWorksAsIDConfirmedBy() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAsIDPayer on this unsaved User.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsIDConfirmedBy on this unsaved User.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
UPDATE
`payment`
`work`
SET
`ID_payer` = null
`ID_confirmed_by` = null
WHERE
`ID_payer` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID_confirmed_by` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes an associated PaymentAsIDPayer
* @param Payment $objPayment
* Deletes an associated WorkAsIDConfirmedBy
* @param Work $objWork
* @return void
*/
public function DeleteAssociatedPaymentAsIDPayer(Payment $objPayment) {
public function DeleteAssociatedWorkAsIDConfirmedBy(Work $objWork) {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAsIDPayer on this unsaved User.');
if ((is_null($objPayment->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAsIDPayer on this User with an unsaved Payment.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsIDConfirmedBy on this unsaved User.');
if ((is_null($objWork->Id)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsIDConfirmedBy on this User with an unsaved Work.');
// Get the Database Object for this Class
$objDatabase = User::GetDatabase();
......
// Perform the SQL Query
$objDatabase->NonQuery('
DELETE FROM
`payment`
`work`
WHERE
`ID` = ' . $objDatabase->SqlVariable($objPayment->Id) . ' AND
`ID_payer` = ' . $objDatabase->SqlVariable($this->intId) . '
`ID` = ' . $objDatabase->SqlVariable($objWork->Id) . ' AND
`ID_confirmed_by` = ' . $objDatabase->SqlVariable($this->intId) . '
');
}
/**
* Deletes all associated PaymentsAsIDPayer
* Deletes all associated WorksAsIDConfirmedBy
* @return void
*/
public function DeleteAllPaymentsAsIDPayer() {
public function DeleteAllWorksAsIDConfirmedBy() {
if ((is_null($this->intId)))
throw new QUndefinedPrimaryKeyException('Unable to call UnassociatePaymentAsIDPayer on this unsaved User.');
throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWorkAsIDConfirmedBy on this unsaved User.');
... Rozdílový soubor je zkrácen, protože jeho délka přesahuje max. limit.

Také k dispozici: Unified diff