onPHP

GenericDAO Class Reference

 

GenericDAO Class Reference
[Root classes for building DAO hierarchies]

Basis of all DAO's. More...

Inheritance diagram for GenericDAO:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 getTable ()
 getObjectName ()
 getFields ()
 getSequence ()
 getLinkName ()
 Returns link name which is used to get actual db-link from DBPool, returning null by default for backwards compatibility.
 makeSelectHead ()
 get (ObjectQuery $oq, $expires=Cache::DO_NOT_CACHE)
 getById ($id, $expires=Cache::EXPIRES_MEDIUM)
 getByLogic (LogicalObject $logic, $expires=Cache::DO_NOT_CACHE)
 getByQuery (SelectQuery $query, $expires=Cache::EXPIRES_MEDIUM)
 getCustom (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 getList (ObjectQuery $oq, $expires=Cache::DO_NOT_CACHE)
 getListByIds ($ids, $expires=Cache::EXPIRES_MEDIUM)
 getListByQuery (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 getListByLogic (LogicalObject $logic, $expires=Cache::DO_NOT_CACHE)
 getPlainList ($expires=Cache::EXPIRES_MEDIUM)
 getCustomList (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 getCustomRowList (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 getCountedList (ObjectQuery $oq, $expires=Cache::DO_NOT_CACHE)
 getQueryResult (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 cacheById (Identifiable $object, $expires=Cache::EXPIRES_MEDIUM)
 cacheByQuery (SelectQuery $query, $object, $expires=Cache::DO_NOT_CACHE)
 cacheListByQuery (SelectQuery $query, $array)
 getCachedById ($id)
 getCachedByQuery (SelectQuery $query)
 dropById ($id)
 dropByIds ($ids)
 uncacheById ($id)
 uncacheByIds ($ids)
 uncacheByQuery (SelectQuery $query)
 uncacheLists ()

Protected Member Functions

 makeObject (&$array, $prefix=null)
 Builds complete object.

Protected Attributes

 $link = null
 $selectHead = null
 $fields = array()

Detailed Description

Basis of all DAO's.

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


Member Function Documentation

GenericDAO::getObjectName (  )  [abstract]

Referenced by DependentDAO::checkType().

GenericDAO::makeObject ( &$  array,
prefix = null 
) [abstract, protected]

Builds complete object.

See also:
http://onphp.org/examples.DAOs.en.html
Parameters:
$array associative array('fieldName' => 'value')
$prefix prefix (if any) of all fieldNames

Referenced by SQLite::queryObjectRow(), PgSQL::queryObjectRow(), MySQL::queryObjectRow(), SQLite::queryObjectSet(), PgSQL::queryObjectSet(), and MySQL::queryObjectSet().

GenericDAO::getFields (  ) 

Reimplemented in StorableDAO.

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

Referenced by makeSelectHead().

GenericDAO::getSequence (  ) 

Definition at line 47 of file GenericDAO.class.php.

References getTable().

Referenced by StorableDAO::add(), and DependentDAO::add().

Here is the call graph for this function:

GenericDAO::getLinkName (  ) 

Returns link name which is used to get actual db-link from DBPool, returning null by default for backwards compatibility.

See also:
DBPool

Definition at line 58 of file GenericDAO.class.php.

GenericDAO::makeSelectHead (  ) 

Definition at line 63 of file GenericDAO.class.php.

References getFields(), getTable(), and OSQL::select().

Referenced by ObjectQuery::toSelectQuery().

Here is the call graph for this function:

GenericDAO::get ( ObjectQuery oq,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 81 of file GenericDAO.class.php.

References Cache::worker().

Referenced by DependentDAO::getChildIdsList().

Here is the call graph for this function:

GenericDAO::getById ( id,
expires = Cache::EXPIRES_MEDIUM 
)

Reimplemented in DependentDAO.

Definition at line 86 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getByLogic ( LogicalObject logic,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 91 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getByQuery ( SelectQuery query,
expires = Cache::EXPIRES_MEDIUM 
)

Definition at line 98 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getCustom ( SelectQuery query,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 105 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getList ( ObjectQuery oq,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 112 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getListByIds ( ids,
expires = Cache::EXPIRES_MEDIUM 
)

Definition at line 117 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getListByQuery ( SelectQuery query,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 124 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getListByLogic ( LogicalObject logic,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 131 of file GenericDAO.class.php.

References Cache::worker().

Referenced by DependentDAO::getListByParentId().

Here is the call graph for this function:

GenericDAO::getPlainList ( expires = Cache::EXPIRES_MEDIUM  ) 

Definition at line 138 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getCustomList ( SelectQuery query,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 143 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getCustomRowList ( SelectQuery query,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 150 of file GenericDAO.class.php.

References Cache::worker().

Referenced by DependentDAO::getChildIdsList().

Here is the call graph for this function:

GenericDAO::getCountedList ( ObjectQuery oq,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 157 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getQueryResult ( SelectQuery query,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 164 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::cacheById ( Identifiable object,
expires = Cache::EXPIRES_MEDIUM 
)

Definition at line 171 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::cacheByQuery ( SelectQuery query,
object,
expires = Cache::DO_NOT_CACHE 
)

Definition at line 178 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::cacheListByQuery ( SelectQuery query,
array 
)

Implements BaseDAO.

Definition at line 187 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getCachedById ( id  ) 

Implements BaseDAO.

Definition at line 192 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getCachedByQuery ( SelectQuery query  ) 

Implements BaseDAO.

Definition at line 197 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::dropById ( id  ) 

Implements BaseDAO.

Definition at line 202 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::dropByIds ( ids  ) 

Implements BaseDAO.

Definition at line 207 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::uncacheById ( id  ) 

Implements BaseDAO.

Definition at line 212 of file GenericDAO.class.php.

References Cache::worker().

Referenced by DependentDAO::import(), StorableDAO::inject(), and DependentDAO::save().

Here is the call graph for this function:

GenericDAO::uncacheByIds ( ids  ) 

Implements BaseDAO.

Definition at line 217 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::uncacheByQuery ( SelectQuery query  ) 

Implements BaseDAO.

Definition at line 222 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::uncacheLists (  ) 

Implements BaseDAO.

Definition at line 227 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:


Member Data Documentation

GenericDAO::$link = null [protected]

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

GenericDAO::$selectHead = null [protected]

Definition at line 21 of file GenericDAO.class.php.

GenericDAO::$fields = array() [protected]

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

Referenced by StorableDAO::getFields().


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

generated by doxygen-1.5.1
for onPHP at Sun Nov 12 00:45:06 2006