PersistenceFacade.php
60 * @param $buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to build
69 * @note If an object required to be transient, the IPersistentMapper::create() method or the class
72 * @param $buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to build
86 * Get the object ids of objects matching a given criteria. If a PagingInfo instance is passed it will be used and updated.
88 * @param $criteria An array of Criteria instances that define conditions on the type's attributes (optional, default: _null_)
89 * @param $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (optional, default: _null_)
96 * Get the first object id of objects matching a given condition. If a PagingInfo instance is passed it will be used and updated.
98 * @param $criteria An array of Criteria instances that define conditions on the type's attributes (optional, default: _null_)
99 * @param $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (optional, default: _null_)
106 * Load the objects matching a given condition. If a PagingInfo instance is passed it will be used and updated.
107 * @param $typeOrTypes The type or types array of objects (either fully qualified or simple, if not ambiguous)
108 * @param $buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to build
110 * @param $criteria An array of Criteria instances that define conditions on the object's attributes (optional, default: _null_)
111 * @param $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (optional, default: _null_)
115 public function loadObjects($typeOrTypes, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null);
118 * Load the first object matching a given condition. If a PagingInfo instance is passed it will be used and updated.
119 * @param $typeOrTypes The type or types array of objects (either fully qualified or simple, if not ambiguous)
120 * @param $buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to build
122 * @param $criteria An array of Criteria instances that define conditions on the type's attributes (optional, default: _null_)
123 * @param $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (optional, default: _null_)
127 public function loadFirstObject($typeOrTypes, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null);
137 * Get the PersistenceMapper for a given type. If no mapper for this type is defined the mapper for type '*' will be returned
isKnownType($type)
Check if a type is defined in the application.
getKnownTypes()
Get a list of types defined in the application.
getFullyQualifiedType($type)
Get the fully qualified type name for a given simple type name.
PersistenceMapper defines the interface for all mapper classes.
Definition: PersistenceMapper.php:26
create($type, $buildDepth=BuildDepth::SINGLE)
Construct the template of an object of a given type.
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
loadObjects($typeOrTypes, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Load the objects matching a given condition.
getTransaction()
Get the current business transaction.
PersistenceFacade defines the interface for PersistenceFacade implementations.
Definition: PersistenceFacade.php:23
setMapper($type, PersistenceMapper $mapper)
Explicitly set a PersistentMapper for a type.
load(ObjectId $oid, $buildDepth=BuildDepth::SINGLE)
Load an object from the storage.
getMapper($type)
Get the PersistenceMapper for a given type.
getFirstOID($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Get the first object id of objects matching a given condition.
getOIDs($type, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Get the object ids of objects matching a given criteria.
PagingInfo contains information about a paged list.
Definition: PagingInfo.php:18
getLastCreatedOID($type)
Get the object id of the last created object of a given type.
loadFirstObject($typeOrTypes, $buildDepth=BuildDepth::SINGLE, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Load the first object matching a given condition.
getSimpleType($type)
Get the simple type name for a given fully qualified type name.