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

Public Member Functions

_returnIssueFromRow ($row)
 
 changePubId ($issueId, $pubIdType, $pubId)
 
 customIssueOrderingExists ($journalId)
 
 deleteAllPubIds ($journalId, $pubIdType)
 
 deleteCustomIssueOrdering ($journalId)
 
 deleteIssue (&$issue)
 
 deleteIssuesByJournal ($journalId)
 
 flushCache ()
 
 getAdditionalFieldNames ()
 
getCurrentIssue ($journalId, $useCache=false)
 
 getCustomIssueOrder ($journalId, $issueId)
 
 getInsertIssueId ()
 
getIssueByArticleId ($articleId, $journalId=null)
 
getIssueByBestIssueId ($issueId, $journalId=null, $useCache=false)
 
getIssueById ($issueId, $journalId=null, $useCache=false)
 
getIssueByPubId ($pubIdType, $pubId, $journalId=null, $useCache=false)
 
getIssues ($journalId, $rangeInfo=null)
 
getIssuesBySetting ($settingName, $settingValue, $journalId=null)
 
getLastCreatedIssue ($journalId)
 
 getLocaleFieldNames ()
 
 getNumArticles ($issueId)
 
getPublishedIssues ($journalId, $rangeInfo=null)
 
getPublishedIssuesByNumber ($journalId, $volume=null, $number=null, $year=null)
 
getUnpublishedIssues ($journalId, $rangeInfo=null)
 
 insertCustomIssueOrder ($journalId, $issueId, $seq)
 
 insertIssue (&$issue)
 
 issueExists ($journalId, $volume, $number, $year, $issueId)
 
 issueIdExists ($issueId, $journalId)
 
 moveCustomIssueOrder ($journalId, $issueId, $newPos)
 
 pubIdExists ($pubIdType, $pubId, $issueId, $journalId)
 
 resequenceCustomIssueOrders ($journalId)
 
 setDefaultCustomIssueOrders ($journalId)
 
 updateCurrentIssue ($journalId, $issue=null)
 
 updateIssue ($issue)
 
 updateLocaleFields (&$issue)
 
- 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 Issue objects.

See Also
Issue

Definition at line 19 of file IssueDAO.inc.php.

Member Function Documentation

& IssueDAO::_returnIssueFromRow (   $row)

creates and returns an issue object from a row

Parameters
$rowarray
Returns
Issue object

Definition at line 278 of file IssueDAO.inc.php.

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

Referenced by getCurrentIssue(), getIssueByArticleId(), getIssueById(), getIssuesBySetting(), and getLastCreatedIssue().

IssueDAO::changePubId (   $issueId,
  $pubIdType,
  $pubId 
)

Change the public ID of an issue.

Parameters
$issueIdint
$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

Definition at line 258 of file IssueDAO.inc.php.

References flushCache(), and DAO\replace().

IssueDAO::customIssueOrderingExists (   $journalId)

Check if a journal has custom issue ordering.

Parameters
$journalIdint
Returns
boolean

Definition at line 704 of file IssueDAO.inc.php.

References DAO\retrieve().

Referenced by insertIssue(), and updateIssue().

IssueDAO::deleteAllPubIds (   $journalId,
  $pubIdType 
)

Delete the public IDs of all issues of 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 800 of file IssueDAO.inc.php.

References flushCache(), getIssues(), and DAO\update().

IssueDAO::deleteCustomIssueOrdering (   $journalId)

Delete the custom ordering of a published issue.

Parameters
$journalIdint

Definition at line 662 of file IssueDAO.inc.php.

References DAO\update().

IssueDAO::deleteIssue ( $issue)

Delete issue. Deletes associated issue galleys, cover pages, and published articles.

Parameters
$issueobject issue

Definition at line 464 of file IssueDAO.inc.php.

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

Referenced by deleteIssuesByJournal().

IssueDAO::deleteIssuesByJournal (   $journalId)

Delete issues by journal id. Deletes dependent entities.

Parameters
$journalIdint

Definition at line 510 of file IssueDAO.inc.php.

References deleteIssue(), and getIssues().

IssueDAO::flushCache ( )

Flush the issue cache.

Definition at line 822 of file IssueDAO.inc.php.

