116 return $this->backend->getObjectCountByQuery($query);
127 return $this->backend->getObjectDataByQuery($query);
143 return $this->backend->getIdentifierByObject($object);
157 if (isset($this->newObjects[$identifier])) {
158 return $this->newObjects[$identifier];
160 if ($this->persistenceSession->hasIdentifier($identifier, $objectType)) {
161 return $this->persistenceSession->getObjectByIdentifier($identifier, $objectType);
163 return $this->backend->getObjectByIdentifier($identifier, $objectType);
176 $this->backend->setAggregateRootObjects($this->addedObjects);
177 $this->backend->setChangedEntities($this->changedObjects);
178 $this->backend->setDeletedEntities($this->removedObjects);
179 $this->backend->commit();
195 return $this->queryFactory->create($type);
203 public function add($object)
205 $this->addedObjects->attach($object);
206 $this->removedObjects->detach($object);
214 public function remove($object)
216 if ($this->addedObjects->contains($object)) {
217 $this->addedObjects->detach($object);
219 $this->removedObjects->attach($object);
229 public function update($object)
232 throw new \TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException(
'The object of type "' . get_class($object) .
'" given to update must be persisted already, but is new.', 1249479819);
234 $this->changedObjects->attach($object);
245 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__, 1476108078);
254 $this->backend->setPersistenceManager($this);
268 $this->newObjects = [];
272 $this->persistenceSession->destroy();
283 return $this->persistenceSession->hasObject($object) ===
false;
301 $this->newObjects[$identifier] = $object;
312 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__, 1476108103);
325 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__, 1476108111);
337 if (method_exists($this->backend,
'tearDown')) {
338 $this->backend->tearDown();