Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
JournalDAO Class Reference
Inheritance diagram for JournalDAO:
DAO

Public Member Functions

_returnJournalFromRow (&$row)
 
 anyPubIdExists ($journalId, $pubIdType, $pubId, $assocType=ASSOC_TYPE_ANY, $assocId=0)
 
 deleteAllPubIds ($journalId, $pubIdType)
 
 deleteJournal (&$journal)
 
 deleteJournalById ($journalId)
 
getById ($journalId)
 
getEnabledJournals ($rangeInfo=null)
 
getEnabledJournalTitles ()
 
 getInsertJournalId ()
 
getJournal ($journalId)
 
getJournalByPath ($path)
 
getJournals ($enabledOnly=false, $rangeInfo=null, $sortBy=JOURNAL_FIELD_SEQUENCE, $searchField=null, $searchMatch=null, $search=null)
 
getJournalTitles ($enabledOnly=false)
 
 insertJournal (&$journal)
 
 journalExistsByPath ($path)
 
 resequenceJournals ()
 
 updateJournal (&$journal)
 
- 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 ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 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

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying Journal objects.

See Also
Journal

Definition at line 23 of file JournalDAO.inc.php.

Member Function Documentation

& JournalDAO::_returnJournalFromRow ( $row)

Internal function to return a Journal object from a row.

Parameters
$rowarray
Returns
Journal

Definition at line 77 of file JournalDAO.inc.php.

References HookRegistry\call().

Referenced by getById(), and getJournalByPath().

JournalDAO::anyPubIdExists (   $journalId,
  $pubIdType,
  $pubId,
  $assocType = ASSOC_TYPE_ANY,
  $assocId = 0 
)

Check whether the given public ID exists for any publishing object in a journal.

Parameters
$journalIdint
$pubIdTypestring One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html).
$pubIdstring
$assocTypeint The object type of an object to be excluded from the search. Identified by one of the ASSOC_TYPE_* constants.
$assocIdint The id of an object to be excluded from the search.
Returns
boolean

Definition at line 365 of file JournalDAO.inc.php.

References DAORegistry\getDAO().

JournalDAO::deleteAllPubIds (   $journalId,
  $pubIdType 
)

Delete the public IDs of all publishing objects in a journal.

Parameters
$journalIdint
$pubIdTypestring One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html).

Definition at line 343 of file JournalDAO.inc.php.

References DAORegistry\getDAO().

JournalDAO::deleteJournal ( $journal)

Delete a journal, INCLUDING ALL DEPENDENT ITEMS.

Parameters
$journalJournal

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

References deleteJournalById().

JournalDAO::deleteJournalById (   $journalId)

Delete a journal by ID, INCLUDING ALL DEPENDENT ITEMS.

Parameters
$journalIdint

Definition at line 147 of file JournalDAO.inc.php.

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

Referenced by deleteJournal().

& JournalDAO::getById (   $journalId)

Retrieve a journal by ID.

Parameters
$journalIdint
Returns
Journal

Definition at line 29 of file JournalDAO.inc.php.

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

Referenced by getJournal().

& JournalDAO::getEnabledJournals (   $rangeInfo = null)

Retrieve all enabled journals

Returns
array Journals ordered by sequence

Definition at line 286 of file JournalDAO.inc.php.

References getJournals(), and Config\getVar().

& JournalDAO::getEnabledJournalTitles ( )

Retrieve enabled journal IDs and titles in an associative array

Returns
array

Definition at line 313 of file JournalDAO.inc.php.

References getJournalTitles(), and Config\getVar().

JournalDAO::getInsertJournalId ( )

Get the ID of the last inserted journal.

Returns
int

Definition at line 416 of file JournalDAO.inc.php.

References DAO\getInsertId().

Referenced by insertJournal().

& JournalDAO::getJournal (   $journalId)

Deprecated.

See Also
JournalDAO::getById

Definition at line 47 of file JournalDAO.inc.php.

References getById(), and Config\getVar().

& JournalDAO::getJournalByPath (   $path)

Retrieve a journal by path.

Parameters
$pathstring
Returns
Journal

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

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

& JournalDAO::getJournals (   $enabledOnly = false,
  $rangeInfo = null,
  $sortBy = JOURNAL_FIELD_SEQUENCE,
  $searchField = null,
  $searchMatch = null,
  $search = null 
)

Retrieve all journals.

Parameters
$enabledOnlyboolean True iff only enabled jourals wanted
$rangeInfoobject optional
$sortByJOURNAL_FIELD_... optional sorting parameter
$searchFieldJOURNAL_FIELD_... optional filter parameter
$searchMatchstring 'is', 'contains', 'startsWith' optional
$searchstring optional
Returns
DAOResultFactory containing matching journals

Definition at line 210 of file JournalDAO.inc.php.

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

Referenced by getEnabledJournals(), and getJournalTitles().

& JournalDAO::getJournalTitles (   $enabledOnly = false)

Retrieve the IDs and titles of all journals in an associative array.

Returns
array

Definition at line 296 of file JournalDAO.inc.php.

References getJournals().

Referenced by getEnabledJournalTitles().

JournalDAO::insertJournal ( $journal)

Insert a new journal.

Parameters
$journalJournal

Definition at line 94 of file JournalDAO.inc.php.

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

JournalDAO::journalExistsByPath (   $path)

Check if a journal exists with a specified path.

Parameters
$paththe path of the journal
Returns
boolean

Definition at line 324 of file JournalDAO.inc.php.

References DAO\retrieve().

JournalDAO::resequenceJournals ( )

Sequentially renumber journals in their sequence order.

Definition at line 390 of file JournalDAO.inc.php.

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

JournalDAO::updateJournal ( $journal)

Update an existing journal.

Parameters
$journalJournal

Definition at line 116 of file JournalDAO.inc.php.

References DAO\update().


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