Open Journal Systems  3.3.0
IssueDAO Class Reference
Inheritance diagram for IssueDAO:
DAO PKPPubIdPluginDAO

Public Member Functions

 _cacheMiss ($cache, $id)
 
 _fromRow ($row)
 
 _getCache ($cacheId)
 
 _returnIssueFromRow ($row)
 
 changePubId ($pubObjectId, $pubIdType, $pubId)
 
 customIssueOrderingExists ($journalId)
 
 deleteAllPubIds ($contextId, $pubIdType)
 
 deleteByJournalId ($journalId)
 
 deleteCustomIssueOrdering ($journalId)
 
 deleteObject ($issue)
 
 deletePubId ($pubObjectId, $pubIdType)
 
 flushCache ()
 
 getAdditionalFieldNames ()
 
 getByBestId ($issueId, $contextId=null, $useCache=false)
 
 getById ($issueId, $journalId=null, $useCache=false)
 
 getByPubId ($pubIdType, $pubId, $journalId=null, $useCache=false)
 
 getBySetting ($settingName, $settingValue, $journalId=null)
 
 getBySubmissionId ($articleId, $journalId=null)
 
 getCurrent ($journalId, $useCache=false)
 
 getCustomIssueOrder ($journalId, $issueId)
 
 getExportable ($contextId, $pubIdType=null, $pubIdSettingName=null, $pubIdSettingValue=null, $rangeInfo=null)
 
 getInsertId ()
 
 getIssues ($journalId, $rangeInfo=null)
 
 getIssuesByIdentification ($journalId, $volume=null, $number=null, $year=null, $titles=array())
 
 getLocaleFieldNames ()
 
 getNumArticles ($issueId)
 
 getPublishedIssues ($journalId, $rangeInfo=null)
 
 getPublishedIssuesByNumber ($journalId, $volume=null, $number=null, $year=null)
 
 getUnpublishedIssues ($journalId, $rangeInfo=null)
 
 insertCustomIssueOrder ($journalId, $issueId, $seq)
 
 insertObject ($issue)
 
 issueExists ($journalId, $volume, $number, $year, $issueId)
 
 issueIdExists ($issueId, $journalId)
 
 moveCustomIssueOrder ($journalId, $issueId, $newPos)
 
 newDataObject ()
 
 pubIdExists ($pubIdType, $pubId, $excludePubObjectId, $contextId)
 
 resequenceCustomIssueOrders ($journalId)
 
 setDefaultCustomIssueOrders ($journalId)
 
 updateCurrent ($journalId, $issue=null)
 
 updateLocaleFields (&$issue)
 
 updateObject ($issue)
 
- 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)
 
 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)
 

Data Fields

 $caches
 
- Data Fields inherited from DAO
 $_dataSource
 

Additional Inherited Members

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

Detailed Description

Operations for retrieving and modifying Issue objects.

See also
Issue

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

Member Function Documentation

◆ _cacheMiss()

IssueDAO::_cacheMiss (   $cache,
  $id 
)

Handle a cache miss.

Parameters
$cacheGenericCache
$idstring
Returns
Issue

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

References getByBestId(), and getCurrent().

◆ _fromRow()

IssueDAO::_fromRow (   $row)

creates and returns an issue object from a row

Parameters
$rowarray
Returns
Issue object

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

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

Referenced by _returnIssueFromRow().

◆ _getCache()

IssueDAO::_getCache (   $cacheId)

Get an issue cache by cache ID.

Parameters
$cacheIdstring
Returns
GenericCache

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

References CacheManager\getManager().

Referenced by flushCache(), getById(), getByPubId(), and getCurrent().

◆ _returnIssueFromRow()

IssueDAO::_returnIssueFromRow (   $row)

Deprecated:
2018-01-05

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

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

Referenced by getByBestId(), getById(), getBySetting(), getBySubmissionId(), and getCurrent().

◆ changePubId()

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

Change the public ID of a submission.

Parameters
$pubObjectIdint ID of the pub object
$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

