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

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, $assocType=null, $assocId=null)
 
 getByTypeName ($typeName, $assocType, $assocId)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 insertObject ($announcementType)
 
 newDataObject ()
 
 updateLocaleFields ($announcementType)
 
 updateObject ($announcementType)
 
- 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 ()
 
 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 AnnouncementType objects.

See also
AnnouncementType

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

Member Function Documentation

◆ _fromRow()

AnnouncementTypeDAO::_fromRow (   $row)

Internal function to return an AnnouncementType object from a row.

Parameters
$rowarray
Returns
AnnouncementType

Definition at line 158 of file AnnouncementTypeDAO.inc.php.

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

Referenced by getById().

◆ announcementTypeExistsByTypeId()

AnnouncementTypeDAO::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 98 of file AnnouncementTypeDAO.inc.php.

References DAO\retrieve().

◆ deleteByAssoc()

AnnouncementTypeDAO::deleteByAssoc (   $assocType,
  $assocId 
)

Delete announcement types by association.

Parameters
$assocTypeint ASSOC_TYPE_...
$assocIdint

Definition at line 249 of file AnnouncementTypeDAO.inc.php.

References deleteObject(), and getByAssoc().

◆ deleteById()

AnnouncementTypeDAO::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 236 of file AnnouncementTypeDAO.inc.php.

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

Referenced by deleteObject().

◆ deleteObject()

AnnouncementTypeDAO::deleteObject (   $announcementType)

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

Parameters
$announcementTypeAnnouncementType
Returns
boolean

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

References deleteById().

Referenced by deleteByAssoc().

◆ getAnnouncementTypeAssocId()

AnnouncementTypeDAO::getAnnouncementTypeAssocId (   $typeId)

Retrieve announcement type Assoc ID by announcement type ID.

Parameters
$typeIdint
Returns
int

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

References DAO\retrieve().

◆ getAnnouncementTypeName()

AnnouncementTypeDAO::getAnnouncementTypeName (   $typeId)

Retrieve announcement type name by ID.

Parameters
$typeIdint
Returns
string

Definition at line 75 of file AnnouncementTypeDAO.inc.php.

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

◆ getByAssoc()

AnnouncementTypeDAO::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 263 of file AnnouncementTypeDAO.inc.php.

References DAO\retrieveRange().

Referenced by deleteByAssoc().

◆ getById()

AnnouncementTypeDAO::getById (   $typeId,
  $assocType = null,
  $assocId = null 
)

Retrieve an announcement type by announcement type ID.

Parameters
$typeIdint Announcement type ID
$assocTypeint Optional assoc type
$assocIdint Optional assoc ID
Returns
AnnouncementType

Definition at line 37 of file AnnouncementTypeDAO.inc.php.

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

◆ getByTypeName()

AnnouncementTypeDAO::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 132 of file AnnouncementTypeDAO.inc.php.

References DAO\retrieve().

◆ getInsertId()

AnnouncementTypeDAO::getInsertId ( )

Get the ID of the last inserted announcement type.

Returns
int

Definition at line 277 of file AnnouncementTypeDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertObject().

◆ getLocaleFieldNames()

AnnouncementTypeDAO::getLocaleFieldNames ( )

Get the locale field names.

Returns
array

Reimplemented from DAO.

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

◆ insertObject()

AnnouncementTypeDAO::insertObject (   $announcementType)

Insert a new AnnouncementType.

Parameters
$announcementTypeAnnouncementType
Returns
int

Definition at line 183 of file AnnouncementTypeDAO.inc.php.

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

◆ newDataObject()

AnnouncementTypeDAO::newDataObject ( )

Generate a new data object.

Returns
DataObject

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

Referenced by _fromRow().

◆ updateLocaleFields()

AnnouncementTypeDAO::updateLocaleFields (   $announcementType)

Update the localized settings for this object

Parameters
$announcementTypeobject

Definition at line 172 of file AnnouncementTypeDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

◆ updateObject()

AnnouncementTypeDAO::updateObject (   $announcementType)

Update an existing announcement type.

Parameters
$announcementTypeAnnouncementType
Returns
boolean

Definition at line 204 of file AnnouncementTypeDAO.inc.php.

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


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