From: Roland Haeder Date: Sun, 17 Apr 2016 15:25:51 +0000 (+0200) Subject: Added named query SearchContactById which searches for a contact entity by it's id... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8d105e1772dbb9a46bc59972fd54421a9e2b0632;p=jcontacts-core.git Added named query SearchContactById which searches for a contact entity by it's id number. --- diff --git a/src/org/mxchange/jcontacts/contact/UserContact.java b/src/org/mxchange/jcontacts/contact/UserContact.java index a0b8299..51b0947 100644 --- a/src/org/mxchange/jcontacts/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/contact/UserContact.java @@ -68,8 +68,11 @@ import org.mxchange.jphone.phonenumbers.landline.LandLineNumber; ) } ) -@NamedQueries( - @NamedQuery(name = "AllContactsByCellphone", query = "SELECT c FROM contacts AS c WHERE c.contactCellphoneNumber = :cellPhone ORDER BY c.contactId ASC") +@NamedQueries ( + { + @NamedQuery (name = "AllContactsByCellphone", query = "SELECT c FROM contacts AS c WHERE c.contactCellphoneNumber = :cellPhone ORDER BY c.contactId ASC"), + @NamedQuery (name = "SearchContactById", query = "SELECT c FROM contacts AS c WHERE c.contactId = :contactId") + } ) public class UserContact implements Contact {