Beispiel #1
0
 /**
  * Builds and returns the source to build a join for a m:n relation.
  *
  * @param Tx_Extbase_DomainObject_DomainObjectInterface $parentObject
  * @param string $propertyName
  * @return Tx_Extbase_Persistence_QOM_SourceInterface $source
  */
 protected function getSource(Tx_Extbase_DomainObject_DomainObjectInterface $parentObject, $propertyName)
 {
     $columnMap = $this->getDataMap(get_class($parentObject))->getColumnMap($propertyName);
     $left = $this->qomFactory->selector(NULL, $columnMap->getRelationTableName());
     $childClassName = $this->getType(get_class($parentObject), $propertyName);
     $right = $this->qomFactory->selector($childClassName, $columnMap->getChildTableName());
     $joinCondition = $this->qomFactory->equiJoinCondition($columnMap->getRelationTableName(), $columnMap->getChildKeyFieldName(), $columnMap->getChildTableName(), 'uid');
     $source = $this->qomFactory->join($left, $right, Tx_Extbase_Persistence_QueryInterface::JCR_JOIN_TYPE_INNER, $joinCondition);
     return $source;
 }
Beispiel #2
0
 /**
  * Returns a greater than or equal criterion used for matching objects against a query
  *
  * @param string $propertyName The name of the property to compare against
  * @param mixed $operand The value to compare with
  * @return Tx_Extbase_Persistence_QOM_ComparisonInterface
  * @api
  */
 public function greaterThanOrEqual($propertyName, $operand)
 {
     return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), Tx_Extbase_Persistence_QueryInterface::OPERATOR_GREATER_THAN_OR_EQUAL_TO, $operand);
 }