From e6550feec970ad6bf2ec9989c6e21b36d140b843 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Tue, 13 Oct 2015 12:30:41 +0200 Subject: [PATCH] =?utf8?q?added=20named=20query=20for=20data=20retrieval?= =?utf8?q?=20by=20id=20number=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../addressbook/model/addressbook/UserAddressbook.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- 2.39.5