Find all the node representing the entity.

@param executionEngine the {@link GraphDatabaseService} used to run the query
@return an iterator over the nodes representing an entity
19184
public ResourceIterator<Node> findEntities(GraphDatabaseService executionEngine) {
		Result result = executionEngine.execute( getFindEntitiesQuery() );
		return result.columnAs( BaseNeo4jEntityQueries.ENTITY_ALIAS );
	}
317382
public static ProcessEngine lookupProcessEngine(String engineName) {

    ServiceLoader<ProcessEngineProvider> serviceLoader = ServiceLoader.load(ProcessEngineProvider.class);
    Iterator<ProcessEngineProvider> iterator = serviceLoader.iterator();

    if(iterator.hasNext()) {
      ProcessEngineProvider provider = iterator.next();
      if (engineName == null) {
        return provider.getDefaultProcessEngine();
      } else {
        return provider.getProcessEngine(engineName);
      }
    } else {
      throw new RestException(Status.INTERNAL_SERVER_ERROR, "Could not find an implementation of the "+ProcessEngineProvider.class+"- SPI");
    }
  }
1165867
public @NotNull <T> List<T> findAll(@NotNull Class<T> cl, @NotNull SqlQuery query) {
        return executeQuery(resultProcessorForClass(cl), query);
    }
663387
@Override
    public <T> T find(Class<T> entityClass, Object primaryKey)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "em.find(" + entityClass + ',' + primaryKey + ");\n" + toString());

        return getEMInvocationInfo(false).find(entityClass, primaryKey);
    }
100622
@Override
    public T findOne(final I id) {
        return inTransaction(new Callable<T>() {
            @Override
            public T call() throws Exception {
                return entityManager.find(entity, id);
            }
        });
    }
458461
public ClosableIterator<NodeWithEmbeddedNodes> findEntities(HttpNeo4jClient executionEngine, EntityKey[] keys, Long txId) {
		if ( singlePropertyKey ) {
			return singlePropertyIdFindEntities( executionEngine, keys, txId );
		}
		else {
			return multiPropertiesIdFindEntities( executionEngine, keys, txId );
		}
	}
1215206
private ClosableIterator<NodeWithEmbeddedNodes> singlePropertyIdFindEntities(HttpNeo4jClient executionEngine, EntityKey[] keys, Long txId) {
		Object[] paramsValues = new Object[keys.length];
		for ( int i = 0; i < keys.length; i++ ) {
			paramsValues[i] = keys[i].getColumnValues()[0];
		}
		Map<String, Object> params = Collections.singletonMap( "0", (Object) paramsValues );
		Statements statements = new Statements();
		statements.addStatement( multiGetQuery, params, Statement.AS_GRAPH );
		List<StatementResult> results = executeQuery( executionEngine, txId, statements );
		return closableIterator( results, keys );

	}
368540
@Override
  public Entity findOne(Query<Entity> query) {
    if (transactionInformation.isRepositoryCompletelyClean(getEntityType()) && cacheable) {
      // pageSize is irrelevant for findOne, would be a waste to cache them in different entries
      // sort may affect which of the results is the first result, so cannot ignore that.
      QueryImpl<Entity> cacheKey = new QueryImpl<>(query).setPageSize(1);
      List<Object> ids = l3Cache.get(delegate(), cacheKey);
      if (ids.isEmpty()) {
        return null;
      }
      return delegate().findOneById(ids.get(0), query.getFetch());
    }
    return delegate().findOne(query);
  }
190403
@Override
    public Iterator<ENTITY> iterator() {

        StatementWrapper statementWrapper = new BoundStatementWrapper(getOperationType(boundStatement), meta,
                boundStatement, encodedBoundValues);

        if (LOGGER.isTraceEnabled()) {
            LOGGER.trace(String.format("Generate iterator for typed query : %s",
                    statementWrapper.getBoundStatement().preparedStatement().getQueryString()));
        }

        CompletableFuture<ResultSet> futureRS = rte.execute(statementWrapper);
        return new EntityIteratorWrapper<>(futureRS, meta, statementWrapper, options);
    }
