Open Journal Systems  3.3.0
PKPSubmissionDAO Class Reference
Inheritance diagram for PKPSubmissionDAO:
SchemaDAO DAO SubmissionDAO ReviewerSubmissionDAO

Public Member Functions

 __construct ()
 
 _cacheMiss ($cache, $id)
 
 _fromRow ($row)
 
 _getCache ()
 
 deleteByContextId ($contextId)
 
 deleteById ($submissionId)
 
 deleteObject ($submission)
 
 flushCache ()
 
 getByContextId ($contextId)
 
 getByPubId ($pubIdType, $pubId, $contextId=null)
 
 getDefaultSortOption ()
 
 getExportable ($contextId, $pubIdType=null, $title=null, $author=null, $issueId=null, $pubIdSettingName=null, $pubIdSettingValue=null, $rangeInfo=null)
 
 getInsertId ()
 
 getSortBy ($sortOption)
 
 getSortDirection ($sortOption)
 
 getSortOption ($sortBy, $sortDir)
 
 getSortSelectOptions ()
 
 resetPermissions ($contextId)
 
- Public Member Functions inherited from SchemaDAO
 getById ($objectId)
 
 insertObject ($object)
 
 newDataObject ()
 
 updateObject ($object)
 
- 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)
 
 getAdditionalFieldNames ()
 
 getAffectedRows ()
 
 getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject)
 
 getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getLocaleFieldNames ()
 
 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

 $authorDao
 
 $cache
 
 $primaryKeyColumn = 'submission_id'
 
 $primaryTableColumns
 
 $schemaName = SCHEMA_SUBMISSION
 
 $settingsTableName = 'submission_settings'
 
 $tableName = 'submissions'
 
- Data Fields inherited from SchemaDAO
 $primaryKeyColumn
 
 $primaryTableColumns = array()
 
 $schemaName
 
 $settingsTableName
 
 $tableName
 
- 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 Submission objects.

See also
Submission

Definition at line 24 of file PKPSubmissionDAO.inc.php.

Constructor & Destructor Documentation

◆ __construct()

PKPSubmissionDAO::__construct ( )

Constructor.

Reimplemented in ReviewerSubmissionDAO.

Definition at line 56 of file PKPSubmissionDAO.inc.php.

References DAORegistry\getDAO().

Member Function Documentation

◆ _cacheMiss()

PKPSubmissionDAO::_cacheMiss (   $cache,
  $id 
)

Callback for a cache miss.

Parameters
$cacheCache
$idstring
Returns
Submission

Definition at line 67 of file PKPSubmissionDAO.inc.php.

References $cache, and SchemaDAO\getById().

◆ _fromRow()

PKPSubmissionDAO::_fromRow (   $row)

Return a DataObject from a result row

Parameters
$primaryRowarray The result row from the primary table lookup
Returns
DataObject

Reimplemented from SchemaDAO.

Reimplemented in ReviewerSubmissionDAO.

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

References PKPServices\get().

Referenced by getExportable().

◆ _getCache()

PKPSubmissionDAO::_getCache ( )

Get the submission cache.

Returns
Cache

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

References $cache, and CacheManager\getManager().

Referenced by flushCache().

◆ deleteByContextId()

PKPSubmissionDAO::deleteByContextId (   $contextId)

Definition at line 245 of file PKPSubmissionDAO.inc.php.

References deleteById(), and getByContextId().

◆ deleteById()

PKPSubmissionDAO::deleteById (   $submissionId)

Delete a submission by ID.

Parameters
$submissionIdint

Reimplemented from SchemaDAO.

Reimplemented in SubmissionDAO.

Definition at line 109 of file PKPSubmissionDAO.inc.php.

References PKPServices\get(), SchemaDAO\getById(), and DAORegistry\getDAO().

Referenced by deleteByContextId(), and deleteObject().

◆ deleteObject()

PKPSubmissionDAO::deleteObject (   $submission)

Delete a submission.

Parameters
$submissionSubmission

Reimplemented from SchemaDAO.

Definition at line 101 of file PKPSubmissionDAO.inc.php.

References deleteById().

◆ flushCache()

PKPSubmissionDAO::flushCache ( )

Flush the submission cache.

Reimplemented from DAO.

Definition at line 222 of file PKPSubmissionDAO.inc.php.

References _getCache().

Referenced by SubmissionDAO\changeStatus(), SubmissionDAO\deleteById(), SubmissionDAO\removeSubmissionsFromSection(), and resetPermissions().

◆ getByContextId()

PKPSubmissionDAO::getByContextId (   $contextId)

Get all submissions for a context.

Parameters
$contextIdint
Returns
DAOResultFactory containing matching Submissions

