diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-08-14 10:37:16 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-08-14 10:37:16 -0230 |
commit | 13c8da45cf4c892a17bda4f224a832bafd8e1bf4 (patch) | |
tree | d251dc62af721096338ac5be0ecbeaa825ce0e9e /java/demo/Database/library/BookI.java | |
parent | More fixes to the interrupt test. (diff) | |
download | ice-13c8da45cf4c892a17bda4f224a832bafd8e1bf4.tar.bz2 ice-13c8da45cf4c892a17bda4f224a832bafd8e1bf4.tar.xz ice-13c8da45cf4c892a17bda4f224a832bafd8e1bf4.zip |
- Cleaned up all demos.
- Fixed all demo warnings.
- Fixed applet and swing demo to use invocation timeout, not connect
timeouts.
Diffstat (limited to 'java/demo/Database/library/BookI.java')
-rw-r--r-- | java/demo/Database/library/BookI.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/java/demo/Database/library/BookI.java b/java/demo/Database/library/BookI.java index 45a6ead30f0..18a86d7337e 100644 --- a/java/demo/Database/library/BookI.java +++ b/java/demo/Database/library/BookI.java @@ -15,6 +15,7 @@ import Demo.*; // class BookI extends _BookDisp { + @Override public void ice_ping(Ice.Current current) { @@ -40,6 +41,7 @@ class BookI extends _BookDisp } } + @Override public BookDescription describe(Ice.Current current) { @@ -66,6 +68,7 @@ class BookI extends _BookDisp } } + @Override public void setTitle(String title, Ice.Current current) { @@ -89,6 +92,7 @@ class BookI extends _BookDisp } } + @Override public void setAuthors(java.util.List<String> authors, Ice.Current current) { @@ -156,6 +160,7 @@ class BookI extends _BookDisp } } + @Override public void destroy(Ice.Current current) { @@ -181,6 +186,7 @@ class BookI extends _BookDisp } } + @Override public String getRenter(Ice.Current current) throws BookNotRentedException @@ -220,6 +226,12 @@ class BookI extends _BookDisp } } + // + // The context automatically closes the associated statements at the end of + // the request. + // + @SuppressWarnings("resource") + @Override public void rentBook(String name, Ice.Current current) throws InvalidCustomerException, BookRentedException @@ -290,6 +302,7 @@ class BookI extends _BookDisp } } + @Override public void returnBook(Ice.Current current) throws BookNotRentedException @@ -306,7 +319,7 @@ class BookI extends _BookDisp { throw new Ice.ObjectNotExistException(); } - Integer renterId = rs.getInt("renter_id"); + rs.getInt("renter_id"); if(rs.wasNull()) { throw new BookNotRentedException(); |