Referenced by changePubId(), deleteAllPubIds(), deleteIssue(), updateCurrentIssue(), and updateIssue().

IssueDAO::getAdditionalFieldNames ( )

Get a list of additional fields that do not have dedicated accessors.

Returns
array

Definition at line 319 of file IssueDAO.inc.php.

& IssueDAO::getCurrentIssue (   $journalId,
  $useCache = false 
)

Retrieve current issue

Parameters
$journalIdint
$useCacheboolean optional
Returns
Issue object

Definition at line 214 of file IssueDAO.inc.php.

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

IssueDAO::getCustomIssueOrder (   $journalId,
  $issueId 
)

Get the custom issue order of a journal.

Parameters
$journalIdint
$issueIdint
Returns
int

Definition at line 723 of file IssueDAO.inc.php.

References DAO\retrieve().

IssueDAO::getInsertIssueId ( )

Get the ID of the last inserted issue.

Returns
int

Definition at line 380 of file IssueDAO.inc.php.

References DAO\getInsertId().

Referenced by insertIssue().

& IssueDAO::getIssueByArticleId (   $articleId,
  $journalId = null 
)

Get issue by article id

Parameters
articleIdint
journalIdint optional
Returns
issue object

Definition at line 567 of file IssueDAO.inc.php.

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

& IssueDAO::getIssueByBestIssueId (   $issueId,
  $journalId = null,
  $useCache = false 
)

Retrieve Issue by "best" issue id – public ID if it exists, falling back on the internal issue ID otherwise.

Parameters
$issueIdstring
$journalIdint optional
$useCacheboolean optional
Returns
Issue object

Definition at line 181 of file IssueDAO.inc.php.

References getIssueById(), and getIssueByPubId().

& IssueDAO::getIssueById (   $issueId,
  $journalId = null,
  $useCache = false 
)

Retrieve Issue by issue id

Parameters
$issueIdint
$journalIdint optional
$useCacheboolean optional
Returns
Issue object

Definition at line 48 of file IssueDAO.inc.php.

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

Referenced by getIssueByBestIssueId().

& IssueDAO::getIssueByPubId (   $pubIdType,
  $pubId,
  $journalId = null,
  $useCache = false 
)

Retrieve Issue by public issue id

Parameters
$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
$journalIdint optional
$useCacheboolean optional
Returns
Issue object

Definition at line 88 of file IssueDAO.inc.php.

References getIssuesBySetting().

Referenced by getIssueByBestIssueId().

& IssueDAO::getIssues (   $journalId,
  $rangeInfo = null 
)

Get all issues organized by published date

Parameters
$journalIdint
$rangeInfoobject DBResultRange (optional)
Returns
issues object ItemIterator

Definition at line 601 of file IssueDAO.inc.php.

References DAO\retrieveRange().

Referenced by deleteAllPubIds(), and deleteIssuesByJournal().

& IssueDAO::getIssuesBySetting (   $settingName,
  $settingValue,
  $journalId = null 
)

Find issues by querying issue settings.

Parameters
$settingNamestring
$settingValuemixed
$journalIdint optional
Returns
array The issues identified by setting.

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

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

Referenced by getIssueByPubId().

& IssueDAO::getLastCreatedIssue (   $journalId)

Retrieve the last created issue

Parameters
$journalIdint
Returns
Issue object

Definition at line 192 of file IssueDAO.inc.php.

References _returnIssueFromRow(), and DAO\retrieveLimit().

IssueDAO::getLocaleFieldNames ( )

Get a list of fields for which localized data is supported

Returns
array

Definition at line 310 of file IssueDAO.inc.php.

IssueDAO::getNumArticles (   $issueId)

Return number of articles assigned to an issue.

Parameters
$issueIdint
Returns
int

Definition at line 648 of file IssueDAO.inc.php.

References DAO\retrieve().

& IssueDAO::getPublishedIssues (   $journalId,
  $rangeInfo = null 
)

Get published issues organized by published date

Parameters
$journalIdint
$rangeInfoobject DBResultRange
Returns
issues ItemIterator

Definition at line 617 of file IssueDAO.inc.php.

References DAO\retrieveRange().

