Open Monograph Press  3.3.0
SeriesDAO Class Reference
Inheritance diagram for SeriesDAO:
PKPSectionDAO DAO

Public Member Functions

 _fromRow ($row)
 
 addCategory ($seriesId, $categoryId)
 
 categoryAssociationExists ($seriesId, $categoryId)
 
 deleteById ($seriesId, $contextId=null)
 
 deleteByPressId ($pressId)
 
 getAdditionalFieldNames ()
 
 getByContextId ($pressId, $rangeInfo=null, $submittableOnly=false)
 
 getById ($seriesId, $pressId=null)
 
 getByPath ($path, $pressId)
 
 getByPressId ($pressId, $rangeInfo=null)
 
 getCategories ($seriesId, $pressId=null)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 getTitlesByPressId ($pressId, $submittableOnly=false)
 
 getUnassignedCategories ($seriesId, $pressId=null)
 
 insertObject ($series)
 
 newDataObject ()
 
 removeCategories ($seriesId)
 
 seriesExists ($seriesId, $pressId)
 
 updateLocaleFields ($series)
 
 updateObject ($series)
 
- Public Member Functions inherited from PKPSectionDAO
 deleteByContextId ($contextId)
 
 deleteObject ($section)
 
 getTitlesByContextId ($contextId, $submittableOnly=false)
 
- Public Member Functions inherited from DAO
 __construct ($dataSource=null, $callHooks=true)
 
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
 getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject)
 
 getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($value)
 
 handleError ($dataSource, $sql)
 
 nullOrInt ($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, $content='')
 
- Data Fields inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table='', $id='')
 

Detailed Description

Operations for retrieving and modifying Series objects.

See also
Series

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

Member Function Documentation

◆ _fromRow()

SeriesDAO::_fromRow (   $row)

Internal function to return an Series object from a row.

Parameters
$rowarray
Returns
Series

Reimplemented from PKPSectionDAO.

Definition at line 82 of file SeriesDAO.inc.php.

References HookRegistry\call(), and DAO\getDataObjectSettings().

Referenced by getById(), and getByPath().

◆ addCategory()

SeriesDAO::addCategory (   $seriesId,
  $categoryId 
)

Associate a category with a series.

Parameters
$seriesIdint
$categoryIdint

Definition at line 307 of file SeriesDAO.inc.php.

References DAO\update().

◆ categoryAssociationExists()

SeriesDAO::categoryAssociationExists (   $seriesId,
  $categoryId 
)

Check if an series exists with the specified ID.

Parameters
$seriesIdint
$pressIdint
Returns
boolean

Definition at line 389 of file SeriesDAO.inc.php.

References DAO\retrieve().

◆ deleteById()

SeriesDAO::deleteById (   $seriesId,
  $contextId = null 
)

Delete an series by ID.

Parameters
$seriesIdint
$contextIdint optional

Reimplemented from PKPSectionDAO.

Definition at line 195 of file SeriesDAO.inc.php.

References PKPServices\get(), DAORegistry\getDAO(), seriesExists(), and DAO\update().

◆ deleteByPressId()

SeriesDAO::deleteByPressId (   $pressId)

Delete series by press ID NOTE: This does not delete dependent entries EXCEPT from series_editors. It is intended to be called only when deleting a press.

Parameters
$pressIdint

Definition at line 221 of file SeriesDAO.inc.php.

References PKPSectionDAO\deleteByContextId().

◆ getAdditionalFieldNames()

SeriesDAO::getAdditionalFieldNames ( )

Get a list of additional fields.

Returns
array

Reimplemented from DAO.

Definition at line 114 of file SeriesDAO.inc.php.

◆ getByContextId()

SeriesDAO::getByContextId (   $pressId,
  $rangeInfo = null,
  $submittableOnly = false 
)

Retrieve all sections for a context.

