From: Roland Häder Date: Sun, 3 Sep 2017 22:53:17 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=92ad4b34df0b00b9123cc0087e0f7403e5f3305a;p=jcontacts-core.git Continued: - added named query "SearchContact" which accepts a whole contact instance as parameter (very cool!) Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index 3c2bd47..6a61c8b 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -69,6 +69,7 @@ import org.mxchange.jphone.phonenumbers.mobile.MobileNumber; @NamedQuery (name = "AllContacts", query = "SELECT c FROM contacts AS c ORDER BY c.contactId ASC"), @NamedQuery (name = "AllContactEmailAddresses", query = "SELECT c.contactEmailAddress FROM contacts AS c ORDER BY c.contactId ASC"), @NamedQuery (name = "AllContactsByCellphone", query = "SELECT c FROM contacts AS c WHERE c.contactMobileNumber = :mobileNumber ORDER BY c.contactId ASC"), + @NamedQuery (name = "SearchContact", query = "SELECT c FROM contacts AS c WHERE c = :contact"), @NamedQuery (name = "SearchContactById", query = "SELECT c FROM contacts AS c WHERE c.contactId = :contactId"), @NamedQuery (name = "SearchContactByEmailAddress", query = "SELECT c FROM contacts AS c WHERE LOWER(c.contactEmailAddress) LIKE LOWER(:emailAddress)") }