Referenced by setDefaultCustomIssueOrders().

& IssueDAO::getPublishedIssuesByNumber (   $journalId,
  $volume = null,
  $number = null,
  $year = null 
)

Retrieve Issue by some combination of volume, number, and year

Parameters
$journalIdint
$volumeint
$numberint
$yearint
Returns
Iterator object

Definition at line 151 of file IssueDAO.inc.php.

References DAO\retrieve().

& IssueDAO::getUnpublishedIssues (   $journalId,
  $rangeInfo = null 
)

Get unpublished issues organized by published date

Parameters
$journalIdint
$rangeInfoobject DBResultRange
Returns
issues ItemIterator

Definition at line 633 of file IssueDAO.inc.php.

References DAO\retrieveRange().

IssueDAO::insertCustomIssueOrder (   $journalId,
  $issueId,
  $seq 
)

INTERNAL USE ONLY: Insert a custom issue ordering

Parameters
$journalIdint
$issueIdint
$seqint

Definition at line 760 of file IssueDAO.inc.php.

References DAO\update().

Referenced by moveCustomIssueOrder(), resequenceCustomIssueOrders(), and setDefaultCustomIssueOrders().

IssueDAO::insertIssue ( $issue)

inserts a new issue into issues table

Parameters
Issueobject
Returns
Issue Id int

Definition at line 341 of file IssueDAO.inc.php.

References customIssueOrderingExists(), DAO\datetimeToDB(), getInsertIssueId(), resequenceCustomIssueOrders(), DAO\update(), and updateLocaleFields().

IssueDAO::issueExists (   $journalId,
  $volume,
  $number,
  $year,
  $issueId 
)

Check if volume, number and year have already been issued

Parameters
$journalIdint
$volumeint
$numberint
$yearint
Returns
boolean

Definition at line 392 of file IssueDAO.inc.php.

References DAO\retrieve().

IssueDAO::issueIdExists (   $issueId,
  $journalId 
)

Checks if issue exists

Parameters
$issueIdint
$journalIdint
Returns
boolean

Definition at line 524 of file IssueDAO.inc.php.

References DAO\retrieve().

IssueDAO::moveCustomIssueOrder (   $journalId,
  $issueId,
  $newPos 
)

Move a custom issue ordering up or down, resequencing as necessary.

Parameters
$journalIdint
$issueIdint
$newPosint The new position (0-based) of this section

Definition at line 777 of file IssueDAO.inc.php.

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

IssueDAO::pubIdExists (   $pubIdType,
  $pubId,
  $issueId,
  $journalId 
)

Checks if public identifier exists (other than for the specified issue ID, which is treated as an exception).

Parameters
$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
$issueIdint An ID to be excluded from the search.
$journalIdint
Returns
boolean

Definition at line 543 of file IssueDAO.inc.php.

References DAO\retrieve().

IssueDAO::resequenceCustomIssueOrders (   $journalId)

Sequentially renumber custom issue orderings in their sequence order.

Parameters
$journalIdint

Definition at line 672 of file IssueDAO.inc.php.

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

Referenced by deleteIssue(), insertIssue(), moveCustomIssueOrder(), and updateIssue().

IssueDAO::setDefaultCustomIssueOrders (   $journalId)

Import the current issue orders into the specified journal as custom issue orderings.

Parameters
$journalIdint

Definition at line 744 of file IssueDAO.inc.php.

References getPublishedIssues(), and insertCustomIssueOrder().

IssueDAO::updateCurrentIssue (   $journalId,
  $issue = null 
)

update current issue

Returns
Issue object

Definition at line 240 of file IssueDAO.inc.php.

References flushCache(), DAO\update(), and updateIssue().

IssueDAO::updateIssue (   $issue)

updates an issue

Parameters
Issueobject

Definition at line 409 of file IssueDAO.inc.php.

References customIssueOrderingExists(), DAO\datetimeToDB(), flushCache(), resequenceCustomIssueOrders(), DAO\update(), and updateLocaleFields().

Referenced by updateCurrentIssue().

IssueDAO::updateLocaleFields ( $issue)

Update the localized fields for this object.

Parameters
$issue

Definition at line 330 of file IssueDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertIssue(), and updateIssue().


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