Open Journal Systems  3.3.0
StageAssignmentDAO Class Reference
Inheritance diagram for StageAssignmentDAO:
DAO

Public Member Functions

 _fromRow ($row)
 
 _getByIds ($submissionId=null, $stageId=null, $userGroupId=null, $userId=null, $roleId=null, $single=false)
 
 build ($submissionId, $userGroupId, $userId, $recommendOnly=false, $canChangeMetadata=null)
 
 deleteByAll ($submissionId, $userGroupId, $userId)
 
 deleteObject ($stageAssignment)
 
 editorAssignedToStage ($submissionId, $stageId=null)
 
 getBaseQueryForAssignmentSelection ()
 
 getById ($stageAssignmentId)
 
 getBySubmissionAndRoleId ($submissionId, $roleId, $stageId=null, $userId=null)
 
 getBySubmissionAndStageId ($submissionId, $stageId=null, $userGroupId=null, $userId=null)
 
 getBySubmissionAndUserIdAndStageId ($submissionId, $userId, $stageId=null)
 
 getByUserGroupId ($userGroupId, $contextId)
 
 getByUserId ($userId)
 
 getEditorsAssignedToStage ($submissionId, $stageId)
 
 getInsertId ()
 
 insertObject ($stageAssignment)
 
 newDataObject ()
 
 updateObject ($stageAssignment)
 
- 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)
 

Additional Inherited Members

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

Detailed Description

Operations for retrieving and modifying StageAssignment objects.

See also
StageAssignment

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

Member Function Documentation

◆ _fromRow()

StageAssignmentDAO::_fromRow (   $row)

Internal function to return an StageAssignment object from a row.

Parameters
$rowarray
Returns
StageAssignment

Definition at line 190 of file StageAssignmentDAO.inc.php.

References newDataObject().

Referenced by _getByIds(), and getById().

◆ _getByIds()

StageAssignmentDAO::_getByIds (   $submissionId = null,
  $stageId = null,
  $userGroupId = null,
  $userId = null,
  $roleId = null,
  $single = false 
)

Retrieve a stageAssignment by submission and stage IDs. Private method that holds most of the work. serves two purposes: returns a single assignment or returns a factory, depending on the calling context.

Parameters
$submissionIdint
$stageIdint optional
$userGroupIdint optional
$userIdint optional
$roleIdint optional ROLE_ID_...
$singlebool specify if only one stage assignment (default is a ResultFactory)
Returns
StageAssignment|ResultFactory Mixed, depending on $single

Definition at line 305 of file StageAssignmentDAO.inc.php.

References _fromRow(), getBaseQueryForAssignmentSelection(), and DAO\retrieve().

Referenced by getBySubmissionAndRoleId(), getBySubmissionAndStageId(), getBySubmissionAndUserIdAndStageId(), and getByUserId().

◆ build()

StageAssignmentDAO::build (   $submissionId,
  $userGroupId,
  $userId,
  $recommendOnly = false,
  $canChangeMetadata = null 
)

Fetch a stageAssignment by symbolic info, building it if needed.

Parameters
$submissionIdint
$userGroupIdint
$userIdint
$recommendOnlyboolean
$canChangeMetadataboolean
Returns
StageAssignment

Definition at line 150 of file StageAssignmentDAO.inc.php.

References getBySubmissionAndStageId(), DAORegistry\getDAO(), getInsertId(), insertObject(), and newDataObject().

◆ deleteByAll()

StageAssignmentDAO::deleteByAll (   $submissionId,
  $userGroupId,
  $userId 
)

Delete a stageAssignment by matching on all fields.

Parameters
$submissionIdint Submission ID
$userGroupIdint User group ID
$userIdint User ID

Definition at line 274 of file StageAssignmentDAO.inc.php.

References DAO\update().

Referenced by deleteObject().

◆ deleteObject()

StageAssignmentDAO::deleteObject (   $stageAssignment)

Delete a StageAssignment.

Parameters
$stageAssignmentStageAssignment

Definition at line 260 of file StageAssignmentDAO.inc.php.

References deleteByAll().

◆ editorAssignedToStage()

StageAssignmentDAO::editorAssignedToStage (   $submissionId,
  $stageId = null 
)

Test if an editor or a sub editor is assigned to the submission This test is used to determine what grid to place a submission into, and to know if the review stage can be started.