Reimplemented from PKPPubIdPluginDAO.

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

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

◆ customIssueOrderingExists()

IssueDAO::customIssueOrderingExists (   $journalId)

Check if a journal has custom issue ordering.

Parameters
$journalIdint
Returns
boolean

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

References DAO\retrieve().

Referenced by resequenceCustomIssueOrders().

◆ deleteAllPubIds()

IssueDAO::deleteAllPubIds (   $contextId,
  $pubIdType 
)

Delete the public IDs of all submissions in this context.

Parameters
$contextIdint
$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).

Reimplemented from PKPPubIdPluginDAO.

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

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

◆ deleteByJournalId()

IssueDAO::deleteByJournalId (   $journalId)

Delete issues by journal id. Deletes dependent entities.

Parameters
$journalIdint

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

References deleteObject(), and getIssues().

◆ deleteCustomIssueOrdering()

IssueDAO::deleteCustomIssueOrdering (   $journalId)

Delete the custom ordering of a published issue.

Parameters
$journalIdint

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

References DAO\update().

◆ deleteObject()

IssueDAO::deleteObject (   $issue)

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

Parameters
$issueobject issue

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

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

Referenced by deleteByJournalId().

◆ deletePubId()

IssueDAO::deletePubId (   $pubObjectId,
  $pubIdType 
)

Delete the public ID of a submission.

Parameters
$pubObjectIdint ID of the pub object
$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).

Reimplemented from PKPPubIdPluginDAO.

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

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

◆ flushCache()

IssueDAO::flushCache ( )

Flush the issue cache.

Reimplemented from DAO.

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

References _getCache().

Referenced by changePubId(), deleteAllPubIds(), deleteObject(), deletePubId(), updateCurrent(), and updateObject().

◆ getAdditionalFieldNames()

IssueDAO::getAdditionalFieldNames ( )

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

Returns
array

Reimplemented from DAO.

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

◆ getByBestId()

IssueDAO::getByBestId (   $issueId,
  $contextId = null,
  $useCache = false 
)

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

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

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

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

Referenced by _cacheMiss().

◆ getById()

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

Retrieve Issue by issue id

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

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

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

Referenced by getByBestId().

◆ getByPubId()

