code: public <E> List<E> executeQuery(Class<E> entityClass, OracleNoSQLQueryInterpreter interpreter,
              Set<Object> primaryKeys)
      {
  
          EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClass);
          MetamodelImpl metamodel = (MetamodelImpl) KunderaMetadataManager.getMetamodel(kunderaMetadata,
                  entityMetadata.getPersistenceUnit());
  
          EntityType entityType = metamodel.entity(entityMetadata.getEntityClazz());
  
          List<E> results = new ArrayList<E>();
  
          if (interpreter.getClauseQueue().isEmpty()) // Select all query
          {
              // Select Query with where clause (requires search within inverted
              // index)
              return findAll(entityClass, interpreter.getSelectColumns(), null);
          }
          else if (interpreter.isFindById() && interpreter.getClauseQueue().size() == 1)
          {
              Object value = null;
              Object clause = interpreter.getClauseQueue().peek();
              if (clause.getClass().isAssignableFrom(FilterClause.class))
              {
                  value = interpreter.getRowKey();
              }
              else
              {
                  throw new QueryHandlerException(
                          "Query with multiple AND/OR clause is not supported with oracle nosql db");
              }
              if (value != null)
              {
                  Object output = find(entityClass, value, Arrays.asList(interpreter.getSelectColumns()));
                  if (output != null)
                  {
                      results.add((E) output);
                  }
              }
          }
          else if (interpreter.getClauseQueue().size() >= 1) // query over index
          // keys.
          {
              return onIndexSearch(interpreter, entityMetadata, metamodel, results,
                      Arrays.asList(interpreter.getSelectColumns()));
          }
          return results;
  
          // throw new
          // UnsupportedOperationException("Query with where clause is not yet
          // supported");
      }
docs: On JPQL query execution.
  
  @param <E>
  the element type
  @param entityClass
  entity class.
  @param interpreter
  query interpreter
  @param primaryKeys
  set of primary keys. Empty if
  @return the list