+
+ /**
+ * Getter for primary key or unique key if not set
+ *
+ * @return $primaryKey Primary key or unique key if not set
+ */
+ public final function getPrimaryKey () {
+ // Get primary key by default
+ $primaryKey = $this->primaryKey;
+
+ if (empty($primaryKey)) {
+ // Get uniqueKey
+ $primaryKey = $this->getUniqueKey();
+ } // END - if
+
+ // Return it
+ return $primaryKey;
+ }
+
+ /**
+ * Setter for primary key
+ *
+ * @param $primaryKey Primary key to set
+ * @return void
+ */
+ public final function setPrimaryKey ($primaryKey) {
+ $this->primaryKey = (string) $primaryKey;
+ }