Open Journal Systems  3.3.0
PKPPublicationDAO Class Reference
Inheritance diagram for PKPPublicationDAO:
SchemaDAO PKPPubIdPluginDAO DAO PublicationDAO

Public Member Functions

 _fromRow ($primaryRow)
 
 changePubId ($pubObjectId, $pubIdType, $pubId)
 
 deleteAllPubIds ($contextId, $pubIdType)
 
 deleteById ($publicationId)
 
 deletePubId ($pubObjectId, $pubIdType)
 
 insertObject ($publication)
 
 newDataObject ()
 
 pubIdExists ($pubIdType, $pubId, $excludePubObjectId, $contextId)
 
 updateObject ($publication)
 
- Public Member Functions inherited from SchemaDAO
 deleteObject ($object)
 
 getById ($objectId)
 
 getInsertId ()
 
- 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)
 
 flushCache ()
 
 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

 $controlledVocabProps = ['disciplines', 'keywords', 'languages', 'subjects', 'supportingAgencies']
 
 $primaryKeyColumn = 'publication_id'
 
 $schemaName = SCHEMA_PUBLICATION
 
 $settingsTableName = 'publication_settings'
 
 $tableName = 'publications'
 
- 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 publication objects.

See also
DAO

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

Member Function Documentation

◆ _fromRow()

PKPPublicationDAO::_fromRow (   $primaryRow)

Return a DataObject from a result row

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

Reimplemented from SchemaDAO.

Reimplemented in PublicationDAO.

Definition at line 52 of file PKPPublicationDAO.inc.php.

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

◆ changePubId()

PKPPublicationDAO::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 247 of file PKPPublicationDAO.inc.php.

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

◆ deleteAllPubIds()

PKPPublicationDAO::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 280 of file PKPPublicationDAO.inc.php.

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

◆ deleteById()

PKPPublicationDAO::deleteById (   $publicationId)

Delete an object by its ID

Parameters
$objectIdint

Reimplemented from SchemaDAO.

Definition at line 188 of file PKPPublicationDAO.inc.php.

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

◆ deletePubId()

PKPPublicationDAO::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 264 of file PKPPublicationDAO.inc.php.

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

◆ insertObject()

PKPPublicationDAO::insertObject (   $publication)

Insert a new object

Parameters
DataObject$objectThe object to insert into the database
Returns
int The new object's id

Reimplemented from SchemaDAO.

Definition at line 87 of file PKPPublicationDAO.inc.php.

References $controlledVocabProps, and DAORegistry\getDAO().

◆ newDataObject()

PKPPublicationDAO::newDataObject ( )

Create a new DataObject of the appropriate class

Returns
DataObject

Reimplemented from SchemaDAO.

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

◆ pubIdExists()

PKPPublicationDAO::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 222 of file PKPPublicationDAO.inc.php.

References DAO\retrieve().

◆ updateObject()

PKPPublicationDAO::updateObject (   $publication)

Update an object

When updating an object, we remove table rows for any settings which are no longer present.

Multilingual fields are an exception to this. When a locale key is missing from the object, it is not removed from the database. This is to ensure that data from a locale which is later disabled is not automatically removed from the database, and will appear if the locale is re-enabled.

To delete a value for a locale key, a null value must be passed.

Parameters
$objectDataObject The object to insert into the database

Reimplemented from SchemaDAO.

Definition at line 138 of file PKPPublicationDAO.inc.php.

References $controlledVocabProps, and DAORegistry\getDAO().

Field Documentation

◆ $controlledVocabProps

array PKPPublicationDAO::$controlledVocabProps = ['disciplines', 'keywords', 'languages', 'subjects', 'supportingAgencies']

List of properties that are stored in the controlled_vocab tables.

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

Referenced by insertObject(), and updateObject().

◆ $primaryKeyColumn

PKPPublicationDAO::$primaryKeyColumn = 'publication_id'

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

◆ $schemaName

PKPPublicationDAO::$schemaName = SCHEMA_PUBLICATION

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

◆ $settingsTableName

PKPPublicationDAO::$settingsTableName = 'publication_settings'

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

◆ $tableName

PKPPublicationDAO::$tableName = 'publications'

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


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