Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
PKPAnnouncementTypeDAO Class Reference
Inheritance diagram for PKPAnnouncementTypeDAO:
DAO AnnouncementTypeDAO

Public Member Functions

 _fromRow ($row)
 
 announcementTypeExistsByTypeId ($typeId, $assocType, $assocId)
 
 deleteByAssoc ($assocType, $assocId)
 
 deleteById ($typeId)
 
 deleteObject ($announcementType)
 
 getAnnouncementTypeAssocId ($typeId)
 
 getAnnouncementTypeName ($typeId)
 
 getByAssoc ($assocType, $assocId, $rangeInfo=null)
 
 getById ($typeId)
 
 getByTypeName ($typeName, $assocType, $assocId)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 insertObject ($announcementType)
 
 newDataObject ()
 
 PKPAnnouncementTypeDAO ()
 
 updateLocaleFields ($announcementType)
 
 updateObject ($announcementType)
 
- 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 AnnouncementType objects.

See Also
AnnouncementType, PKPAnnouncementType

Definition at line 20 of file PKPAnnouncementTypeDAO.inc.php.

Member Function Documentation

PKPAnnouncementTypeDAO::_fromRow (   $row)

Internal function to return an AnnouncementType object from a row.

Parameters
$rowarray
Returns
AnnouncementType

Definition at line 157 of file PKPAnnouncementTypeDAO.inc.php.

References newDataObject().

Referenced by getById().

PKPAnnouncementTypeDAO::announcementTypeExistsByTypeId (   $typeId,
  $assocType,
  $assocId 
)

Check if a announcement type exists with the given type id for a assoc type/id pair.

Parameters
$typeIdint
$assocTypeint ASSOC_TYPE_...
$assocIdint
Returns
boolean

Definition at line 97 of file PKPAnnouncementTypeDAO.inc.php.

References DAO\retrieve().

PKPAnnouncementTypeDAO::deleteByAssoc (   $assocType,
  $assocId 
)

Delete announcement types by association.

Parameters
$assocTypeint ASSOC_TYPE_...
$assocIdint

Definition at line 248 of file PKPAnnouncementTypeDAO.inc.php.

References deleteObject(), and getByAssoc().

PKPAnnouncementTypeDAO::deleteById (   $typeId)

Delete an announcement type by announcement type ID. Note that all announcements with this type ID are also deleted.

Parameters
$typeIdint

Definition at line 235 of file PKPAnnouncementTypeDAO.inc.php.

References DAORegistry\getDAO(), and DAO\update().

Referenced by deleteObject().

PKPAnnouncementTypeDAO::deleteObject (   $announcementType)

Delete an announcement type. Note that all announcements with this type are also deleted.

Parameters
$announcementTypeAnnouncementType
Returns
boolean

Definition at line 226 of file PKPAnnouncementTypeDAO.inc.php.

References deleteById().

Referenced by deleteByAssoc().

PKPAnnouncementTypeDAO::getAnnouncementTypeAssocId (   $typeId)

Retrieve announcement type Assoc ID by announcement type ID.

Parameters
$typeIdint
Returns
int

Definition at line 60 of file PKPAnnouncementTypeDAO.inc.php.

References DAO\retrieve().

PKPAnnouncementTypeDAO::getAnnouncementTypeName (   $typeId)

Retrieve announcement type name by ID.

Parameters
$typeIdint
Returns
string

Definition at line 74 of file PKPAnnouncementTypeDAO.inc.php.

References AppLocale\getLocale(), AppLocale\getPrimaryLocale(), and DAO\retrieve().

PKPAnnouncementTypeDAO::getByAssoc (   $assocType,
  $assocId,
  $rangeInfo = null 
)

Retrieve an array of announcement types matching a particular Assoc ID.

Parameters
$assocTypeint ASSOC_TYPE_...
$assocIdint
$rangeInfoDBResultRange (optional)
Returns
object DAOResultFactory containing matching AnnouncementTypes

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

References DAO\retrieveRange().

Referenced by deleteByAssoc().

PKPAnnouncementTypeDAO::getById (   $typeId)

Retrieve an announcement type by announcement type ID.

Parameters
$typeIdint
Returns
AnnouncementType

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

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

PKPAnnouncementTypeDAO::getByTypeName (   $typeName,
  $assocType,
  $assocId 
)

Return announcement type ID based on a type name for an assoc type/id pair.

Parameters
$typeNamestring
$assocTypeint ASSOC_TYPE_...
$assocIdint
Returns
int

Definition at line 131 of file PKPAnnouncementTypeDAO.inc.php.

References DAO\retrieve().

PKPAnnouncementTypeDAO::getInsertId ( )

Get the ID of the last inserted announcement type.

Returns
int

Definition at line 276 of file PKPAnnouncementTypeDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertObject().

PKPAnnouncementTypeDAO::getLocaleFieldNames ( )

Get the locale field names.

Returns
array

Definition at line 120 of file PKPAnnouncementTypeDAO.inc.php.

PKPAnnouncementTypeDAO::insertObject (   $announcementType)

Insert a new AnnouncementType.

Parameters
$announcementTypeAnnouncementType
Returns
int

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

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

PKPAnnouncementTypeDAO::newDataObject ( )

Generate a new data object.

Returns
DataObject

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

Referenced by _fromRow().

PKPAnnouncementTypeDAO::PKPAnnouncementTypeDAO ( )

Constructor

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

PKPAnnouncementTypeDAO::updateLocaleFields (   $announcementType)

Update the localized settings for this object

Parameters
$announcementTypeobject

Definition at line 171 of file PKPAnnouncementTypeDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

PKPAnnouncementTypeDAO::updateObject (   $announcementType)

Update an existing announcement type.

Parameters
$announcementAnnouncementType
Returns
boolean

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

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


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