From: Roland Haeder Date: Tue, 13 Oct 2015 10:30:41 +0000 (+0200) Subject: added named query for data retrieval by id number X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e6550feec970ad6bf2ec9989c6e21b36d140b843;p=addressbook-lib.git added named query for data retrieval by id number Signed-off-by:Roland Häder --- diff --git a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java b/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java index 819d83f..95496f1 100644 --- a/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java +++ b/src/org/mxchange/addressbook/model/addressbook/UserAddressbook.java @@ -47,7 +47,8 @@ import org.mxchange.jusercore.model.user.User; @NamedQueries ( { @NamedQuery (name = "AllUsersAddressbooks", query = "SELECT a FROM addressbooks AS a WHERE a.addressbookUser = :param ORDER BY a.addressbookId ASC"), - @NamedQuery (name = "SearchUserAddressbookName", query = "SELECT a FROM addressbooks AS a WHERE a.addressbookUser = :user AND LOWER(a.addressbookName) LIKE LOWER(:name)") + @NamedQuery (name = "SearchUserAddressbookName", query = "SELECT a FROM addressbooks AS a WHERE a.addressbookUser = :user AND LOWER(a.addressbookName) LIKE LOWER(:name)"), + @NamedQuery (name = "FindAddressbookById", query = "SELECT a FROM addressbooks AS a WHERE a.addressbookId = :id") } ) public class UserAddressbook implements Addressbook, Comparable {