class MetaStoreRestApi {

  @GET
  @Path("/database")
  @SubmarineApi
  public Response getDatabase(@QueryParam("database") String name) {
    Database database;
    try {
      database = submarineMetaStore.getDatabase(name);
    } catch (NoSuchObjectException e) {
      LOG.error(e.getMessage(), e);
      return new JsonResponse.Builder<String>(Response.Status.NOT_FOUND)
              .success(false).build();
    }
    return new JsonResponse.Builder<Database>(Response.Status.OK)
            .success(true).result(database).build();
  }

  @Inject public  MetaStoreRestApi();

}