@Override
  protected OperationResult executeOperation(
      IndexQueryNodeOnNeoPinEntertainmentVideoIndexOperation operation) {
    int resultCode;
    int result;

    Neo4jConnectionStateEmbedded connection = (Neo4jConnectionStateEmbedded) getDbConnectionState();
    Transaction tx = connection.getDb().beginTx();
    try {
      Iterator<Node> nodes =
          connection
              .getDb()
              .index()
              .forNodes(operation.getIndexName())
              .query(operation.getIndexQuery());

      resultCode = 0;
      result = IteratorUtil.count(nodes);
    } catch (Exception e) {
      resultCode = -1;
      result = 0;
    } finally {
      tx.finish();
    }

    return operation.buildResult(resultCode, result);
  }
 @Override
 protected OperationResult executeOperation(CountProductsUnderOfferInCountryOperation operation) {
   Neo4jConnectionStateEmbedded connection = (Neo4jConnectionStateEmbedded) getDbConnectionState();
   connection.getExecutionEngine().execute(operation.getQueryString(), operation.getParams());
   // TODO find way to do this
   int resultCode = 0;
   // TODO return what query actually returns
   int result = 0;
   return operation.buildResult(resultCode, result);
 }