Definition at line 232 of file PKPSubmissionDAO.inc.php.

References DAO\retrieve().

Referenced by deleteByContextId(), and resetPermissions().

◆ getByPubId()

PKPSubmissionDAO::getByPubId (   $pubIdType,
  $pubId,
  $contextId = null 
)

Retrieve submission by public 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
$contextIdint
Returns
Submission|null

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

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

◆ getDefaultSortOption()

PKPSubmissionDAO::getDefaultSortOption ( )

Get default sort option.

Returns
string

Definition at line 279 of file PKPSubmissionDAO.inc.php.

References getSortOption().

◆ getExportable()

PKPSubmissionDAO::getExportable (   $contextId,
  $pubIdType = null,
  $title = null,
  $author = null,
  $issueId = null,
  $pubIdSettingName = null,
  $pubIdSettingValue = null,
  $rangeInfo = null 
)

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

Parameters
$contextIdinteger optional
$pubIdTypestring
$titlestring optional
$authorstring optional
$issueIdinteger optional
$pubIdSettingNamestring optional (e.g. crossref::status or crossref::registeredDoi)
$pubIdSettingValuestring optional
$rangeInfoDBResultRange optional
Returns
DAOResultFactory

Definition at line 339 of file PKPSubmissionDAO.inc.php.

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

◆ getInsertId()

PKPSubmissionDAO::getInsertId ( )

Get the ID of the last inserted submission.

Returns
int

Reimplemented from SchemaDAO.

Definition at line 215 of file PKPSubmissionDAO.inc.php.

References DAO\_getInsertId().

◆ getSortBy()

PKPSubmissionDAO::getSortBy (   $sortOption)

Get sort way for a sort option.

Parameters
$sortOptionstring concat(sortBy, '-', sortDir)
Returns
string

Definition at line 311 of file PKPSubmissionDAO.inc.php.

◆ getSortDirection()

PKPSubmissionDAO::getSortDirection (   $sortOption)

Get sort direction for a sort option.

Parameters
$sortOptionstring concat(sortBy, '-', sortDir)
Returns
int

Definition at line 321 of file PKPSubmissionDAO.inc.php.

◆ getSortOption()

PKPSubmissionDAO::getSortOption (   $sortBy,
  $sortDir 
)

Get sort option.

Parameters
$sortBystring
$sortDirint
Returns
string

Definition at line 302 of file PKPSubmissionDAO.inc.php.

Referenced by getDefaultSortOption(), and getSortSelectOptions().

◆ getSortSelectOptions()

PKPSubmissionDAO::getSortSelectOptions ( )

Get possible sort options.

Returns
array

Definition at line 287 of file PKPSubmissionDAO.inc.php.

References getSortOption().

◆ resetPermissions()

PKPSubmissionDAO::resetPermissions (   $contextId)

Reset the attached licenses of all submissions in a context to context defaults.

Parameters
$contextIdint

Definition at line 256 of file PKPSubmissionDAO.inc.php.

References flushCache(), PKPServices\get(), PKPApplication\get(), and getByContextId().

Field Documentation

◆ $authorDao

PKPSubmissionDAO::$authorDao

Definition at line 26 of file PKPSubmissionDAO.inc.php.

◆ $cache

PKPSubmissionDAO::$cache

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

Referenced by _cacheMiss(), and _getCache().

◆ $primaryKeyColumn

PKPSubmissionDAO::$primaryKeyColumn = 'submission_id'

The column name for the object id in primary and settings tables

Definition at line 38 of file PKPSubmissionDAO.inc.php.

◆ $primaryTableColumns

PKPSubmissionDAO::$primaryTableColumns
Initial value:
= [
'id' => 'submission_id',
'contextId' => 'context_id',
'currentPublicationId' => 'current_publication_id',
'dateLastActivity' => 'date_last_activity',
'dateSubmitted' => 'date_submitted',
'lastModified' => 'last_modified',
'stageId' => 'stage_id',
'status' => 'status',
'submissionProgress' => 'submission_progress',
]

Maps schema properties for the primary table to their column names

Definition at line 41 of file PKPSubmissionDAO.inc.php.

◆ $schemaName

PKPSubmissionDAO::$schemaName = SCHEMA_SUBMISSION

One of the SCHEMA_... constants

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

◆ $settingsTableName

PKPSubmissionDAO::$settingsTableName = 'submission_settings'

The name of the settings table for this object

Definition at line 35 of file PKPSubmissionDAO.inc.php.

◆ $tableName

PKPSubmissionDAO::$tableName = 'submissions'

The name of the primary table for this object

Definition at line 32 of file PKPSubmissionDAO.inc.php.


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