]> git.mxchange.org Git - addressbook-lib.git/commitdiff
added missing named query SearchShareeAddressbookShare
authorRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 08:34:04 +0000 (10:34 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 16 Oct 2015 08:34:04 +0000 (10:34 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/addressbook/model/addressbook/shared/AddressbookShare.java

index a88a032faabdfd4ad5d06b96b1a52bccdaa769c3..6e7e042ac0cf712399d5dba4cf12b60db352665e 100644 (file)
@@ -42,7 +42,16 @@ import org.mxchange.jusercore.model.user.User;
 @Entity (name = "addressbook_shares")
 @Table (name = "addressbook_shares")
 @NamedQueries (
-               @NamedQuery (name = "SearchUserSharedAddressbooks", query = "SELECT s FROM addressbook_shares AS s WHERE s.shareUserOwner = :user ORDER BY s.shareId ASC")
+               {
+                       @NamedQuery (
+                                       name = "SearchUserSharedAddressbooks",
+                                       query = "SELECT s FROM addressbook_shares AS s WHERE s.shareUserOwner = :user ORDER BY s.shareId ASC"
+                       ),
+                       @NamedQuery (
+                                       name = "SearchShareeAddressbookShare",
+                                       query = "SELECT s FROM addressbook_shares AS s WHERE s.shareAddressbook = :addressbook AND s.shareUserSharee = :sharee"
+                       )
+               }
 )
 public class AddressbookShare implements ShareableAddressbook, Comparable<ShareableAddressbook> {