aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-21 14:33:53 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-21 14:33:53 +0100
commit267e832fa16029f0ecd1cdaca699d661ddc556e8 (patch)
treec564004f0239a8a7e0ce65447aca5bac0f9c9571 /src/main/java
parentfd953370ba0daea03c5de58aac30e097f86826c6 (diff)
downloadesper-testing-267e832fa16029f0ecd1cdaca699d661ddc556e8.tar.gz
esper-testing-267e832fa16029f0ecd1cdaca699d661ddc556e8.tar.bz2
esper-testing-267e832fa16029f0ecd1cdaca699d661ddc556e8.tar.xz
esper-testing-267e832fa16029f0ecd1cdaca699d661ddc556e8.zip
o Improved paging with a "view" state that's either 'loading', 'data' or 'error'.
Diffstat (limited to 'src/main/java')
-rwxr-xr-xsrc/main/java/io/trygvis/esper/testing/web/resource/CoreResource.java11
1 files changed, 9 insertions, 2 deletions
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<PersonDetailJson> 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<List<PersonDetailJson>>() {
protected List<PersonDetailJson> run() throws SQLException {
List<PersonDetailJson> list = new ArrayList<>();
@@ -201,7 +206,7 @@ public class CoreResource extends AbstractResource {
protected final SqlF<BuildDto, BuildJson> getBuildJson = new SqlF<BuildDto, BuildJson>() {
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;
}
}