From 267e832fa16029f0ecd1cdaca699d661ddc556e8 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 21 Jan 2013 14:33:53 +0100 Subject: o Improved paging with a "view" state that's either 'loading', 'data' or 'error'. --- .../io/trygvis/esper/testing/web/resource/CoreResource.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main/java/io/trygvis/esper') diff --git a/src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java b/src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java index 158e9ab..8ca2521 100755 --- a/src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java +++ b/src/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java @@ -35,6 +35,11 @@ public class CoreResource extends AbstractResource { @Path("/person") public List getPersons(@MagicParam final PageRequest pageRequest, @QueryParam("query") final String query) throws Exception { +// Thread.sleep(1000); +// if(new Random().nextInt(3) == 0) { +// throw new RuntimeException("internal error"); +// } + return da.inTransaction(new CoreDaosCallback>() { protected List run() throws SQLException { List list = new ArrayList<>(); @@ -201,7 +206,7 @@ public class CoreResource extends AbstractResource { protected final SqlF getBuildJson = new SqlF() { public BuildJson apply(BuildDto dto) throws SQLException { - return new BuildJson(dto.uuid, dto.timestamp, dto.success); + return new BuildJson(dto.uuid, dto.createdDate, dto.timestamp, dto.success); } }; @@ -245,11 +250,13 @@ public class CoreResource extends AbstractResource { class BuildJson { public final UUID uuid; public final DateTime createdDate; + public final DateTime timestamp; public final boolean success; - public BuildJson(UUID uuid, DateTime createdDate, boolean success) { + public BuildJson(UUID uuid, DateTime createdDate, DateTime timestamp, boolean success) { this.uuid = uuid; this.createdDate = createdDate; + this.timestamp = timestamp; this.success = success; } } -- cgit v1.2.3