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

Public Member Functions

 _returnFromRow ($row)
 
 ChapterDAO ()
 
 deleteById ($chapterId)
 
 deleteByMonographId ($monographId)
 
 deleteObject ($chapter)
 
 getChapter ($chapterId, $monographId=null)
 
 getChapters ($monographId, $rangeInfo=null)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 insertChapter ($chapter)
 
 newDataObject ()
 
 resequenceChapters ($monographId=null)
 
 updateLocaleFields ($chapter)
 
 updateObject ($chapter)
 
- 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 ChapterAuthor objects.

Operations for retrieving and modifying Chapter objects.

monograph

See Also
Chapter
ChapterDAO
AuthorDAO - This DAO does NOT offer operations for manipulating Author Objects. AuthorDAO should be used for that instead.
Chapter
AuthorDAO

Definition at line 21 of file ChapterDAO.inc.php.

Member Function Documentation

ChapterDAO::_returnFromRow (   $row)

Internal function to return a Chapter object from a row.

Parameters
$rowarray
Returns
Chapter

Definition at line 92 of file ChapterDAO.inc.php.

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

Referenced by getChapter().

ChapterDAO::ChapterDAO ( )

Constructor.

Definition at line 25 of file ChapterDAO.inc.php.

ChapterDAO::deleteById (   $chapterId)

Delete a board chapter, including membership info

Parameters
$chapterIdint

Definition at line 167 of file ChapterDAO.inc.php.

References DAO\update().

Referenced by deleteObject().

ChapterDAO::deleteByMonographId (   $monographId)

Delete board chapters by assoc ID, including membership info

Parameters
$assocTypeint
$monographIdint

Definition at line 178 of file ChapterDAO.inc.php.

References deleteObject(), and getChapters().

ChapterDAO::deleteObject (   $chapter)

Delete a board chapter, including membership info

Parameters
$chapterChapter

Definition at line 159 of file ChapterDAO.inc.php.

References deleteById().

Referenced by deleteByMonographId().

ChapterDAO::getChapter (   $chapterId,
  $monographId = null 
)

Retrieve a chapter by ID.

Parameters
$chapterIdint
$assocTypeint optional
$monographIdint optional
Returns
Chapter

Definition at line 36 of file ChapterDAO.inc.php.

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

ChapterDAO::getChapters (   $monographId,
  $rangeInfo = null 
)

Get all chapters for a given monograph.

Parameters
$monographIdint
$rangeInfoobject RangeInfo object (optional)
Returns
DAOResultFactory

Definition at line 61 of file ChapterDAO.inc.php.

References DAO\retrieveRange().

Referenced by deleteByMonographId().

ChapterDAO::getInsertId ( )

Get the ID of the last inserted board chapter.

Returns
int

Definition at line 217 of file ChapterDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertChapter().

ChapterDAO::getLocaleFieldNames ( )

Get the list of fields for which locale data is stored.

Returns
array

Definition at line 75 of file ChapterDAO.inc.php.

ChapterDAO::insertChapter (   $chapter)

Insert a new board chapter.

Parameters
$chapterChapter

Definition at line 118 of file ChapterDAO.inc.php.

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

ChapterDAO::newDataObject ( )

Get a new data object

Returns
Chapter

Definition at line 83 of file ChapterDAO.inc.php.

Referenced by _returnFromRow().

ChapterDAO::resequenceChapters (   $monographId = null)

Sequentially renumber chapters in their sequence order, optionally by monographId

Parameters
$monographIdint

Definition at line 189 of file ChapterDAO.inc.php.

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

ChapterDAO::updateLocaleFields (   $chapter)

Update the settings for this object

Parameters
$chapterobject

Definition at line 108 of file ChapterDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertChapter(), and updateObject().

ChapterDAO::updateObject (   $chapter)

Update an existing board chapter.

Parameters
$chapterChapter

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

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


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