ObjectQuery.php
61 * // WHERE (Author.name LIKE '%ingo%' AND Author.email LIKE '%wemove%') OR (Author.name LIKE '%herwig%') AND
62 * // (Recipe.created >= '2004-01-01') AND (Recipe.created < '2005-01-01') AND ((Recipe.name LIKE '%Salat%') OR (Recipe.portions = 4))
100 * - All objects have to reside in the same datastore (the connection is taken from the first mapper)
130 * @param $queryId Identifier for the query cache (maybe null to prevent caching) (default: _null_)
164 * @param $alias An alias name to be used in the query. if null, use the default name (default: _null_)
169 public function getObjectTemplate($type, $alias=null, $combineOperator=Criteria::OPERATOR_AND) {
199 * @param $alias An alias name to be used in the query. if null, use the default name (default: _null_)
203 public function registerObjectTemplate(Node $template, $alias=null, $combineOperator=Criteria::OPERATOR_AND) {
238 * @note Grouped templates will be ignored, when iterating over the object tree and appended at the end.
240 * @param $combineOperator One of the Criteria::OPERATOR constants that precedes the group (default: _Criteria::OPERATOR_AND_)
296 $selectStmt = $mapper->getSelectSQL(null, $tableName['alias'], $attributes, null, $pagingInfo, $this->getId());
433 $joinCondition = $curChild->getProperty(self::PROPERTY_TABLE_NAME).'.'.$fkAttr->getColumn().' = '.
452 $joinCondition2 = $curChild->getProperty(self::PROPERTY_TABLE_NAME).'.'.$otherIdAttr->getColumn().' = '.
476 * @param $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (maybe null)
528 throw new UnknownFieldException($orderAttribute, "The sort field name '".$orderAttribute."' is unknown");
548 $joinName = ($orderType != $queryType && $orderType != $persistenceFacade->getSimpleType($queryType)) ? $orderType: null;
makeGroup($templates, $combineOperator=Criteria::OPERATOR_AND)
Group different templates together to realize brackets in the query.
Definition: ObjectQuery.php:242
getType()
Definition: DefaultPersistentObject.php:116
getObjectTemplate($type, $alias=null, $combineOperator=Criteria::OPERATOR_AND)
Get an object template for a given type.
Definition: ObjectQuery.php:169
Instances of RDBManyToManyRelationDescription describe a many to many relation from 'this' end to 'ot...
Definition: RDBManyToManyRelationDescription.php:26
processTableName(Node $tpl)
Get the table name for the template and calculate an alias if necessary.
Definition: ObjectQuery.php:630
NodeValueIterator is used to iterate over all persistent values of a Node (not including relations).
Definition: NodeValueIterator.php:43
copyValues(PersistentObject $object, $copyPkValues=true)
Definition: DefaultPersistentObject.php:234
Instances of RDBManyToOneRelationDescription describe a many to one relation from 'this' end (many) t...
Definition: RDBManyToOneRelationDescription.php:21
IllegalArgumentException signals an exception in method arguments.
Definition: IllegalArgumentException.php:18
registerObjectTemplate(Node $template, $alias=null, $combineOperator=Criteria::OPERATOR_AND)
Register an object template at the query.
Definition: ObjectQuery.php:203
Criteria defines a condition on a PersistentObject's attribute used to select specific instances.
Definition: Criteria.php:21
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:28
const PROPERTY_INITIAL_OID
Definition: ObjectQuery.php:110
ValueChangeEvent signals a change of a value of a PersistentObject instance.
Definition: ValueChangeEvent.php:22
addColumns(array $columns, $joinName=null)
Add columns to the statement.
Definition: SelectStatement.php:232
BuildDepth values are used to define the depth when loading object trees.
Definition: BuildDepth.php:19
getParentsEx(ObjectId $oid=null, $role=null, $type=null, $values=null, $properties=null, $useRegExp=true)
Get the parents that match given conditions.
Definition: Node.php:674
static getMapper($type)
Get the mapper for a Node and check if it is a supported one.
Definition: AbstractQuery.php:174
getQueryString($buildDepth=BuildDepth::SINGLE, $orderby=null)
Get the query serialized to a string.
Definition: AbstractQuery.php:73
const PROPERTY_TABLE_NAME
Definition: ObjectQuery.php:109
buildQuery($buildDepth, $orderby=null, PagingInfo $pagingInfo=null)
Definition: ObjectQuery.php:287
join($name, $on, $columns=self::SQL_STAR, $type=self::JOIN_INNER)
Definition: SelectStatement.php:217
const PROPERTY_COMBINE_OPERATOR
Definition: ObjectQuery.php:108
AbstractQuery is the base class for all query classes.
Definition: AbstractQuery.php:26
processOrderBy($orderby, SelectStatement $selectStmt)
Process an object template.
Definition: ObjectQuery.php:479
processObjectTemplate(PersistentObject $tpl, SelectStatement $selectStmt)
Process an object template.
Definition: ObjectQuery.php:350
static getInstance($name, $dynamicConfiguration=[])
Definition: ObjectFactory.php:47
getProperty($name)
Definition: DefaultPersistentObject.php:486
UnknownFieldException signals an unknown field.
Definition: UnknownFieldException.php:18
Instances of RDBOneToManyRelationDescription describe a one to many relation from 'this' end (one) to...
Definition: RDBOneToManyRelationDescription.php:21
setProperty($name, $value)
Definition: DefaultPersistentObject.php:503
PagingInfo contains information about a paged list.
Definition: PagingInfo.php:18
PersistentObject defines the interface of all persistent objects.
Definition: PersistentObject.php:23
getParameters($criteria, array $parameters)
Get an array of parameter values for the given criteria.
Definition: ObjectQuery.php:562
getOID()
Definition: DefaultPersistentObject.php:133
static get(RDBMapper $mapper, $id=self::NO_CACHE)
Get the SelectStatement instance with the given id.
Definition: SelectStatement.php:48
LogManager is used to retrieve Logger instances.
Definition: LogManager.php:20
getProperty($name)
Get the value of a named property in the object.
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...
Definition: ObjectFactory.php:24
getParameterPosition($criterion, $criteria)
Definition: ObjectQuery.php:600
ObjectQuery implements a template based object query.
Definition: ObjectQuery.php:106