IssueDAO::getByPubId (   $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 95 of file IssueDAO.inc.php.

References _getCache(), and getBySetting().

◆ getBySetting()

IssueDAO::getBySetting (   $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 119 of file IssueDAO.inc.php.

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

Referenced by getByPubId().

◆ getBySubmissionId()

IssueDAO::getBySubmissionId (   $articleId,
  $journalId = null 
)

Get issue by article id

Parameters
articleIdint
journalIdint optional
Returns
Issue object

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

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

◆ getCurrent()

IssueDAO::getCurrent (   $journalId,
  $useCache = false 
)

Retrieve current issue

Parameters
$journalIdint
$useCacheboolean optional
Returns
Issue object

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

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

Referenced by _cacheMiss().

◆ getCustomIssueOrder()

IssueDAO::getCustomIssueOrder (   $journalId,
  $issueId 
)

Get the custom issue order of a journal.

Parameters
$journalIdint
$issueIdint
Returns
int

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

References DAO\retrieve().

◆ getExportable()

IssueDAO::getExportable (   $contextId,
  $pubIdType = null,
  $pubIdSettingName = null,
  $pubIdSettingValue = null,
  $rangeInfo = null 
)

Get all published issues (eventually with a pubId assigned and) matching the specified settings.

Parameters
$contextIdinteger optional
$pubIdTypestring
$pubIdSettingNamestring optional (e.g. crossref::registeredDoi)
$pubIdSettingValuestring optional
$rangeInfoDBResultRange optional
Returns
DAOResultFactory

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

References DAO\retrieveRange().

◆ getInsertId()

IssueDAO::getInsertId ( )

Get the ID of the last inserted issue.

Returns
int

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

References DAO\_getInsertId().

Referenced by insertObject().

◆ getIssues()

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

Get all issues organized by published date

Parameters
$journalIdint
$rangeInfoobject DBResultRange (optional)
Returns
DAOResultFactory

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

References DAO\retrieveRange().

Referenced by deleteAllPubIds(), and deleteByJournalId().

◆ getIssuesByIdentification()

IssueDAO::getIssuesByIdentification (   $journalId,
  $volume = null,
  $number = null,
  $year = null,
  $titles = array() 
)

Retrieve Issues by identification

Parameters
$journalIdint
$volumeint
$numberstring
$yearint
$titlesarray
Returns
DAOResultFactory

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

References DAO\retrieve().

◆ getLocaleFieldNames()

IssueDAO::getLocaleFieldNames ( )

Get a list of fields for which localized data is supported

Returns
array

Reimplemented from DAO.

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

◆ getNumArticles()

IssueDAO::getNumArticles (   $issueId)

Return number of articles assigned to an issue.

Parameters
$issueIdint
Returns
int

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

References DAO\retrieve().

◆ getPublishedIssues()

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

Get published issues organized by published date

Parameters
$journalIdint
$rangeInfoobject DBResultRange
Returns
DAOResultFactory

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

References DAO\retrieveRange().

Referenced by setDefaultCustomIssueOrders().

◆ getPublishedIssuesByNumber()

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
DAOResultFactory object

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

References DAO\retrieve().

◆ getUnpublishedIssues()

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

Get unpublished issues organized by published date

Parameters
$journalIdint
$rangeInfoobject DBResultRange
Returns
DAOResultFactory

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

References DAO\retrieveRange().

◆ insertCustomIssueOrder()

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

INTERNAL USE ONLY: Insert a custom issue ordering

Parameters
$journalIdint
$issueIdint
$seqint

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

References DAO\update().

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

◆ insertObject()

IssueDAO::insertObject (   $issue)

inserts a new issue into issues table

Parameters
Issueobject
Returns
Issue Id int

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

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

◆ issueExists()

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

Check if volume, number and year have already been issued

Parameters
$journalIdint
$volumeint
$numberint
$yearint
$issueIdint Issue ID to exclude from results
Returns
boolean

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

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

◆ issueIdExists()

IssueDAO::issueIdExists (   $issueId,
  $journalId 
)

Checks if issue exists

Parameters
$issueIdint
$journalIdint
Returns
boolean

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

References DAO\retrieve().

◆ moveCustomIssueOrder()

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 801 of file IssueDAO.inc.php.

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

◆ newDataObject()

IssueDAO::newDataObject ( )

Construct a new data object.

Returns
Issue

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

Referenced by _fromRow().

◆ pubIdExists()

IssueDAO::pubIdExists (   $pubIdType,
  $pubId,
  $excludePubObjectId,
  $contextId 
)

Checks if public identifier exists (other than for the specified submission 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
$excludePubObjectIdint ID of the pub object to be excluded from the search.
$contextIdint
Returns
boolean

Reimplemented from PKPPubIdPluginDAO.

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

References DAO\retrieve().

◆ resequenceCustomIssueOrders()

IssueDAO::resequenceCustomIssueOrders (   $journalId)

Sequentially renumber custom issue orderings in their sequence order.

Parameters
$journalIdint

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

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

Referenced by deleteObject(), insertObject(), and updateObject().

◆ setDefaultCustomIssueOrders()

IssueDAO::setDefaultCustomIssueOrders (   $journalId)

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

Parameters
$journalIdint

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

References getPublishedIssues(), and insertCustomIssueOrder().

◆ updateCurrent()

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

update current issue

Returns
Issue object

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

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

◆ updateLocaleFields()

IssueDAO::updateLocaleFields ( $issue)

Update the localized fields for this object.

Parameters
$issue

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

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

◆ updateObject()

IssueDAO::updateObject (   $issue)

updates an issue

Parameters
Issueobject

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

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

Referenced by updateCurrent().

Field Documentation

◆ $caches

IssueDAO::$caches

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


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