예제 #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 'Id':
             /**
              * Gets the value for intId (Read-Only PK)
              * @return integer
              */
             return $this->intId;
         case 'ReferenceID':
             /**
              * Gets the value for intReferenceID (Not Null)
              * @return integer
              */
             return $this->intReferenceID;
         case 'Actor':
             /**
              * Gets the value for strActor 
              * @return string
              */
             return $this->strActor;
         case 'Director':
             /**
              * Gets the value for strDirector 
              * @return string
              */
             return $this->strDirector;
         case 'RunningTime':
             /**
              * Gets the value for fltRunningTime 
              * @return double
              */
             return $this->fltRunningTime;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'ReferenceIDObject':
             /**
              * Gets the value for the Articlecore object referenced by intReferenceID (Not Null)
              * @return Articlecore
              */
             try {
                 if (!$this->objReferenceIDObject && !is_null($this->intReferenceID)) {
                     $this->objReferenceIDObject = Articlecore::Load($this->intReferenceID);
                 }
                 return $this->objReferenceIDObject;
             } 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 '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
예제 #2
0
 /**
  * Reload this Articlecore from the database.
  * @return void
  */
 public function Reload()
 {
     // Make sure we are actually Restored from the database
     if (!$this->__blnRestored) {
         throw new QCallerException('Cannot call Reload() on a new, unsaved Articlecore object.');
     }
     // Reload the Object
     $objReloaded = Articlecore::Load($this->intId);
     // Update $this's local variables to match
     $this->strAsin = $objReloaded->strAsin;
     $this->strDetailPageURL = $objReloaded->strDetailPageURL;
     $this->strBinding = $objReloaded->strBinding;
     $this->strTitle = $objReloaded->strTitle;
     $this->ProductGroup = $objReloaded->ProductGroup;
     $this->strImageURL = $objReloaded->strImageURL;
 }
 /**
  * Static Helper Method to Create using PK arguments
  * You must pass in the PK arguments on an object to load, or leave it blank to create a new one.
  * If you want to load via QueryString or PathInfo, use the CreateFromQueryString or CreateFromPathInfo
  * static helper methods.  Finally, specify a CreateType to define whether or not we are only allowed to 
  * edit, or if we are also allowed to create a new one, etc.
  * 
  * @param mixed $objParentObject QForm or QPanel which will be using this ArticlecoreMetaControl
  * @param integer $intId primary key value
  * @param QMetaControlCreateType $intCreateType rules governing Articlecore object creation - defaults to CreateOrEdit
  * @return ArticlecoreMetaControl
  */
 public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit)
 {
     // Attempt to Load from PK Arguments
     if (strlen($intId)) {
         $objArticlecore = Articlecore::Load($intId);
         // Articlecore was found -- return it!
         if ($objArticlecore) {
             return new ArticlecoreMetaControl($objParentObject, $objArticlecore);
         } else {
             if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound) {
                 throw new QCallerException('Could not find a Articlecore object with PK arguments: ' . $intId);
             }
         }
         // If EditOnly is specified, throw an exception
     } else {
         if ($intCreateType == QMetaControlCreateType::EditOnly) {
             throw new QCallerException('No PK arguments specified');
         }
     }
     // If we are here, then we need to create a new record
     return new ArticlecoreMetaControl($objParentObject, new Articlecore());
 }
예제 #4
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 'Id':
             /**
              * Gets the value for intId (Read-Only PK)
              * @return integer
              */
             return $this->intId;
         case 'ReferenceID':
             /**
              * Gets the value for intReferenceID 
              * @return integer
              */
             return $this->intReferenceID;
         case 'Author':
             /**
              * Gets the value for strAuthor 
              * @return string
              */
             return $this->strAuthor;
         case 'Edition':
             /**
              * Gets the value for strEdition 
              * @return string
              */
             return $this->strEdition;
         case 'NumberOfPages':
             /**
              * Gets the value for fltNumberOfPages 
              * @return double
              */
             return $this->fltNumberOfPages;
         case 'PublicationDate':
             /**
              * Gets the value for dttPublicationDate 
              * @return QDateTime
              */
             return $this->dttPublicationDate;
         case 'Publisher':
             /**
              * Gets the value for strPublisher 
              * @return string
              */
             return $this->strPublisher;
         case 'Isbn':
             /**
              * Gets the value for fltIsbn 
              * @return double
              */
             return $this->fltIsbn;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'ReferenceIDObject':
             /**
              * Gets the value for the Articlecore object referenced by intReferenceID 
              * @return Articlecore
              */
             try {
                 if (!$this->objReferenceIDObject && !is_null($this->intReferenceID)) {
                     $this->objReferenceIDObject = Articlecore::Load($this->intReferenceID);
                 }
                 return $this->objReferenceIDObject;
             } 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 '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }
예제 #5
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 'Id':
             /**
              * Gets the value for intId (Read-Only PK)
              * @return integer
              */
             return $this->intId;
         case 'ReferenceID':
             /**
              * Gets the value for intReferenceID (Not Null)
              * @return integer
              */
             return $this->intReferenceID;
         case 'Artist':
             /**
              * Gets the value for strArtist 
              * @return string
              */
             return $this->strArtist;
         case 'Label':
             /**
              * Gets the value for strLabel 
              * @return string
              */
             return $this->strLabel;
         case 'NumberOfDiscs':
             /**
              * Gets the value for fltNumberOfDiscs 
              * @return double
              */
             return $this->fltNumberOfDiscs;
         case 'ReleaseDate':
             /**
              * Gets the value for dttReleaseDate 
              * @return QDateTime
              */
             return $this->dttReleaseDate;
             ///////////////////
             // Member Objects
             ///////////////////
         ///////////////////
         // Member Objects
         ///////////////////
         case 'ReferenceIDObject':
             /**
              * Gets the value for the Articlecore object referenced by intReferenceID (Not Null)
              * @return Articlecore
              */
             try {
                 if (!$this->objReferenceIDObject && !is_null($this->intReferenceID)) {
                     $this->objReferenceIDObject = Articlecore::Load($this->intReferenceID);
                 }
                 return $this->objReferenceIDObject;
             } 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 '_ArticlemusictracksAsReferenceId':
             /**
              * Gets the value for the private _objArticlemusictracksAsReferenceId (Read-Only)
              * if set due to an expansion on the articlemusictracks.ReferenceId reverse relationship
              * @return Articlemusictracks
              */
             return $this->_objArticlemusictracksAsReferenceId;
         case '_ArticlemusictracksAsReferenceIdArray':
             /**
              * Gets the value for the private _objArticlemusictracksAsReferenceIdArray (Read-Only)
              * if set due to an ExpandAsArray on the articlemusictracks.ReferenceId reverse relationship
              * @return Articlemusictracks[]
              */
             return (array) $this->_objArticlemusictracksAsReferenceIdArray;
         case '__Restored':
             return $this->__blnRestored;
         default:
             try {
                 return parent::__get($strName);
             } catch (QCallerException $objExc) {
                 $objExc->IncrementOffset();
                 throw $objExc;
             }
     }
 }