Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
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)
 
 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)
 
 getByUserId ($userId)
 
 getEditorsAssignedToStage ($submissionId, $stageId)
 
 getInsertId ()
 
 insertObject ($stageAssignment)
 
 newDataObject ()
 
 StageAssignmentDAO ()
 
- 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 ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 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

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes 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

StageAssignmentDAO::_fromRow (   $row)

Internal function to return an StageAssignment object from a row.

Parameters
$rowarray
Returns
StageAssignment

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

References newDataObject().

Referenced by _getByIds(), and getById().

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
$singlebool specify if only one stage assignment (default is a ResultFactory)
Returns
StageAssignment or ResultFactory

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

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

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

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

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

Parameters
$submissionIdint
$userGroupIdint
$userIdint
Returns
StageAssignment

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

References getBySubmissionAndStageId(), getInsertId(), insertObject(), and newDataObject().

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

Delete a stageAssignment by matching on all fields.

Parameters
$submissionIdint
$userGroupIdint
$userIdint
Returns
boolean

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

References DAO\update().

Referenced by deleteObject().

StageAssignmentDAO::deleteObject (   $stageAssignment)

Delete a StageAssignment.

Parameters
$stageAssignmentStageAssignment
Returns
int

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

References deleteByAll().

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 93 of file StageAssignmentDAO.inc.php.

References DAO\retrieve().

StageAssignmentDAO::getBaseQueryForAssignmentSelection ( )

Base query to select an stage assignment.

Returns
string

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

Referenced by _getByIds(), and getById().

StageAssignmentDAO::getById (   $stageAssignmentId)

Retrieve an assignment by its ID

Parameters
$stageAssignmentIdint
Returns
StageAssignment

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

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

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

Retrieve StageAssignments by submission and role IDs.

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

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

References _getByIds().

Referenced by getEditorsAssignedToStage().

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 49 of file StageAssignmentDAO.inc.php.

References _getByIds().

Referenced by build().

StageAssignmentDAO::getByUserId (   $userId)
Parameters
$userIdint
Returns
StageAssignment

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

References _getByIds().

StageAssignmentDAO::getEditorsAssignedToStage (   $submissionId,
  $stageId 
)

Get editor stage assignments.

Parameters
$submissionIdint
$stageIdint
Returns
array

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

References getBySubmissionAndRoleId().

StageAssignmentDAO::getInsertId ( )

Get the ID of the last inserted stage assignment.

Returns
int

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

References DAO\_getInsertId().

Referenced by build().

StageAssignmentDAO::insertObject (   $stageAssignment)

Insert a new StageAssignment.

Parameters
$stageAssignmentStageAssignment
Returns
bool

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

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

Referenced by build().

StageAssignmentDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
StageAssignmentEntry

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

Referenced by _fromRow(), and build().

StageAssignmentDAO::StageAssignmentDAO ( )

Constructor

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


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