]> git.mxchange.org Git - jcontacts-core.git/commitdiff
Added named query SearchContactById which searches for a contact entity by it's id...
authorRoland Haeder <roland@mxchange.org>
Sun, 17 Apr 2016 15:25:51 +0000 (17:25 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 17 Apr 2016 15:25:51 +0000 (17:25 +0200)
src/org/mxchange/jcontacts/contact/UserContact.java

index a0b8299af470e2a3fd5ffb66b85e0c407934d7e4..51b094709340787b80acb49fc9806c72151e0fda 100644 (file)
@@ -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 {