Parameters
$contextIdint context ID
$rangeInfoDBResultRange optional
$submittableOnlyboolean optional. Whether to return only sections that can be submitted to by anyone.
Returns
DAOResultFactory containing Sections ordered by sequence

Reimplemented from PKPSectionDAO.

Definition at line 236 of file SeriesDAO.inc.php.

References AppLocale\getLocale(), AppLocale\getPrimaryLocale(), and DAO\retrieveRange().

Referenced by getByPressId().

◆ getById()

SeriesDAO::getById (   $seriesId,
  $pressId = null 
)

Retrieve an series by ID.

Parameters
$seriesIdint
$pressIdint optional
Returns
Series

Reimplemented from PKPSectionDAO.

Definition at line 27 of file SeriesDAO.inc.php.

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

◆ getByPath()

SeriesDAO::getByPath (   $path,
  $pressId 
)

Retrieve a series by path.

Parameters
$pathstring
$pressIdint
Returns
Series

Definition at line 54 of file SeriesDAO.inc.php.

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

◆ getByPressId()

SeriesDAO::getByPressId (   $pressId,
  $rangeInfo = null 
)

Retrieve all series for a press.

Returns
DAOResultFactory containing Series ordered by sequence

Definition at line 229 of file SeriesDAO.inc.php.

References getByContextId().

Referenced by getTitlesByPressId().

◆ getCategories()

SeriesDAO::getCategories (   $seriesId,
  $pressId = null 
)

Get the categories associated with a given series.

Parameters
$seriesIdint
Returns
DAOResultFactory

Definition at line 337 of file SeriesDAO.inc.php.

References DAORegistry\getDAO(), and DAO\retrieve().

◆ getInsertId()

SeriesDAO::getInsertId ( )

Get the ID of the last inserted series.

Returns
int

Definition at line 298 of file SeriesDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertObject().

◆ getLocaleFieldNames()

SeriesDAO::getLocaleFieldNames ( )

Get the list of fields for which data can be localized.

Returns
array

Reimplemented from PKPSectionDAO.

Definition at line 103 of file SeriesDAO.inc.php.

◆ getTitlesByPressId()

SeriesDAO::getTitlesByPressId (   $pressId,
  $submittableOnly = false 
)

Retrieve the IDs and titles of the series for a press in an associative array.

Returns
array

Definition at line 260 of file SeriesDAO.inc.php.

References getByPressId().

◆ getUnassignedCategories()

SeriesDAO::getUnassignedCategories (   $seriesId,
  $pressId = null 
)

Get the categories not associated with a given series.

Parameters
$seriesIdint
Returns
DAOResultFactory

Definition at line 363 of file SeriesDAO.inc.php.

References DAORegistry\getDAO(), and DAO\retrieve().

◆ insertObject()

SeriesDAO::insertObject (   $series)

Insert a new series.

Parameters
$seriesSeries

Definition at line 139 of file SeriesDAO.inc.php.

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

◆ newDataObject()

SeriesDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
Series

Reimplemented from PKPSectionDAO.

Definition at line 73 of file SeriesDAO.inc.php.

◆ removeCategories()

SeriesDAO::removeCategories (   $seriesId)

Unassociate all categories with a series

Parameters
$seriesIdint

Definition at line 325 of file SeriesDAO.inc.php.

References DAO\update().

◆ seriesExists()

SeriesDAO::seriesExists (   $seriesId,
  $pressId 
)

Check if an series exists with the specified ID.

Parameters
$seriesIdint
$pressIdint
Returns
boolean

Definition at line 283 of file SeriesDAO.inc.php.

References DAO\retrieve().

Referenced by deleteById().

◆ updateLocaleFields()

SeriesDAO::updateLocaleFields (   $series)

Update the localized fields for this table

Parameters
$seriesobject

Definition at line 127 of file SeriesDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

◆ updateObject()

SeriesDAO::updateObject (   $series)

Update an existing series.

Parameters
$seriesSeries

Definition at line 165 of file SeriesDAO.inc.php.

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


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