/**
  * @param Client $client
  * @param string $className
  *
  * @return array
  */
 protected function getModificationsNeededStatesAndIdentifiers(Client $client, $className)
 {
     $query = $this->persistenceManager->createQueryForType($className);
     $states = array(ObjectIndexer::ACTION_TYPE_CREATE => array(), ObjectIndexer::ACTION_TYPE_UPDATE => array(), ObjectIndexer::ACTION_TYPE_DELETE => array());
     foreach ($query->execute() as $object) {
         $state = $this->objectIndexer->objectIndexActionRequired($object, $client);
         $states[$state][] = $this->persistenceManager->getIdentifierByObject($object);
     }
     return $states;
 }
 /**
  * @Flow\AfterReturning("setting(Flowpack.ElasticSearch.realtimeIndexing.enabled) && within(TYPO3\Flow\Persistence\PersistenceManagerInterface) && method(public .+->(remove)())")
  * @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint
  * @return string
  */
 public function removeObjectFromIndex(\TYPO3\Flow\Aop\JoinPointInterface $joinPoint)
 {
     $arguments = $joinPoint->getMethodArguments();
     $object = reset($arguments);
     $this->objectIndexer->removeObject($object);
 }