Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

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 ()
 makeObject ($array, $prefix=null)
 makeOnlyObject ($array, $prefix=null)
 completeObject (Identifiable $object)
 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 ()
 makeTotalCountQuery ()
 dropIdentityMap ()
 dropObjectIdentityMapById ($id)

 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 17 of file GenericDAO.class.php.


Member Function Documentation

GenericDAO::addObjectListToMap ( list  )  [private]

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

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

GenericDAO::addObjectToMap ( Identifiable object  )  [private]

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

References Identifiable::getId().

Referenced by completeObject(), doInject(), getById(), getByLogic(), getByQuery(), and makeOnlyObject().

Here is the call graph for this function:

GenericDAO::checkObjectType ( Identifiable object  )  [protected]

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

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

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

Here is the call graph for this function:

GenericDAO::completeObject ( Identifiable object  ) 

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

References addObjectToMap(), and getProtoClass().

Referenced by makeObject().

Here is the call graph for this function:

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

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

References addObjectToMap(), DBPool::getByDao(), Identifiable::getId(), Identifiable::setId(), and uncacheById().

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

Here is the call graph for this function:

GenericDAO::drop ( Identifiable object  ) 

erasers

Implements BaseDAO.

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

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

Here is the call graph for this function:

GenericDAO::dropById ( id  ) 

Implements BaseDAO.

Definition at line 277 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 289 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::dropIdentityMap (  ) 
Returns:
GenericDAO

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

Referenced by uncacheLists().

GenericDAO::dropObjectIdentityMapById ( id  ) 

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

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

boring delegates

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

References addObjectToMap(), Assert::isNotEmpty(), Assert::isScalar(), and Cache::worker().

Here is the call graph for this function:

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

Definition at line 169 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 178 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 187 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 249 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 256 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getFields (  ) 

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

References getMapping(), and getObjectName().

Referenced by makeSelectHead().

Here is the call graph for this function:

GenericDAO::getIdName (  ) 
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 72 of file GenericDAO.class.php.

Referenced by DBPool::getByDao().

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

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

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

Here is the call graph for this function:

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

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

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

Here is the call graph for this function:

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

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

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

Here is the call graph for this function:

GenericDAO::getMapping (  ) 

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

References getProtoClass().

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

Here is the call graph for this function:

GenericDAO::getObjectName (  )  [abstract]
GenericDAO::getPlainList ( expires = Cache::EXPIRES_MEDIUM  ) 

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

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

Here is the call graph for this function:

GenericDAO::getProtoClass (  ) 
Returns:
AbstractProtoClass

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

References getObjectName().

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

Here is the call graph for this function:

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

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

References Cache::worker().

Here is the call graph for this function:

GenericDAO::getSequence (  ) 

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

References getTable().

Here is the call graph for this function:

GenericDAO::getTable (  )  [abstract]
GenericDAO::getTotalCount ( expires = Cache::DO_NOT_CACHE  ) 

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

References Cache::worker().

Here is the call graph for this function:

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

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

References checkObjectType(), doInject(), and InsertOrUpdateQuery::setTable().

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

Here is the call graph for this function:

GenericDAO::makeObject ( array,
prefix = null 
)

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

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

Here is the call graph for this function:

GenericDAO::makeOnlyObject ( array,
prefix = null 
)

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

References addObjectToMap(), getObjectName(), and getProtoClass().

Referenced by makeObject().

Here is the call graph for this function:

GenericDAO::makeSelectHead (  ) 
Returns:
SelectQuery

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

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

Here is the call graph for this function:

GenericDAO::makeTotalCountQuery (  ) 
Returns:
SelectQuery

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

References DBValue::create(), SQLFunction::create(), getTable(), and OSQL::select().

Here is the call graph for this function:

GenericDAO::uncacheById ( id  ) 

uncachers

Implements BaseDAO.

Definition at line 302 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 309 of file GenericDAO.class.php.

References Cache::worker().

Here is the call graph for this function:

GenericDAO::uncacheLists (  ) 

Implements BaseDAO.

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

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

Here is the call graph for this function:


Member Data Documentation

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

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


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