Example #1
0
 /**
  * Builds and returns the source to build a join for a m:n relation.
  *
  * @param DomainObjectInterface $parentObject
  * @param string $propertyName
  * @return \TYPO3\CMS\Extbase\Persistence\Generic\Qom\SourceInterface $source
  */
 protected function getSource(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, Persistence\Generic\Query::JCR_JOIN_TYPE_INNER, $joinCondition);
     return $source;
 }
Example #2
0
 /**
  * Sets the statement of this query. If you use this, you will lose the abstraction from a concrete storage
  * backend (database).
  *
  * @param string|\TYPO3\CMS\Core\Database\PreparedStatement $statement The statement
  * @param array $parameters An array of parameters. These will be bound to placeholders '?' in the $statement.
  * @return QueryInterface
  */
 public function statement($statement, array $parameters = array())
 {
     $this->statement = $this->qomFactory->statement($statement, $parameters);
     return $this;
 }
Example #3
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 \TYPO3\CMS\Extbase\Persistence\Generic\Qom\ComparisonInterface
  * @api
  */
 public function greaterThanOrEqual($propertyName, $operand)
 {
     return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()), QueryInterface::OPERATOR_GREATER_THAN_OR_EQUAL_TO, $operand);
 }