From afbfd905b8f5326d149ba7fdfd784af50d85e5ee Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 23 Dec 2012 12:00:04 +0100 Subject: o Storing the file file reference on the jenkins build and job. --- src/main/java/io/trygvis/esper/testing/core/db/FileDao.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/io/trygvis/esper/testing/core') diff --git a/src/main/java/io/trygvis/esper/testing/core/db/FileDao.java b/src/main/java/io/trygvis/esper/testing/core/db/FileDao.java index 0878f63..c418970 100644 --- a/src/main/java/io/trygvis/esper/testing/core/db/FileDao.java +++ b/src/main/java/io/trygvis/esper/testing/core/db/FileDao.java @@ -14,7 +14,7 @@ public class FileDao { this.c = c; } - public void store(URI url, String contentType, byte[] data) throws SQLException { + public UUID store(URI url, String contentType, byte[] data) throws SQLException { try (PreparedStatement s = c.prepareStatement("INSERT INTO file(uuid, created_date, url, content_type, data) VALUES(?, ?, ?, ?, ?)")) { UUID uuid = UUID.randomUUID(); int i = 1; @@ -24,6 +24,7 @@ public class FileDao { s.setString(i++, contentType); s.setBinaryStream(i, new ByteArrayInputStream(data), data.length); s.executeUpdate(); + return uuid; } } } -- cgit v1.2.3