onPHP

GenericDAO Class Reference

 

GenericDAO Class Reference
[Root classes for building DAO hierarchies]

Basis of all DAO's. More...

Inheritance diagram for GenericDAO:

List of all members.

Public Member Functions

 getTable ()
 getObjectName ()
 makeOnlyObject ($array, $prefix=null)
 completeObject (Identifiable $object)
 makeObject ($array, $prefix=null)
 getLinkName ()
 Returns link name which is used to get actual DB-link from DBPool, returning null by default for single-source projects.
 getIdName ()
 getSequence ()
 getProtoClass ()
 getMapping ()
 getFields ()
 makeSelectHead ()
 dropIdentityMap ()
 getById ($id, $expires=Cache::EXPIRES_MEDIUM)
 boring delegates
 getByLogic (LogicalObject $logic, $expires=Cache::DO_NOT_CACHE)
 getByQuery (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 getCustom (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 getListByIds (array $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)
 getTotalCount ($expires=Cache::DO_NOT_CACHE)
 getCustomList (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 getCustomRowList (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 getQueryResult (SelectQuery $query, $expires=Cache::DO_NOT_CACHE)
 drop (Identifiable $object)
 erasers
 dropById ($id)
 dropByIds (array $ids)
 uncacheById ($id)
 uncachers
 uncacheByIds ($ids)
 uncacheLists ()

Protected Member Functions

 inject (InsertOrUpdateQuery $query, Identifiable $object)
 doInject (InsertOrUpdateQuery $query, Identifiable $object)
 checkObjectType (Identifiable $object)

Private Member Functions

 addObjectToMap (Identifiable $object)
 addObjectListToMap ($list)

Private Attributes

 $identityMap = array()


Detailed Description

Basis of all DAO's.

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


Member Function Documentation

GenericDAO::makeOnlyObject ( array,
prefix = null 
) [abstract]

Reimplemented in ProtoDAO.

Referenced by makeObject().

GenericDAO::completeObject ( Identifiable object  )  [abstract]

Reimplemented in ProtoDAO.

Referenced by makeObject().

GenericDAO::makeObject ( array,
prefix = null 
)

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

References addObjectToMap(), completeObject(), getIdName(), getProtoClass(), and makeOnlyObject().

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 single-source projects.

See also:
DBPool

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

GenericDAO::getIdName (  ) 

GenericDAO::getSequence (  ) 

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

References getTable().

Referenced by StorableDAO::add().

Here is the call graph for this function:

GenericDAO::getProtoClass (  ) 

Returns:
AbstractProtoClass

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

References getObjectName().

Referenced by ProtoDAO::completeObject(), getMapping(), makeObject(), ProtoDAO::makeOnlyObject(), ProtoDAO::setQueryFields(), and StorableDAO::unite().

Here is the call graph for this function:

GenericDAO::getMapping (  ) 

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

References getProtoClass().

Referenced by getFields(), and ProtoDAO::guessAtom().

Here is the call graph for this function:

GenericDAO::getFields (  ) 

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

References getMapping(), and getObjectName().

Referenced by ProtoDAO::fetchCollections(), and makeSelectHead().

Here is the call graph for this function:

GenericDAO::makeSelectHead (  ) 

Returns:
SelectQuery

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

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

Here is the call graph for this function:

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

boring delegates

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

References addObjectToMap(), and Cache::worker().

Here is the call graph for this function:

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

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

References addObjectToMap(), and Cache::worker().

Here is the call graph for this function:

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

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

References addObjectToMap(), and Cache::worker().

Here is the call graph for this function:

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

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

References Cache::worker().

Here is the call graph for this function:

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

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

References addObjectListToMap(), ArrayUtils::regularizeList(), and Cache::worker().

Here is the call graph for this function:

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

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

References addObjectListToMap(), and Cache::worker().

Here is the call graph for this function:

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

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

References addObjectListToMap(), and Cache::worker().

Here is the call graph for this function:

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

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

References addObjectListToMap(), BaseDAO::getPlainList(), and Cache::worker().

Here is the call graph for this function:

GenericDAO::getTotalCount ( expires = Cache::DO_NOT_CACHE  ) 

Definition at line 213 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 218 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 225 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 232 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::drop ( Identifiable object  ) 

erasers

Implements BaseDAO.

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

References checkObjectType(), and dropById().

Here is the call graph for this function:

GenericDAO::dropById ( id  ) 

Implements BaseDAO.

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

References Cache::worker().

Referenced by drop().

Here is the call graph for this function:

GenericDAO::dropByIds ( array $  ids  ) 

Implements BaseDAO.

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

References Cache::worker().

Here is the call graph for this function:

GenericDAO::uncacheById ( id  ) 

uncachers

Implements BaseDAO.

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

References Cache::worker().

Referenced by doInject().

Here is the call graph for this function:

GenericDAO::uncacheByIds ( ids  ) 

Implements BaseDAO.

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

References Cache::worker().

Here is the call graph for this function:

GenericDAO::uncacheLists (  ) 

Implements BaseDAO.

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

References dropIdentityMap(), and Cache::worker().

Here is the call graph for this function:

GenericDAO::dropIdentityMap (  ) 

Returns:
GenericDAO

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

Referenced by uncacheLists().

GenericDAO::inject ( InsertOrUpdateQuery query,
Identifiable object 
) [protected]

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

References checkObjectType(), doInject(), and getTable().

Referenced by StorableDAO::add(), StorableDAO::import(), and StorableDAO::save().

Here is the call graph for this function:

GenericDAO::doInject ( InsertOrUpdateQuery query,
Identifiable object 
) [protected]

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

References addObjectToMap(), DBPool::getByDao(), and uncacheById().

Referenced by inject(), and StorableDAO::unite().

Here is the call graph for this function:

GenericDAO::checkObjectType ( Identifiable object  )  [protected]

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

References getObjectName(), and Assert::isTrue().

Referenced by drop(), inject(), StorableDAO::merge(), and ProtoDAO::setQueryFields().

Here is the call graph for this function:

GenericDAO::addObjectToMap ( Identifiable object  )  [private]

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

References Identifiable::getId().

Referenced by doInject(), getById(), getByLogic(), getByQuery(), and makeObject().

Here is the call graph for this function:

GenericDAO::addObjectListToMap ( list  )  [private]

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

Referenced by getListByIds(), getListByLogic(), getListByQuery(), and getPlainList().


Member Data Documentation

GenericDAO::$identityMap = array() [private]

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


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

generated by doxygen-1.5.5
for onPHP at Thu Aug 7 18:25:39 2008