# BaseDaoWorker Class Reference
[Root classes for building DAO hierarchies]

Inheritance diagram for BaseDaoWorker:
[legend]

List of all members.

## Public Member Functions

| __construct (GenericDAO $dao)
| setDao (GenericDAO $dao)
| drop (Identifiable $object)
| erasers
| dropById ($id)
| dropByIds (array $ids)
| uncacheById ($id)
| uncachers
| uncacheByQuery (SelectQuery $query)

## Public Attributes

const | SUFFIX_LIST = '_list_'
const | SUFFIX_INDEX = '_lists_index_'
const | SUFFIX_QUERY = '_query_'
const | SUFFIX_RESULT = '_result_'

## Protected Member Functions

| makeIdKey ($id)
| makeQueryKey (SelectQuery $query, $suffix)
| fetchObject (SelectQuery $query)
| fetchers
| cachedFetchObject (SelectQuery $query, $expires, $byId=true)
| fetchList (SelectQuery $query)

## Protected Attributes

| $dao = null
| $className = null
| $watermark = null
| getCachedById ($id)
| cache getters
| getCachedByQuery (SelectQuery $query)

## Detailed Description

Definition at line 15 of file BaseDaoWorker.class.php.

## Constructor & Destructor Documentation

BaseDaoWorker::__construct | ( | GenericDAO $ | dao | ) |

Reimplemented in SmartDaoWorker, and VoodooDaoWorker.

Definition at line 28 of file BaseDaoWorker.class.php.

References GenericDAO::getObjectName(), and Cache::me().

Here is the call graph for this function:

## Member Function Documentation

BaseDaoWorker::cachedFetchObject | ( | SelectQuery $ | query,
|  | $ | expires,
|  | $ | byId = `true` |
| ) |  |  | `[protected]`

Definition at line 128 of file BaseDaoWorker.class.php.

References DBPool::getByDao().

Referenced by CommonDaoWorker::getById(), and CommonDaoWorker::getByQuery().

Here is the call graph for this function:

BaseDaoWorker::drop | ( | Identifiable $ | object | ) |

erasers

Implements BaseDAO.

Definition at line 51 of file BaseDaoWorker.class.php.

References dropById(), and Identifiable::getId().

Here is the call graph for this function:

BaseDaoWorker::dropById | ( | $ | id | ) |

Implements BaseDAO.

Reimplemented in CommonDaoWorker.

Definition at line 56 of file BaseDaoWorker.class.php.

References OSQL::delete(), Expression::eq(), and DBPool::getByDao().

Referenced by drop().

Here is the call graph for this function:

BaseDaoWorker::dropByIds | ( | array $ | ids | ) |

Implements BaseDAO.

Definition at line 69 of file BaseDaoWorker.class.php.

References OSQL::delete(), DBPool::getByDao(), and Expression::in().

Here is the call graph for this function:

BaseDaoWorker::fetchList | ( | SelectQuery $ | query | ) | `[protected]`

Definition at line 148 of file BaseDaoWorker.class.php.

References DBPool::getByDao().

Referenced by TransparentDaoWorker::getListByQuery(), CommonDaoWorker::getListByQuery(), and CommonDaoWorker::getQueryResult().

Here is the call graph for this function:

BaseDaoWorker::fetchObject | ( | SelectQuery $ | query | ) | `[protected]`

fetchers

Definition at line 119 of file BaseDaoWorker.class.php.

References DBPool::getByDao().

Referenced by CommonDaoWorker::getById(), and CommonDaoWorker::getByQuery().

Here is the call graph for this function:

BaseDaoWorker::getCachedById | ( | $ | id | ) |

cache getters

Reimplemented in NullDaoWorker.

Definition at line 102 of file BaseDaoWorker.class.php.

References makeIdKey(), and Cache::me().

Referenced by CommonDaoWorker::getById().

Here is the call graph for this function:

BaseDaoWorker::getCachedByQuery | ( | SelectQuery $ | query | ) | `[protected]`

Reimplemented in NullDaoWorker, and TransparentDaoWorker.

Definition at line 109 of file BaseDaoWorker.class.php.

References makeQueryKey(), and Cache::me().

Referenced by CommonDaoWorker::getByQuery(), CommonDaoWorker::getCustom(), CommonDaoWorker::getCustomList(), CommonDaoWorker::getCustomRowList(), CommonDaoWorker::getListByQuery(), and CommonDaoWorker::getQueryResult().

Here is the call graph for this function:

BaseDaoWorker::makeIdKey | ( | $ | id | ) | `[protected]`

Definition at line 167 of file BaseDaoWorker.class.php.

Referenced by TransparentDaoWorker::cacheById(), CommonDaoWorker::cacheById(), TransparentDaoWorker::cacheNullById(), getCachedById(), TransparentDaoWorker::getListByIds(), CommonDaoWorker::getListByIds(), and uncacheById().

BaseDaoWorker::makeQueryKey | ( | SelectQuery $ | query,
|  | $ | suffix |
| ) |  |  | `[protected]`

Reimplemented in CacheDaoWorker.

Definition at line 172 of file BaseDaoWorker.class.php.

Referenced by VoodooDaoWorker::cacheByQuery(), SmartDaoWorker::cacheByQuery(), CommonDaoWorker::cacheByQuery(), VoodooDaoWorker::cacheListByQuery(), SmartDaoWorker::cacheListByQuery(), TransparentDaoWorker::getCachedByQuery(), getCachedByQuery(), TransparentDaoWorker::getCachedList(), and uncacheByQuery().

BaseDaoWorker::setDao | ( | GenericDAO $ | dao | ) |

Returns:
  BaseDaoWorker

Definition at line 42 of file BaseDaoWorker.class.php.

BaseDaoWorker::uncacheById | ( | $ | id | ) |

uncachers

Implements BaseDAO.

Reimplemented in CommonDaoWorker, DalayedDropDaoWorker, and NullDaoWorker.

Definition at line 85 of file BaseDaoWorker.class.php.

References makeIdKey(), and Cache::me().

Here is the call graph for this function:

BaseDaoWorker::uncacheByQuery | ( | SelectQuery $ | query | ) |

Reimplemented in NullDaoWorker.

Definition at line 92 of file BaseDaoWorker.class.php.

References makeQueryKey(), and Cache::me().

Referenced by CommonDaoWorker::uncacheLists().

Here is the call graph for this function:

## Member Data Documentation

BaseDaoWorker::$className = null`[protected]`

Definition at line 24 of file BaseDaoWorker.class.php.

BaseDaoWorker::$dao = null`[protected]`

Definition at line 22 of file BaseDaoWorker.class.php.

Referenced by CustomDataScopedWorker::__construct().

BaseDaoWorker::$watermark = null`[protected]`

Definition at line 26 of file BaseDaoWorker.class.php.

Referenced by VoodooDaoWorker::__construct().

const BaseDaoWorker::SUFFIX_INDEX = '_lists_index_'

Definition at line 18 of file BaseDaoWorker.class.php.

const BaseDaoWorker::SUFFIX_LIST = '_list_'

Definition at line 17 of file BaseDaoWorker.class.php.

const BaseDaoWorker::SUFFIX_QUERY = '_query_'

Definition at line 19 of file BaseDaoWorker.class.php.

const BaseDaoWorker::SUFFIX_RESULT = '_result_'

Definition at line 20 of file BaseDaoWorker.class.php.

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

- main/DAOs/Workers/BaseDaoWorker.class.php