Open Monograph Press  3.3.0
CodelistItemDAO Class Reference
Inheritance diagram for CodelistItemDAO:
DAO QualifierDAO SubjectDAO

Public Member Functions

 __construct ()
 
 _cacheMiss ($cache, $id)
 
 _fromRow ($code, $entry)
 
 _getCache ($locale=null)
 
 getByCode ($code)
 
 getCacheName ()
 
 getCodelistItems ($locale=null)
 
 getFilename ($locale)
 
 getName ()
 
 getNames ($locale=null)
 
 newDataObject ()
 
- 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

Parent class for operations involving Codelist objects.

See also
CodelistItem

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

Constructor & Destructor Documentation

◆ __construct()

CodelistItemDAO::__construct ( )

Constructor.

Reimplemented in QualifierDAO, and SubjectDAO.

Definition at line 25 of file CodelistItemDAO.inc.php.

Member Function Documentation

◆ _cacheMiss()

CodelistItemDAO::_cacheMiss (   $cache,
  $id 
)

Handle a cache miss

Parameters
$cacheGenericCache
$idmixed ID that wasn't found in the cache
Returns
null

Definition at line 62 of file CodelistItemDAO.inc.php.

References Registry\get(), getFilename(), AppLocale\getLocale(), and getName().

◆ _fromRow()

CodelistItemDAO::_fromRow (   $code,
  $entry 
)

Internal function to construct and populate a Codelist object

Parameters
$codestring
$entryarray
Returns
CodelistItem

Definition at line 175 of file CodelistItemDAO.inc.php.

References HookRegistry\call(), and newDataObject().

Referenced by getByCode(), and getCodelistItems().

◆ _getCache()

CodelistItemDAO::_getCache (   $locale = null)

Get the codelist item cache.

Parameters
$localestring Locale code (optional)
Returns
GenericCache

Definition at line 34 of file CodelistItemDAO.inc.php.

References Registry\get(), getCacheName(), getFilename(), AppLocale\getLocale(), CacheManager\getManager(), and getName().

Referenced by getByCode(), getCodelistItems(), and getNames().

◆ getByCode()

CodelistItemDAO::getByCode (   $code)

Retrieve a codelist by code.

Parameters
$codelistIdint
Returns
CodelistItem

Definition at line 133 of file CodelistItemDAO.inc.php.

References _fromRow(), and _getCache().

◆ getCacheName()

CodelistItemDAO::getCacheName ( )

Get the cache name for this particular codelist database

Returns
string

Definition at line 99 of file CodelistItemDAO.inc.php.

References getName().

Referenced by _getCache().

◆ getCodelistItems()

CodelistItemDAO::getCodelistItems (   $locale = null)

Retrieve an array of all the codelist items.

Parameters
$localean optional locale to use
Returns
array of CodelistItems

Definition at line 143 of file CodelistItemDAO.inc.php.

References _fromRow(), and _getCache().

◆ getFilename()

CodelistItemDAO::getFilename (   $locale)

Get the filename of the codelist database

Parameters
$localestring
Returns
string

Reimplemented in QualifierDAO, and SubjectDAO.

Definition at line 108 of file CodelistItemDAO.inc.php.

Referenced by _cacheMiss(), and _getCache().

◆ getName()

CodelistItemDAO::getName ( )

Get the base node name particular codelist database

Returns
string

Reimplemented in QualifierDAO, and SubjectDAO.

Definition at line 116 of file CodelistItemDAO.inc.php.

Referenced by _cacheMiss(), _getCache(), and getCacheName().

◆ getNames()

CodelistItemDAO::getNames (   $locale = null)

Retrieve an array of all codelist names.

Parameters
$localean optional locale to use
Returns
array of CodelistItem names

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

References _getCache().

◆ newDataObject()

CodelistItemDAO::newDataObject ( )

Get the name of the CodelistItem subclass.

Returns
CodelistItem

Reimplemented in QualifierDAO, and SubjectDAO.

Definition at line 124 of file CodelistItemDAO.inc.php.

Referenced by _fromRow().


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