192 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception(
'Tried to get the query settings without seting them before.', 1248689115);
239 if ($this->source ===
null) {
240 $this->source = $this->qomFactory->selector($this->
getType(), $this->dataMapFactory->buildDataMap($this->getType())->getTableName());
251 public function execute($returnRawQueryResult =
false)
253 if ($returnRawQueryResult) {
254 return $this->persistenceManager->getObjectDataByQuery($this);
256 return $this->objectManager->get(\
TYPO3\CMS\
Extbase\Persistence\QueryResultInterface::class, $this);
301 throw new \InvalidArgumentException(
'The limit must be an integer >= 1', 1245071870);
340 throw new \InvalidArgumentException(
'The offset must be a positive integer', 1245071872);
413 if (is_array($constraint1)) {
414 $resultingConstraint = array_shift($constraint1);
415 $constraints = $constraint1;
417 $constraints = func_get_args();
418 $resultingConstraint = array_shift($constraints);
420 if ($resultingConstraint ===
null) {
421 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidNumberOfConstraintsException(
'There must be at least one constraint or a non-empty array of constraints given.', 1268056288);
424 $resultingConstraint = $this->qomFactory->_and($resultingConstraint,
$constraint);
426 return $resultingConstraint;
438 if (is_array($constraint1)) {
439 $resultingConstraint = array_shift($constraint1);
440 $constraints = $constraint1;
442 $constraints = func_get_args();
443 $resultingConstraint = array_shift($constraints);
445 if ($resultingConstraint ===
null) {
446 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\InvalidNumberOfConstraintsException(
'There must be at least one constraint or a non-empty array of constraints given.', 1268056289);
449 $resultingConstraint = $this->qomFactory->_or($resultingConstraint,
$constraint);
451 return $resultingConstraint;
474 public function equals($propertyName, $operand, $caseSensitive =
true)
476 if (is_object($operand) || $caseSensitive) {
477 $comparison = $this->qomFactory->comparison(
478 $this->qomFactory->propertyValue($propertyName, $this->getSelectorName()),
483 $comparison = $this->qomFactory->comparison(
484 $this->qomFactory->lowerCase($this->qomFactory->propertyValue($propertyName, $this->getSelectorName())),
499 public function like($propertyName, $operand)
501 return $this->qomFactory->comparison(
502 $this->qomFactory->propertyValue($propertyName, $this->getSelectorName()),
516 public function contains($propertyName, $operand)
530 public function in($propertyName, $operand)
532 if (!\
TYPO3\CMS\
Extbase\Utility\TypeHandlingUtility::isValidTypeForMultiValueComparison($operand)) {
533 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\UnexpectedTypeException(
'The "in" operator must be given a multivalued operand (array, ArrayAccess, Traversable).', 1264678095);
535 return $this->qomFactory->comparison($this->qomFactory->propertyValue($propertyName, $this->getSelectorName()),
QueryInterface::OPERATOR_IN, $operand);
545 public function lessThan($propertyName, $operand)
595 public function between($propertyName, $operandLower, $operandUpper)
608 $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\
TYPO3\CMS\
Extbase\Object\ObjectManager::class);
609 $this->persistenceManager = $this->objectManager->get(\
TYPO3\CMS\
Extbase\Persistence\PersistenceManagerInterface::class);
610 $this->dataMapFactory = $this->objectManager->get(\
TYPO3\CMS\
Extbase\Persistence\Generic\Mapper\DataMapFactory::class);
611 $this->qomFactory = $this->objectManager->get(\
TYPO3\CMS\
Extbase\Persistence\Generic\Qom\QueryObjectModelFactory::class);
620 return [
'type',
'source',
'constraint',
'statement',
'orderings',
'limit',
'offset',
'querySettings'];
640 public function isEmpty($propertyName)
642 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__, 1476122265);