Parameters
$submissionId(int) The id of the submission being tested.
$stageId(int) The id of the stage being tested.
Returns
bool

Definition at line 100 of file StageAssignmentDAO.inc.php.

References DAO\retrieve().

◆ getBaseQueryForAssignmentSelection()

StageAssignmentDAO::getBaseQueryForAssignmentSelection ( )

Base query to select an stage assignment.

Returns
string

Definition at line 355 of file StageAssignmentDAO.inc.php.

Referenced by _getByIds(), and getById().

◆ getById()

StageAssignmentDAO::getById (   $stageAssignmentId)

Retrieve an assignment by its ID

Parameters
$stageAssignmentIdint
Returns
StageAssignment

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

References _fromRow(), getBaseQueryForAssignmentSelection(), and DAO\retrieve().

◆ getBySubmissionAndRoleId()

StageAssignmentDAO::getBySubmissionAndRoleId (   $submissionId,
  $roleId,
  $stageId = null,
  $userId = null 
)

Retrieve StageAssignments by submission and role IDs.

Parameters
$submissionIdint Submission ID
$roleIdint ROLE_ID_...
$stageIdint (optional)
$userIdint (optional)
Returns
DAOResultFactory StageAssignment

Definition at line 55 of file StageAssignmentDAO.inc.php.

References _getByIds().

Referenced by getEditorsAssignedToStage().

◆ getBySubmissionAndStageId()

StageAssignmentDAO::getBySubmissionAndStageId (   $submissionId,
  $stageId = null,
  $userGroupId = null,
  $userId = null 
)

Retrieve StageAssignments by submission and stage IDs.

Parameters
$submissionIdint
$stageIdint (optional)
$userGroupIdint (optional)
$userIdint (optional)
Returns
DAOResultFactory StageAssignment

Definition at line 43 of file StageAssignmentDAO.inc.php.

References _getByIds().

Referenced by build().

◆ getBySubmissionAndUserIdAndStageId()

StageAssignmentDAO::getBySubmissionAndUserIdAndStageId (   $submissionId,
  $userId,
  $stageId = null 
)

Retrieve StageAssignments by submission and user IDs

Parameters
$submissionIdint Submission ID
$userIdint User ID
$stageIdint optional WORKFLOW_STAGE_ID_...
Returns
DAOResultFactory StageAssignment

Definition at line 76 of file StageAssignmentDAO.inc.php.

References _getByIds().

◆ getByUserGroupId()

StageAssignmentDAO::getByUserGroupId (   $userGroupId,
  $contextId 
)

Retrieve all assignments by UserGroupId and ContextId

Parameters
$userGroupIdint
$contextIdint
Returns
DAOResultFactory

Definition at line 125 of file StageAssignmentDAO.inc.php.

References DAO\retrieve().

◆ getByUserId()

StageAssignmentDAO::getByUserId (   $userId)

Get by user ID

Parameters
$userIdint
Returns
StageAssignment

Definition at line 64 of file StageAssignmentDAO.inc.php.

References _getByIds().

◆ getEditorsAssignedToStage()

StageAssignmentDAO::getEditorsAssignedToStage (   $submissionId,
  $stageId 
)

Get editor stage assignments.

Parameters
$submissionIdint
$stageIdint
Returns
array StageAssignment

Definition at line 86 of file StageAssignmentDAO.inc.php.

References getBySubmissionAndRoleId().

◆ getInsertId()

StageAssignmentDAO::getInsertId ( )

Get the ID of the last inserted stage assignment.

Returns
int

Definition at line 288 of file StageAssignmentDAO.inc.php.

References DAO\_getInsertId().

Referenced by build().

◆ insertObject()

StageAssignmentDAO::insertObject (   $stageAssignment)

Insert a new StageAssignment.

Parameters
$stageAssignmentStageAssignment

Definition at line 209 of file StageAssignmentDAO.inc.php.

References DAO\datetimeToDB(), Core\getCurrentDate(), and DAO\update().

Referenced by build().

◆ newDataObject()

StageAssignmentDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
StageAssignmentEntry

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

Referenced by _fromRow(), and build().

◆ updateObject()

StageAssignmentDAO::updateObject (   $stageAssignment)

Update a new StageAssignment.

Parameters
$stageAssignmentStageAssignment

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

References DAO\datetimeToDB(), Core\getCurrentDate(), and DAO\update().


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