/** * 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 'InventoryModelId': // Gets the value for intInventoryModelId (Read-Only PK) // @return integer return $this->intInventoryModelId; case 'CategoryId': // Gets the value for intCategoryId // @return integer return $this->intCategoryId; case 'ManufacturerId': // Gets the value for intManufacturerId // @return integer return $this->intManufacturerId; case 'InventoryModelCode': // Gets the value for strInventoryModelCode (Unique) // @return string return $this->strInventoryModelCode; case 'ShortDescription': // Gets the value for strShortDescription (Not Null) // @return string return $this->strShortDescription; case 'LongDescription': // Gets the value for strLongDescription // @return string return $this->strLongDescription; case 'ImagePath': // Gets the value for strImagePath // @return string return $this->strImagePath; case 'Price': // Gets the value for fltPrice // @return double return $this->fltPrice; 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; /////////////////// // Member Objects /////////////////// /////////////////// // Member Objects /////////////////// case 'Category': // Gets the value for the Category object referenced by intCategoryId // @return Category try { if (!$this->objCategory && !is_null($this->intCategoryId)) { $this->objCategory = Category::Load($this->intCategoryId); } return $this->objCategory; } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } case 'Manufacturer': // Gets the value for the Manufacturer object referenced by intManufacturerId // @return Manufacturer try { if (!$this->objManufacturer && !is_null($this->intManufacturerId)) { $this->objManufacturer = Manufacturer::Load($this->intManufacturerId); } return $this->objManufacturer; } 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 'InventoryModelCustomFieldHelper': // Gets the value for the InventoryModelCustomFieldHelper object that uniquely references this InventoryModel // by objInventoryModelCustomFieldHelper (Unique) // @return InventoryModelCustomFieldHelper try { if ($this->objInventoryModelCustomFieldHelper === false) { // We've attempted early binding -- and the reverse reference object does not exist return null; } if (!$this->objInventoryModelCustomFieldHelper) { $this->objInventoryModelCustomFieldHelper = InventoryModelCustomFieldHelper::LoadByInventoryModelId($this->intInventoryModelId); } return $this->objInventoryModelCustomFieldHelper; } 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 '_InventoryLocation': // Gets the value for the private _objInventoryLocation (Read-Only) // if set due to an expansion on the inventory_location.inventory_model_id reverse relationship // @return InventoryLocation return $this->_objInventoryLocation; case '_InventoryLocationArray': // Gets the value for the private _objInventoryLocationArray (Read-Only) // if set due to an ExpandAsArray on the inventory_location.inventory_model_id reverse relationship // @return InventoryLocation[] return (array) $this->_objInventoryLocationArray; case '__Restored': return $this->__blnRestored; default: try { return parent::__get($strName); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } } }