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, $array, $prefix=null)
 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)
 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,
array,
prefix = null 
) [abstract]

Reimplemented in ProtoDAO.

Referenced by makeObject().

GenericDAO::makeObject ( array,
prefix = null 
)

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

References addObjectToMap(), completeObject(), getIdName(), 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 50 of file GenericDAO.class.php.

GenericDAO::getIdName (  ) 

GenericDAO::getSequence (  ) 

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

References getTable().

Referenced by StorableDAO::add().

Here is the call graph for this function:

GenericDAO::getProtoClass (  ) 

GenericDAO::getMapping (  ) 

Definition at line 73 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 78 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 94 of file GenericDAO.class.php.

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

Here is the call graph for this function:

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

boring delegates

Definition at line 114 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 124 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 133 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 142 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 149 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 174 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 183 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 192 of file GenericDAO.class.php.

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

Here is the call graph for this function:

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

Definition at line 199 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 206 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 213 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 220 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 227 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 234 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 242 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 249 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::uncacheLists (  ) 

Implements BaseDAO.

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

References Cache::worker().

Here is the call graph for this function:

GenericDAO::dropIdentityMap (  ) 

Returns:
GenericDAO

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

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

Definition at line 275 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 290 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 317 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 325 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 330 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 Feb 28 21:50:04 2008