91 return $this->backend->getObjectCountByQuery($query);
102 return $this->backend->getObjectDataByQuery($query);
118 return $this->backend->getIdentifierByObject($object);
132 if (isset($this->newObjects[$identifier])) {
133 return $this->newObjects[$identifier];
135 if ($this->persistenceSession->hasIdentifier($identifier, $objectType)) {
136 return $this->persistenceSession->getObjectByIdentifier($identifier, $objectType);
138 return $this->backend->getObjectByIdentifier($identifier, $objectType);
154 $this->backend->setAggregateRootObjects($this->addedObjects);
155 $this->backend->setChangedEntities($this->changedObjects);
156 $this->backend->setDeletedEntities($this->removedObjects);
157 $this->backend->commit();
171 return $this->queryFactory->create($type);
181 public function add($object) {
182 $this->addedObjects->attach($object);
183 $this->removedObjects->detach($object);
193 public function remove($object) {
194 if ($this->addedObjects->contains($object)) {
195 $this->addedObjects->detach($object);
197 $this->removedObjects->attach($object);
211 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);
213 $this->changedObjects->attach($object);
225 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__);
234 $this->backend->setPersistenceManager($this);
247 $this->newObjects = array();
251 $this->persistenceSession->destroy();
262 return ($this->persistenceSession->hasObject($object) === FALSE);
279 $this->newObjects[$identifier] = $object;
291 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__);
305 throw new \TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException(__METHOD__);
317 if (method_exists($this->backend,
'tearDown')) {
318 $this->backend->tearDown();
registerNewObject($object)
getObjectByIdentifier($identifier, $objectType=NULL, $useLazyLoading=FALSE)
createQueryForType($type)
convertObjectsToIdentityArrays(array $array)
getObjectCountByQuery(QueryInterface $query)
convertObjectToIdentityArray($object)
getObjectDataByQuery(QueryInterface $query)
getIdentifierByObject($object)
registerRepositoryClassName($className)
injectSettings(array $settings)