Merge pull request #4820 from kurund/CRM-15705
[civicrm-core.git] / CRM / Core / EntityReference.php
index 3b5312833daf0ff78a0d3b5051c36976a1eff3d3..e493da6988dadedfa247c821433a60095178746b 100644 (file)
@@ -1,49 +1,8 @@
 <?php
-
 /**
- * Description of a one-way link between two entities
+ * This is included for backward compatibility with DAO's generated before 4.5.
  *
- * This could be a foreign key or a generic (entity_id, entity_table) pointer
+ * @deprecated
  */
-class CRM_Core_EntityReference {
-  protected $refTable;
-  protected $refKey;
-  protected $refTypeColumn;
-  protected $targetTable;
-  protected $targetKey;
-
-  function __construct($refTable, $refKey, $targetTable = NULL, $targetKey = 'id', $refTypeColumn = NULL) {
-    $this->refTable = $refTable;
-    $this->refKey = $refKey;
-    $this->targetTable = $targetTable;
-    $this->targetKey = $targetKey;
-    $this->refTypeColumn = $refTypeColumn;
-  }
-
-  function getReferenceTable() {
-    return $this->refTable;
-  }
-
-  function getReferenceKey() {
-    return $this->refKey;
-  }
-
-  function getTypeColumn() {
-    return $this->refTypeColumn;
-  }
-
-  function getTargetTable() {
-    return $this->targetTable;
-  }
-
-  function getTargetKey() {
-    return $this->targetKey;
-  }
-
-  /**
-   * @return true if the reference can point to more than one type
-   */
-  function isGeneric() {
-    return ($this->refTypeColumn !== NULL);
-  }
+class CRM_Core_EntityReference extends CRM_Core_Reference_Basic {
 }