NodeUnifiedRDBMapper.php
207 public function getSelectSQL($criteria=null, $alias=null, $orderby=null, PagingInfo $pagingInfo=null, $queryId=null) {
209 $queryId = $queryId == null ? $this->getCacheKey($alias, $criteria, $orderby, $pagingInfo) : $queryId;
293 $queryId = $this->getCacheKey($otherRole.sizeof($otherObjectProxies), $criteria, $orderby, $pagingInfo);
318 return array($selectStmt, $relationDescription->getIdName(), $relationDescription->getFkName());
343 $queryId = $this->getCacheKey($otherRole.sizeof($otherObjectProxies), $criteria, $orderby, $pagingInfo);
368 return array($selectStmt, $relationDescription->getFkName(), $relationDescription->getIdName());
396 $queryId = $this->getCacheKey($otherRole.sizeof($otherObjectProxies), $criteria, $orderby, $pagingInfo);
407 $joinCond = $this->quoteIdentifier($nmTablename).'.'.$this->quoteIdentifier($thisFkAttr->getName()).'='.
418 $selectStmt->columns(array($nmSortAttributeDesc->getName() => $nmSortAttributeDesc->getColumn()), $nmTablename);
421 $selectStmt->columns(array(self::INTERNAL_VALUE_PREFIX.'id' => $otherFkAttr->getName()), $nmTablename);
498 $selectStmt->columns(array($curAttributeDesc->getName() => $curAttributeDesc->getColumn()), $tableName);
536 $thisAttrNameQ = $this->quoteIdentifier($this->getAttribute($relationDesc->getFkName())->getColumn());
537 $otherAttrNameQ = $this->quoteIdentifier($otherMapper->getAttribute($relationDesc->getIdName())->getColumn());
542 $thisAttrNameQ = $this->quoteIdentifier($this->getAttribute($relationDesc->getIdName())->getColumn());
543 $otherAttrNameQ = $this->quoteIdentifier($otherMapper->getAttribute($relationDesc->getFkName())->getColumn());
545 $otherPkNameQ = $this->quoteIdentifier($otherMapper->getAttribute($otherPkNames[0])->getColumn());
558 $references[$otherTable]['attributes'][$curReferenceDesc->getName()] = $otherAttributeDesc->getColumn();
572 * @param $criteria An array of Criteria instances that define conditions on the object's attributes (maybe null)
602 * @param $orderby An array holding names of attributes to order by, maybe appended with 'ASC', 'DESC' (maybe null)
604 * @param $defaultOrder The default order definition to use, if orderby is null (@see PersistenceMapper::getDefaultOrder())
606 protected function addOrderBy(SelectStatement $selectStmt, $orderby, $tableName, $defaultOrder) {
627 * @param $criteria An array of Criteria instances that define conditions on the object's attributes (maybe null)
697 * @param $includeTransaction Boolean whether to also search in the current transaction (default: false)
703 $nmMapper = $this->_persistenceFacade->getMapper($relationDesc->getThisEndRelation()->getOtherType());
806 protected function getCacheKey($string, $criteriaArray, $stringArray, PagingInfo $pagingInfo=null) {
getDefaultOrder($roleName=null)
Definition: RDBMapper.php:605
static fromObject($object)
Create a PersistenceProxy instance from a PersistentObject.
Definition: PersistentObjectProxy.php:45
setState($state)
Set the state of the object to one of the STATE constants.
Instances of RDBAttributeDescription describe attributes of PersistentObjects in a relational databas...
Definition: RDBAttributeDescription.php:21
UpdateOperation instances hold data necessary to accomplish an update operation on the persistent sto...
Definition: UpdateOperation.php:21
getOtherEndRelation()
Get the RDBManyToOneRelationDescription describing the relation between the connecting type and the '...
Definition: RDBManyToManyRelationDescription.php:56
convertValuesForStorage($values)
Convert values for before storage.
Definition: NodeUnifiedRDBMapper.php:675
getThisEndRelation()
Get the RDBOneToManyRelationDescription describing the relation between 'this' end and the connecting...
Definition: RDBManyToManyRelationDescription.php:47
getManyToOneRelationSelectSQL(RelationDescription $relationDescription, array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Get the statement for selecting a many to one relation.
Definition: NodeUnifiedRDBMapper.php:275
addReferences(SelectStatement $selectStmt, $tableName)
Add the columns and joins to select references to a given select statement.
Definition: NodeUnifiedRDBMapper.php:513
RDBMapper maps objects of one type to a relational database schema.
Definition: RDBMapper.php:49
IllegalArgumentException signals an exception in method arguments.
Definition: IllegalArgumentException.php:18
InsertOperation holds data necessary to accomplish an insert operation on the persistent store...
Definition: InsertOperation.php:21
isForeignKey($name)
Check if a given attribute is a foreign key (used to reference a parent)
Definition: NodeUnifiedRDBMapper.php:774
getSelectSQL($criteria=null, $alias=null, $orderby=null, PagingInfo $pagingInfo=null, $queryId=null)
Definition: NodeUnifiedRDBMapper.php:207
static get(RDBMapper $mapper, $id=self::NO_CACHE)
Get the SelectStatement instance with the given id.
Definition: SelectStatement.php:40
getInsertSQL(PersistentObject $object)
Definition: NodeUnifiedRDBMapper.php:442
ObjectId is the unique identifier of an object.
Definition: ObjectId.php:27
getAttributes(array $tags=array(), $matchMode='all')
Definition: RDBMapper.php:530
getPersistentValues(PersistentObject $object)
Get an associative array of attribute name-value pairs to be stored for a given oject (references are...
Definition: NodeUnifiedRDBMapper.php:653
Criteria defines a condition on a PersistentObject's attribute used to select specific instances...
Definition: Criteria.php:21
PagingInfo contains information about a paged list.
Definition: PagingInfo.php:18
getRelationImpl($roleName, $includeManyToMany)
Internal implementation of PersistenceMapper::getRelation()
Definition: RDBMapper.php:474
createPKCondition(ObjectId $oid)
Definition: NodeUnifiedRDBMapper.php:739
addColumns(SelectStatement $selectStmt, $tableName)
Add the columns to a given select statement.
Definition: NodeUnifiedRDBMapper.php:493
addOrderBy(SelectStatement $selectStmt, $orderby, $tableName, $defaultOrder)
Add the given order to the select statement.
Definition: NodeUnifiedRDBMapper.php:606
getForeignKeyRelations()
Get all foreign key relations (used to reference a parent)
Definition: NodeUnifiedRDBMapper.php:755
Instances of RDBManyToOneRelationDescription describe a many to one relation from 'this' end (many) t...
Definition: RDBManyToOneRelationDescription.php:21
PersistentObjectProxy is proxy for an PersistentObject instance.
Definition: PersistentObjectProxy.php:25
getManyToManyRelationSelectSQL(RelationDescription $relationDescription, array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Get the statement for selecting a many to many relation.
Definition: NodeUnifiedRDBMapper.php:375
getType()
Get the entity type that this mapper handles.
getUpdateSQL(PersistentObject $object)
Definition: NodeUnifiedRDBMapper.php:457
quoteIdentifier($identifier)
Definition: RDBMapper.php:285
DeleteOperation holds data necessary to accomplish an delete operation on the persistent store...
Definition: DeleteOperation.php:21
addCriteria(SelectStatement $selectStmt, $criteria, $tableName)
Add the given criteria to the select statement.
Definition: NodeUnifiedRDBMapper.php:576
getBind($criteria, $tableName)
Get an array of placeholder value pairs for bind.
Definition: NodeUnifiedRDBMapper.php:631
renderCriteria(Criteria $criteria, $placeholder=null, $tableName=null, $columnName=null)
Render a Criteria instance as string.
Definition: RDBMapper.php:661
Instances of RDBManyToManyRelationDescription describe a many to many relation from 'this' end to 'ot...
Definition: RDBManyToManyRelationDescription.php:26
getRelations($hierarchyType='all')
Definition: RDBMapper.php:437
Instances of RelationDescription describe relations between different types of PersistentObjects.
Definition: RelationDescription.php:21
NodeUnifiedRDBMapper maps Node objects to a relational database schema where each Node type has its o...
Definition: NodeUnifiedRDBMapper.php:40
prepareForStorage(PersistentObject $object)
Definition: NodeUnifiedRDBMapper.php:49
static isValid($oid)
Check if a serialized ObjectId has a valid syntax, the type is known and if the number of primary key...
Definition: ObjectId.php:132
setValue($name, $value, $forceSet=false, $trackChange=true)
Set the value of a named item if it exists.
ensureTablePrefix($expression, $tableName)
Make sure that the given table name is prefixed before the given expression and return the modified e...
Definition: NodeUnifiedRDBMapper.php:791
getOneToManyRelationSelectSQL(RelationDescription $relationDescription, array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Get the statement for selecting a one to many relation.
Definition: NodeUnifiedRDBMapper.php:325
loadRelationObjects(PersistentObjectProxy $objectProxy, PersistentObjectProxy $relativeProxy, RDBManyToManyRelationDescription $relationDesc, $includeTransaction=false)
Load the relation objects in a many to many relation from the database.
Definition: NodeUnifiedRDBMapper.php:700
Instances of ReferenceDescription describe reference attributes of PersistentObjects.
Definition: ReferenceDescription.php:21
getDeleteSQL(ObjectId $oid)
Definition: NodeUnifiedRDBMapper.php:475
Instances of RDBOneToManyRelationDescription describe a one to many relation from 'this' end (one) to...
Definition: RDBOneToManyRelationDescription.php:21
getCacheKey($string, $criteriaArray, $stringArray, PagingInfo $pagingInfo=null)
Get a unique string for the given parameter values.
Definition: NodeUnifiedRDBMapper.php:806
const CACHE_KEY
Definition: NodeUnifiedRDBMapper.php:42
getRelationSelectSQL(array $otherObjectProxies, $otherRole, $criteria=null, $orderby=null, PagingInfo $pagingInfo=null)
Definition: NodeUnifiedRDBMapper.php:253
getPkNames()
Get the names of the primary key values.
PersistentObject defines the interface of all persistent objects.
Definition: PersistentObject.php:24