Documentation is available at StorablePrimitive.interface.php
- <?php
- /**
- * This interface allows for the storage into a database (or other medium) the data contained in a {@link Primitive} data type.
- *
- * @package harmoni.datamanager
- *
- * @copyright Copyright © 2005, Middlebury College
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
- *
- * @version $Id: StorablePrimitive.interface.php,v 1.7 2007/09/04 20:25:31 adamfranco Exp $
- */
- class StorablePrimitive {
- /*******************************************************
- * Class Methods
- *********************************************************/
- /**
- * Takes a single database row, which would contain the columns added by alterQuery()
- * and extracts the values to setup the object with the appropriate data.
- * @param array $dbRow
- * @access public
- * @return object StorablePrimitive
- * @static
- */
- function createAndPopulate( $dbRow ) { }
- /**
- * Returns a string that could be inserted into an SQL query's WHERE clause, based on the
- * {@link Primitive} value that is passed. It is used when searching for datasets that contain a certain
- * field=value pair.
- * @param ref object $value The {@link Primitive} object to search for.
- * @param int $searchType One of the SEARCH_TYPE_* constants, defining what type of search this should be (ie, equals,
- * contains, greater than, less than, etc)
- * @return string or NULL if no searching is allowed.
- * @static
- */
- function makeSearchString($value, $searchType = SEARCH_TYPE_EQUALS) { }
- /*******************************************************
- * Instance Methods
- *********************************************************/
- /**
- * Inserts a new row into the Database with the data contained in the object.
- * @param integer $dbID The {@link DBHandler} database ID to query.
- * @access public
- * @return integer Returns the new ID of the data stored.
- */
- function insert($dbID) { }
- /**
- * Uses the ID passed and updates the database row with
- * new data.
- * @param integer $dbID The {@link DBHandler} database ID to query.
- * @param integer $dataID The ID in the database of the data to be updated.
- * @access public
- * @return void
- */
- function update($dbID, $dataID) { }
- /**
- * Takes an existing {@link SelectQuery} and adds a table join and some columns so that
- * when it is executed the actual data can be retrieved from the row. The join condition must
- * be "fk_data = data_id_field", since the field "fk_data" is already part of the DataManager's
- * table structure.
- * @access public
- * @return void
- */
- function alterQuery( $query ) { }
- /**
- * Deletes the data row from the appropriate table.
- * @param integer $dbID The {@link DBHandler} database ID to query.
- * @param integer $dataID The ID in the database of the data to be deleted.
- * @access public
- * @return void
- */
- function prune($dbID, $dataID) { }
- }
Documentation generated on Wed, 19 Sep 2007 10:26:48 -0400 by phpDocumentor 1.3.0RC3