Example #1
0
  private QueryInfo createFailedQuery(
      Session session, String query, QueryId queryId, Throwable cause) {
    URI self = locationFactory.createQueryLocation(queryId);
    QueryExecution execution =
        new FailedQueryExecution(queryId, query, session, self, queryExecutor, cause);

    queries.put(queryId, execution);
    queryMonitor.createdEvent(execution.getQueryInfo());
    queryMonitor.completionEvent(execution.getQueryInfo());
    stats.queryFinished(execution.getQueryInfo());

    return execution.getQueryInfo();
  }
Example #2
0
 @Test
 public void create() throws Exception {
   Beekeeper beekeepers = BeekeeperFactory.create("karl", "otto", "*****@*****.**");
   Location locations = LocationFactory.create("Darling", beekeepers);
   SubLocation subLocations = SubLocationFactory.create("Fossil", locations);
   Harvest harvests = HarvestFactory.create("Fossil", 66.00, subLocations);
   Customer customers = CustomerFactory.create("", "", "");
   Bucket buckets = BucketFactory.create(66.00, harvests);
   Sales role = SalesFactory.create("date", 22.00, buckets, customers);
   repository.save(role);
   id = role.getId();
   Assert.assertNotNull(role);
 }
Example #3
0
 @Override
 public LocationFactory<Location, LocationBean> getFactory() {
   return LocationFactory.getInstance();
 }