1049263
private Iterator<D> getIterator() throws DataRecordException, IOException {
    if (Boolean.valueOf(this.workUnitState.getProp(ConfigurationKeys.SOURCE_QUERYBASED_IS_SPECIFIC_API_ACTIVE))) {
      return this.getRecordSetFromSourceApi(this.schema, this.entity, this.workUnit, this.predicateList);
    }
    return this.getRecordSet(this.schema, this.entity, this.workUnit, this.predicateList);
  }
977497
private void rebuildNodeIndex(final String entityType) {

		final NodeFactory nodeFactory       = new NodeFactory(SecurityContext.getSuperUserInstance());
		final DatabaseService graphDb       = (DatabaseService) arguments.get("graphDb");
		Iterator<AbstractNode> nodeIterator = null;

		nodeIterator = Iterables.map(nodeFactory, graphDb.getNodesByTypeProperty(entityType)).iterator();

		if (entityType == null) {

			info("Node type not set or no entity class found. Starting (re-)indexing all nodes");

		} else {

			info("Starting (re-)indexing all nodes of type {}", entityType);
		}

		long count = bulkGraphOperation(securityContext, nodeIterator, 1000, "RebuildNodeIndex", new BulkGraphOperation<AbstractNode>() {

			@Override
			public boolean handleGraphObject(SecurityContext securityContext, AbstractNode node) {

				node.addToIndex();

				return true;
			}

			@Override
			public void handleThrowable(SecurityContext securityContext, Throwable t, AbstractNode node) {
				logger.warn("Unable to index node {}: {}", new Object[]{node, t.getMessage()});
			}

			@Override
			public void handleTransactionFailure(SecurityContext securityContext, Throwable t) {
				logger.warn("Unable to index node: {}", t.getMessage());
			}
		});

		info("Done with (re-)indexing {} nodes", count);
	}
588868
def get_execution_engine(self, name):
        """"""
        try:
            return self.execution_engines[name]
        except KeyError:
            raise InvalidEngineError("Unsupported execution engine: {}".format(name))
642627
@Override
    public Iterable<T> findAll() {
        return inTransaction(new Callable<Iterable<T>>() {
            @Override
            public Iterable<T> call() throws Exception {
                CriteriaQuery<T> cq = entityManager.getCriteriaBuilder().createQuery(entity);
                Root<T> pet = cq.from(entity);
                cq.select(pet);
                return entityManager.createQuery(cq).getResultList();
            }
        });
    }
1049450
protected ExecutionEntity findFirstParentScopeExecution(ExecutionEntity executionEntity) {
    ExecutionEntityManager executionEntityManager = commandContext.getExecutionEntityManager();
    ExecutionEntity parentScopeExecution = null;
    ExecutionEntity currentlyExaminedExecution = executionEntityManager.findById(executionEntity.getParentId());
    while (currentlyExaminedExecution != null && parentScopeExecution == null) {
      if (currentlyExaminedExecution.isScope()) {
        parentScopeExecution = currentlyExaminedExecution;
      } else {
        currentlyExaminedExecution = executionEntityManager.findById(currentlyExaminedExecution.getParentId());
      }
    }
    return parentScopeExecution;
  }
479003
@Override
  public Iterator<Entity> iterator() {
    Stream<Entity> entities = delegate().findAll(new QueryImpl<>());
    return resolveEntityReferences(entities).iterator();
  }
402155
private <T> Iterator<T> getAll(String entityType, IUnmarshaller<T> unmarshaller) throws StorageException {
        String query = matchAllQuery();
        return getAll(entityType, unmarshaller, query);
    }
308809
public void removeEntity(GraphDatabaseService executionEngine, Object[] columnValues) {
		Map<String, Object> params = params( columnValues );
		executionEngine.execute( getRemoveEntityQuery(), params );
	}