Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
GenreDAO Class Reference
Inheritance diagram for GenreDAO:
DAO

Public Member Functions

 _fromRow ($row)
 
 deleteByContextId ($contextId)
 
 deleteById ($genreId)
 
 deleteObject ($genre)
 
 deleteSettingsByLocale ($locale)
 
 GenreDAO ()
 
 getAdditionalFieldNames ()
 
 getByContextId ($contextId, $rangeInfo=null)
 
 getByDependenceAndContextId ($dependentFilesOnly, $contextId, $rangeInfo=null)
 
 getById ($genreId, $contextId=null)
 
 getByKey ($key, $contextId=null)
 
 getEnabledByContextId ($contextId, $rangeInfo=null)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 insertObject ($genre)
 
 installDefaults ($contextId, $locales)
 
 newDataObject ()
 
 updateLocaleFields ($genre)
 
 updateObject ($genre)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and modifying Genre objects.

See Also
Genre

Definition at line 20 of file GenreDAO.inc.php.

Member Function Documentation

GenreDAO::_fromRow (   $row)

Internal function to return a Genre object from a row.

Parameters
$rowarray
Returns
Genre

Definition at line 169 of file GenreDAO.inc.php.

References HookRegistry\call(), and newDataObject().

Referenced by getById(), and getByKey().

GenreDAO::deleteByContextId (   $contextId)

Delete the genre entries associated with a context. Called when deleting a Context in ContextDAO.

Parameters
$contextIdint

Definition at line 261 of file GenreDAO.inc.php.

References getByContextId(), and DAO\update().

GenreDAO::deleteById (   $genreId)

Soft delete a genre by id.

Parameters
$genreIdint

Definition at line 249 of file GenreDAO.inc.php.

References DAO\update().

Referenced by deleteObject().

GenreDAO::deleteObject (   $genre)

Delete a genre by id.

Parameters
$genreGenre

Definition at line 241 of file GenreDAO.inc.php.

References deleteById().

GenreDAO::deleteSettingsByLocale (   $locale)

Remove all settings associated with a locale

Parameters
$locale

Definition at line 322 of file GenreDAO.inc.php.

References DAO\update().

GenreDAO::GenreDAO ( )

Constructor

Definition at line 24 of file GenreDAO.inc.php.

GenreDAO::getAdditionalFieldNames ( )

Get a list of field names for which non-localized settings are stored

Returns
array

Definition at line 141 of file GenreDAO.inc.php.

GenreDAO::getByContextId (   $contextId,
  $rangeInfo = null 
)

Retrieve all genres

Parameters
$contextIdint
$rangeInfoobject optional
Returns
DAOResultFactory containing matching genres

Definition at line 96 of file GenreDAO.inc.php.

References DAO\retrieveRange().

Referenced by deleteByContextId().

GenreDAO::getByDependenceAndContextId (   $dependentFilesOnly,
  $contextId,
  $rangeInfo = null 
)

Retrieve genres based on whether they are dependent or not.

Parameters
$dependentFilesOnlyboolean
$contextIdint
$rangeInfoobject optional
Returns
DAOResultFactory containing matching genres

Definition at line 78 of file GenreDAO.inc.php.

References DAO\retrieveRange().

GenreDAO::getById (   $genreId,
  $contextId = null 
)

Retrieve a genre by type id.

Parameters
$genreIdint
Returns
Genre

Definition at line 33 of file GenreDAO.inc.php.

References _fromRow(), and DAO\retrieve().

GenreDAO::getByKey (   $key,
  $contextId = null 
)

Retrieves the genre associated with a key.

Parameters
$keyString the entry key
$contextIdint optional
Returns
Genre

Definition at line 112 of file GenreDAO.inc.php.

References _fromRow(), and DAO\retrieve().

Referenced by installDefaults().

GenreDAO::getEnabledByContextId (   $contextId,
  $rangeInfo = null 
)

Retrieve all genres

Parameters
$contextIdint
$enabledOnlyboolean optional
$rangeInfoobject optional
Returns
DAOResultFactory containing matching genres

Definition at line 58 of file GenreDAO.inc.php.

References DAO\retrieveRange().

GenreDAO::getInsertId ( )

Get the ID of the last inserted genre.

Returns
int

Definition at line 275 of file GenreDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertObject().

GenreDAO::getLocaleFieldNames ( )

Get a list of field names for which data is localized.

Returns
array

Definition at line 133 of file GenreDAO.inc.php.

GenreDAO::insertObject (   $genre)

Insert a new genre.

Parameters
$genreGenre

Definition at line 191 of file GenreDAO.inc.php.

References getInsertId(), DAO\update(), and updateLocaleFields().

Referenced by installDefaults().

GenreDAO::installDefaults (   $contextId,
  $locales 
)

Install default data for settings.

Parameters
$contextIdint
$localesarray

Definition at line 284 of file GenreDAO.inc.php.

References getByKey(), insertObject(), newDataObject(), AppLocale\requireComponents(), and updateObject().

GenreDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
Genre

Definition at line 160 of file GenreDAO.inc.php.

Referenced by _fromRow(), and installDefaults().

GenreDAO::updateLocaleFields (   $genre)

Update the settings for this object

Parameters
$genreobject

Definition at line 149 of file GenreDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

GenreDAO::updateObject (   $genre)

Update an existing genre.

Parameters
$genreGenre

Definition at line 216 of file GenreDAO.inc.php.

References DAO\update(), and updateLocaleFields().

Referenced by installDefaults().


The documentation for this class was generated from the following file: