Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
PKPAnnouncementDAO Class Reference
Inheritance diagram for PKPAnnouncementDAO:
DAO AnnouncementDAO

Public Member Functions

_returnAnnouncementFromRow (&$row)
 
 deleteAnnouncement ($announcement)
 
 deleteAnnouncementById ($announcementId)
 
 deleteAnnouncementsByAssocId ($assocType, $assocId)
 
 deleteByAssoc ($assocType, $assocId)
 
 deleteById ($announcementId)
 
 deleteByTypeId ($typeId)
 
 deleteObject ($announcement)
 
getAnnouncement ($announcementId)
 
 getAnnouncementAssocId ($announcementId)
 
 getAnnouncementAssocType ($announcementId)
 
getAnnouncementsByAssocId ($assocType, $assocId, $rangeInfo=null)
 
getAnnouncementsByTypeId ($typeId, $rangeInfo=null)
 
getAnnouncementsNotExpiredByAssocId ($assocType, $assocId, $rangeInfo=null)
 
getByAssocId ($assocType, $assocId, $rangeInfo=null)
 
getById ($announcementId)
 
getByTypeId ($typeId, $rangeInfo=null)
 
 getInsertAnnouncementId ()
 
 getLocaleFieldNames ()
 
getMostRecentAnnouncementByAssocId ($assocType, $assocId)
 
getNumAnnouncementsByAssocId ($assocType, $assocId, $numAnnouncements, $rangeInfo=null)
 
getNumAnnouncementsNotExpiredByAssocId ($assocType, $assocId, $numAnnouncements, $rangeInfo=null)
 
 insertAnnouncement (&$announcement)
 
 newDataObject ()
 
 PKPAnnouncementDAO ()
 
 updateAnnouncement (&$announcement)
 
 updateLocaleFields (&$announcement)
 
 updateObject (&$announcement)
 
- 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 ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 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

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying Announcement objects.

See Also
Announcement, PKPAnnouncement

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

Member Function Documentation

& PKPAnnouncementDAO::_returnAnnouncementFromRow ( $row)

Internal function to return an Announcement object from a row.

Parameters
$rowarray
Returns
Announcement

Definition at line 103 of file PKPAnnouncementDAO.inc.php.

References DAO\datetimeFromDB(), and newDataObject().

Referenced by getById(), and getMostRecentAnnouncementByAssocId().

PKPAnnouncementDAO::deleteAnnouncement (   $announcement)
See Also
deleteObject

Definition at line 199 of file PKPAnnouncementDAO.inc.php.

References deleteObject(), and Config\getVar().

PKPAnnouncementDAO::deleteAnnouncementById (   $announcementId)
See Also
deleteById

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

References deleteById(), and Config\getVar().

PKPAnnouncementDAO::deleteAnnouncementsByAssocId (   $assocType,
  $assocId 
)
See Also
deleteByAssocId

Definition at line 252 of file PKPAnnouncementDAO.inc.php.

References Config\getVar().

PKPAnnouncementDAO::deleteByAssoc (   $assocType,
  $assocId 
)

Delete announcements by Assoc ID

Parameters
$assocTypeint
$assocIdint

Definition at line 240 of file PKPAnnouncementDAO.inc.php.

References deleteById(), and getByAssocId().

PKPAnnouncementDAO::deleteById (   $announcementId)

Delete an announcement by announcement ID.

Parameters
$announcementIdint
Returns
boolean

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

References DAO\update().

Referenced by deleteAnnouncementById(), deleteByAssoc(), and deleteObject().

PKPAnnouncementDAO::deleteByTypeId (   $typeId)

Delete announcements by announcement type ID.

Parameters
$typeIdint
Returns
boolean

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

References deleteObject(), and getByTypeId().

PKPAnnouncementDAO::deleteObject (   $announcement)

Delete an announcement.

Parameters
$announcementAnnouncement
Returns
boolean

Definition at line 192 of file PKPAnnouncementDAO.inc.php.

References deleteById().

Referenced by deleteAnnouncement(), and deleteByTypeId().

& PKPAnnouncementDAO::getAnnouncement (   $announcementId)
See Also
getById

Definition at line 49 of file PKPAnnouncementDAO.inc.php.

References getById(), and Config\getVar().

PKPAnnouncementDAO::getAnnouncementAssocId (   $announcementId)

Retrieve announcement Assoc ID by announcement ID.

Parameters
$announcementIdint
Returns
int

Definition at line 59 of file PKPAnnouncementDAO.inc.php.

References DAO\retrieve().

PKPAnnouncementDAO::getAnnouncementAssocType (   $announcementId)

Retrieve announcement Assoc ID by announcement ID.

Parameters
$announcementIdint
Returns
int

Definition at line 73 of file PKPAnnouncementDAO.inc.php.

References DAO\retrieve().

& PKPAnnouncementDAO::getAnnouncementsByAssocId (   $assocType,
  $assocId,
  $rangeInfo = null 
)
See Also
getByAssocId

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

References getByAssocId(), and Config\getVar().

& PKPAnnouncementDAO::getAnnouncementsByTypeId (   $typeId,
  $rangeInfo = null 
)
See Also
getByTypeId

Definition at line 303 of file PKPAnnouncementDAO.inc.php.

References getByTypeId(), and Config\getVar().

& PKPAnnouncementDAO::getAnnouncementsNotExpiredByAssocId (   $assocType,
  $assocId,
  $rangeInfo = null 
)

Retrieve an array of announcements with no/valid expiry date matching a particular Assoc ID.

Parameters
$assocTypeint
$assocIdint
$rangeInfoDBResultRange
Returns
object DAOResultFactory containing matching Announcements

Definition at line 335 of file PKPAnnouncementDAO.inc.php.

References DAO\retrieveRange().

& PKPAnnouncementDAO::getByAssocId (   $assocType,
  $assocId,
  $rangeInfo = null 
)

Retrieve an array of announcements matching a particular assoc ID.

Parameters
$assocTypeint
Returns
object DAOResultFactory containing matching Announcements

Definition at line 262 of file PKPAnnouncementDAO.inc.php.

References DAO\retrieveRange().

Referenced by deleteByAssoc(), and getAnnouncementsByAssocId().

& PKPAnnouncementDAO::getById (   $announcementId)

Retrieve an announcement by announcement ID.

Parameters
$announcementIdint
Returns
Announcement

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

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

Referenced by getAnnouncement().

& PKPAnnouncementDAO::getByTypeId (   $typeId,
  $rangeInfo = null 
)

Retrieve an array of announcements matching a particular type ID.

Parameters
$typeIdint
Returns
object DAOResultFactory containing matching Announcements

Definition at line 289 of file PKPAnnouncementDAO.inc.php.

References DAO\retrieveRange().

Referenced by deleteByTypeId(), and getAnnouncementsByTypeId().

PKPAnnouncementDAO::getInsertAnnouncementId ( )

Get the ID of the last inserted announcement.

Returns
int

Definition at line 399 of file PKPAnnouncementDAO.inc.php.

References DAO\getInsertId().

Referenced by insertAnnouncement().

PKPAnnouncementDAO::getLocaleFieldNames ( )

Get the list of localized field names for this table

Returns
array

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

& PKPAnnouncementDAO::getMostRecentAnnouncementByAssocId (   $assocType,
  $assocId 
)

Retrieve most recent announcement by Assoc ID.

Parameters
$assocTypeint
Returns
Announcement

Definition at line 377 of file PKPAnnouncementDAO.inc.php.

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

& PKPAnnouncementDAO::getNumAnnouncementsByAssocId (   $assocType,
  $assocId,
  $numAnnouncements,
  $rangeInfo = null 
)

Retrieve an array of numAnnouncements announcements matching a particular Assoc ID.

Parameters
$assocTypeint
Returns
object DAOResultFactory containing matching Announcements

Definition at line 313 of file PKPAnnouncementDAO.inc.php.

References DAO\retrieveRange().

& PKPAnnouncementDAO::getNumAnnouncementsNotExpiredByAssocId (   $assocType,
  $assocId,
  $numAnnouncements,
  $rangeInfo = null 
)

Retrieve an array of numAnnouncements announcements with no/valid expiry date matching a particular Assoc ID.

Parameters
$assocTypeint
Returns
object DAOResultFactory containing matching Announcements

Definition at line 356 of file PKPAnnouncementDAO.inc.php.

References DAO\retrieveRange().

PKPAnnouncementDAO::insertAnnouncement ( $announcement)

Insert a new Announcement.

Parameters
$announcementAnnouncement
Returns
int

Definition at line 132 of file PKPAnnouncementDAO.inc.php.

References DAO\datetimeToDB(), getInsertAnnouncementId(), DAO\update(), and updateLocaleFields().

PKPAnnouncementDAO::newDataObject ( )

Get a new data object.

Returns
DataObject

Definition at line 94 of file PKPAnnouncementDAO.inc.php.

Referenced by _returnAnnouncementFromRow().

PKPAnnouncementDAO::PKPAnnouncementDAO ( )

Constructor

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

PKPAnnouncementDAO::updateAnnouncement ( $announcement)
See Also
updateObject

Definition at line 182 of file PKPAnnouncementDAO.inc.php.

References Config\getVar(), and updateObject().

PKPAnnouncementDAO::updateLocaleFields ( $announcement)

Update the settings for this object

Parameters
$announcementobject

Definition at line 121 of file PKPAnnouncementDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertAnnouncement(), and updateObject().

PKPAnnouncementDAO::updateObject ( $announcement)

Update an existing announcement.

Parameters
$announcementAnnouncement
Returns
boolean

Definition at line 156 of file PKPAnnouncementDAO.inc.php.

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

Referenced by updateAnnouncement().


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