// Import framework stuff
use Org\Mxchange\CoreFramework\Criteria\BaseCriteria;
+use Org\Mxchange\CoreFramework\Criteria\Local\LocalSearchCriteria;
use Org\Mxchange\CoreFramework\Criteria\Storing\StoreableCriteria;
use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint;
/**
* Primary keys
*/
- private $primaryKeys = array();
+ private $primaryKeys = [];
+
+ /**
+ * Search criteria instance
+ */
+ private $searchInstance = NULL;
/**
* Protected constructor
* @param $tableName Name of the table
* @return $criteriaInstance An instance of this criteria
*/
- public static final function createDataSetCriteria ($tableName) {
+ public static final function createDataSetCriteria (string $tableName) {
// Get a new instance
$criteriaInstance = new DataSetCriteria();
* @param $tableName Name of the table to set
* @return void
*/
- public final function setTableName ($tableName) {
- $this->tableName = (string) $tableName;
+ public final function setTableName (string $tableName) {
+ $this->tableName = $tableName;
}
/**
* @param $uniqueKey Column to use as unique key
* @return void
*/
- public final function setUniqueKey ($uniqueKey) {
- $this->uniqueKey = (string) $uniqueKey;
+ public final function setUniqueKey (string $uniqueKey) {
+ $this->uniqueKey = $uniqueKey;
}
/**
return $this->uniqueKey;
}
+ /**
+ * Setter for primary key
+ *
+ * @param $primaryKey Primary key to set
+ * @return void
+ */
+ public final function setPrimaryKey (string $primaryKey) {
+ $this->primaryKey = $primaryKey;
+ }
+
+ /**
+ * Setter for primary key array
+ *
+ * @param $primaryKeys Primary key array to set
+ * @return void
+ */
+ public function setPrimaryKeyCombined (array $primaryKeys) {
+ $this->primaryKeys = $primaryKeys;
+ }
+
+ /**
+ * Getter for primary keys
+ *
+ * @return $primaryKeys Primary key array
+ */
+ public final function getPrimaryKeys () {
+ // Return it
+ return $this->primaryKeys;
+ }
+
+ /**
+ * Setter for search instance
+ *
+ * @param $searchInstance Searchable criteria instance
+ * @return void
+ */
+ public final function setSearchInstance (LocalSearchCriteria $searchInstance) {
+ $this->searchInstance = $searchInstance;
+ }
+
+ /**
+ * Getter for search instance
+ *
+ * @return $searchInstance Searchable criteria instance
+ */
+ public final function getSearchInstance () {
+ return $this->searchInstance;
+ }
+
/**
* Getter for unique key value
*
return $primaryKey;
}
- /**
- * Setter for primary key
- *
- * @param $primaryKey Primary key to set
- * @return void
- */
- public final function setPrimaryKey ($primaryKey) {
- $this->primaryKey = (string) $primaryKey;
- }
-
- /**
- * Setter for primary key array
- *
- * @param $primaryKeys Primary key array to set
- * @return void
- */
- public function setPrimaryKeyCombined (array $primaryKeys) {
- $this->primaryKeys = $primaryKeys;
- }
-
- /**
- * Getter for primary keys
- *
- * @return $primaryKeys Primary key array
- */
- public final function getPrimaryKeys () {
- // Return it
- return $this->primaryKeys;
- }
-
}