예제 #1
0
 /**
  * Override method to perform a property "Get"
  * This will get the value of $strName
  *
  * @param string $strName Name of the property to get
  * @return mixed
  */
 public function __get($strName)
 {
     switch ($strName) {
         ///////////////////
         // Member Variables
         ///////////////////
         case 'AssetId':
             // Gets the value for intAssetId (Read-Only PK)
             // @return integer
             return $this->intAssetId;
         case 'ParentAssetId':
             // Gets the value for intParentAssetId
             // @return integer
             return $this->intParentAssetId;
         case 'AssetModelId':
             // Gets the value for intAssetModelId (Not Null)
             // @return integer
             return $this->intAssetModelId;
         case 'LocationId':
             // Gets the value for intLocationId
             // @return integer
             return $this->intLocationId;
         case 'AssetCode':
             // Gets the value for strAssetCode (Unique)
             // @return string
             return $this->strAssetCode;
         case 'ImagePath':
             // Gets the value for strImagePath
             // @return string
             return $this->strImagePath;
         case 'CheckedOutFlag':
             // Gets the value for blnCheckedOutFlag
             // @return boolean
             return $this->blnCheckedOutFlag;
         case 'ReservedFlag':
             // Gets the value for blnReservedFlag
             // @return boolean
             return $this->blnReservedFlag;
         case 'LinkedFlag':
             // Gets the value for blnLinkedFlag
             // @return boolean
             return $this->blnLinkedFlag;
         case 'ArchivedFlag':
             // Gets the value for blnArchivedFlag
             // @return boolean
             return $this->blnArchivedFlag;
         case 'CreatedBy':
             // Gets the value for intCreatedBy
             // @return integer
             return $this->intCreatedBy;
         case 'CreationDate':
             // Gets the value for dttCreationDate
             // @return QDateTime
             return $this->dttCreationDate;
         case 'ModifiedBy':
             // Gets the value for intModifiedBy
             // @return integer
             return $this->intModifiedBy;
         case 'ModifiedDate':
             // Gets the value for strModifiedDate (Read-Only Timestamp)
             // @return string
             return $this->strModifiedDate;
         case 'DepreciationFlag':
             // Gets the value for blnDepreciationFlag
             // @return boolean
             return $this->blnDepreciationFlag;
         case 'PurchaseDate':
             // Gets the value for dttPurchaseDate
             // @return QDateTime
             return $this->dttPurchaseDate;
         case 'PurchaseCost':
             // Gets the value for fltPurchaseCost
             // @return double
             return $this->fltPurchaseCost;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'ParentAsset':
             // Gets the value for the Asset object referenced by intParentAssetId
             // @return Asset
             try {
                 if (!$this->objParentAsset && !is_null($this->intParentAssetId)) {
                     $this->objParentAsset = Asset::Load($this->intParentAssetId);
                 }
                 return $this->objParentAsset;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'AssetModel':
             // Gets the value for the AssetModel object referenced by intAssetModelId (Not Null)
             // @return AssetModel
             try {
                 if (!$this->objAssetModel && !is_null($this->intAssetModelId)) {
                     $this->objAssetModel = AssetModel::Load($this->intAssetModelId);
                 }
                 return $this->objAssetModel;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'Location':
             // Gets the value for the Location object referenced by intLocationId
             // @return Location
             try {
                 if (!$this->objLocation && !is_null($this->intLocationId)) {
                     $this->objLocation = Location::Load($this->intLocationId);
                 }
                 return $this->objLocation;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'CreatedByObject':
             // Gets the value for the UserAccount object referenced by intCreatedBy
             // @return UserAccount
             try {
                 if (!$this->objCreatedByObject && !is_null($this->intCreatedBy)) {
                     $this->objCreatedByObject = UserAccount::Load($this->intCreatedBy);
                 }
                 return $this->objCreatedByObject;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'ModifiedByObject':
             // Gets the value for the UserAccount object referenced by intModifiedBy
             // @return UserAccount
             try {
                 if (!$this->objModifiedByObject && !is_null($this->intModifiedBy)) {
                     $this->objModifiedByObject = UserAccount::Load($this->intModifiedBy);
                 }
                 return $this->objModifiedByObject;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
         case 'AssetCustomFieldHelper':
             // Gets the value for the AssetCustomFieldHelper object that uniquely references this Asset
             // by objAssetCustomFieldHelper (Unique)
             // @return AssetCustomFieldHelper
             try {
                 if ($this->objAssetCustomFieldHelper === false) {
                     // We've attempted early binding -- and the reverse reference object does not exist
                     return null;
                 }
                 if (!$this->objAssetCustomFieldHelper) {
                     $this->objAssetCustomFieldHelper = AssetCustomFieldHelper::LoadByAssetId($this->intAssetId);
                 }
                 return $this->objAssetCustomFieldHelper;
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
             ////////////////////////////
             // Virtual Object References (Many to Many and Reverse References)
             // (If restored via a "Many-to" expansion)
             ////////////////////////////
         ////////////////////////////
         // Virtual Object References (Many to Many and Reverse References)
         // (If restored via a "Many-to" expansion)
         ////////////////////////////
         case '_ChildAsset':
             // Gets the value for the private _objChildAsset (Read-Only)
             // if set due to an expansion on the asset.parent_asset_id reverse relationship
             // @return Asset
             return $this->_objChildAsset;
         case '_ChildAssetArray':
             // Gets the value for the private _objChildAssetArray (Read-Only)
             // if set due to an ExpandAsArray on the asset.parent_asset_id reverse relationship
             // @return Asset[]
             return (array) $this->_objChildAssetArray;
         case '_AssetTransaction':
             // Gets the value for the private _objAssetTransaction (Read-Only)
             // if set due to an expansion on the asset_transaction.asset_id reverse relationship
             // @return AssetTransaction
             return $this->_objAssetTransaction;
         case '_AssetTransactionArray':
             // Gets the value for the private _objAssetTransactionArray (Read-Only)
             // if set due to an ExpandAsArray on the asset_transaction.asset_id reverse relationship
             // @return AssetTransaction[]
             return (array) $this->_objAssetTransactionArray;
         case '_AssetTransactionAsNew':
             // Gets the value for the private _objAssetTransactionAsNew (Read-Only)
             // if set due to an expansion on the asset_transaction.new_asset_id reverse relationship
             // @return AssetTransaction
             return $this->_objAssetTransactionAsNew;
         case '_AssetTransactionAsNewArray':
             // Gets the value for the private _objAssetTransactionAsNewArray (Read-Only)
             // if set due to an ExpandAsArray on the asset_transaction.new_asset_id reverse relationship
             // @return AssetTransaction[]
             return (array) $this->_objAssetTransactionAsNewArray;
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }