]> git.mxchange.org Git - jcontacts-core.git/commitdiff
Added named query "AllContactsByCellphone" for finding all contacts for given cellpho...
authorRoland Haeder <roland@mxchange.org>
Sun, 17 Apr 2016 12:08:44 +0000 (14:08 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 17 Apr 2016 12:23:53 +0000 (14:23 +0200)
src/org/mxchange/jcontacts/contact/UserContact.java

index 8aeda22442d514c8002a5b05394bc16e1cdf6823..a0b8299af470e2a3fd5ffb66b85e0c407934d7e4 100644 (file)
@@ -31,6 +31,8 @@ import javax.persistence.Id;
 import javax.persistence.Index;
 import javax.persistence.JoinColumn;
 import javax.persistence.Lob;
+import javax.persistence.NamedQueries;
+import javax.persistence.NamedQuery;
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
@@ -66,6 +68,9 @@ 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")
+)
 public class UserContact implements Contact {
 
        /**