From 8d105e1772dbb9a46bc59972fd54421a9e2b0632 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 17 Apr 2016 17:25:51 +0200 Subject: [PATCH] Added named query SearchContactById which searches for a contact entity by it's id number. --- src/org/mxchange/jcontacts/contact/UserContact.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 { -- 2.39.5