james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1153875 - in /james/server/trunk/jpa/src/main/java/org/apache/james: domainlist/jpa/model/JPADomain.java rrt/jpa/model/JPARecipientRewrite.java user/jpa/model/JPAUser.java
Date Thu, 04 Aug 2011 13:07:51 GMT
Author: eric
Date: Thu Aug  4 13:07:50 2011
New Revision: 1153875

URL: http://svn.apache.org/viewvc?rev=1153875&view=rev
Log:
Format code for the NamedQuery

Modified:
    james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java
    james/server/trunk/jpa/src/main/java/org/apache/james/rrt/jpa/model/JPARecipientRewrite.java
    james/server/trunk/jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java

Modified: james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java
URL: http://svn.apache.org/viewvc/james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java?rev=1153875&r1=1153874&r2=1153875&view=diff
==============================================================================
--- james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java
(original)
+++ james/server/trunk/jpa/src/main/java/org/apache/james/domainlist/jpa/model/JPADomain.java
Thu Aug  4 13:07:50 2011
@@ -30,8 +30,11 @@ import javax.persistence.Table;
  */
 @Entity(name = "JamesDomain")
 @Table(name = "JAMES_DOMAIN")
-@NamedQueries({ @NamedQuery(name = "findDomainByName", query = "SELECT domain FROM JamesDomain
domain WHERE domain.name=:name"), @NamedQuery(name = "containsDomain", query = "SELECT COUNT(domain)
FROM JamesDomain domain WHERE domain.name=:name"),
-        @NamedQuery(name = "listDomainNames", query = "SELECT domain.name FROM JamesDomain
domain"), @NamedQuery(name = "deleteDomainByName", query = "DELETE FROM JamesDomain domain
WHERE domain.name=:name") })
+@NamedQueries({ 
+    @NamedQuery(name = "findDomainByName", query = "SELECT domain FROM JamesDomain domain
WHERE domain.name=:name"), 
+    @NamedQuery(name = "containsDomain", query = "SELECT COUNT(domain) FROM JamesDomain domain
WHERE domain.name=:name"),
+    @NamedQuery(name = "listDomainNames", query = "SELECT domain.name FROM JamesDomain domain"),

+    @NamedQuery(name = "deleteDomainByName", query = "DELETE FROM JamesDomain domain WHERE
domain.name=:name") })
 public class JPADomain {
 
     /**

Modified: james/server/trunk/jpa/src/main/java/org/apache/james/rrt/jpa/model/JPARecipientRewrite.java
URL: http://svn.apache.org/viewvc/james/server/trunk/jpa/src/main/java/org/apache/james/rrt/jpa/model/JPARecipientRewrite.java?rev=1153875&r1=1153874&r2=1153875&view=diff
==============================================================================
--- james/server/trunk/jpa/src/main/java/org/apache/james/rrt/jpa/model/JPARecipientRewrite.java
(original)
+++ james/server/trunk/jpa/src/main/java/org/apache/james/rrt/jpa/model/JPARecipientRewrite.java
Thu Aug  4 13:07:50 2011
@@ -34,8 +34,10 @@ import javax.persistence.Table;
  */
 @Entity(name = "JamesRecipientRewrite")
 @Table(name = "JAMES_RECIPIENT_REWRITE")
-@NamedQueries({ @NamedQuery(name = "selectMappings", query = "SELECT rrt FROM JamesRecipientRewrite
rrt WHERE (rrt.user LIKE :user OR rrt.user='*') and (rrt.domain like :domain or rrt.domain='*')
ORDER BY rrt.domain DESC"),
-        @NamedQuery(name = "selectUserDomainMapping", query = "SELECT rrt FROM JamesRecipientRewrite
rrt WHERE rrt.user=:user AND rrt.domain=:domain"), @NamedQuery(name = "selectAllMappings",
query = "SELECT rrt FROM JamesRecipientRewrite rrt"),
+@NamedQueries({ 
+    @NamedQuery(name = "selectMappings", query = "SELECT rrt FROM JamesRecipientRewrite rrt
WHERE (rrt.user LIKE :user OR rrt.user='*') and (rrt.domain like :domain or rrt.domain='*')
ORDER BY rrt.domain DESC"),
+        @NamedQuery(name = "selectUserDomainMapping", query = "SELECT rrt FROM JamesRecipientRewrite
rrt WHERE rrt.user=:user AND rrt.domain=:domain"), 
+        @NamedQuery(name = "selectAllMappings", query = "SELECT rrt FROM JamesRecipientRewrite
rrt"),
         @NamedQuery(name = "deleteMapping", query = "DELETE FROM JamesRecipientRewrite rrt
WHERE rrt.user=:user AND rrt.domain=:domain AND rrt.targetAddress=:targetAddress"),
         @NamedQuery(name = "updateMapping", query = "UPDATE JamesRecipientRewrite rrt SET
rrt.targetAddress=:targetAddress WHERE rrt.user=:user AND rrt.domain=:domain") })
 @IdClass(JPARecipientRewrite.RecipientRewriteTableId.class)

Modified: james/server/trunk/jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java
URL: http://svn.apache.org/viewvc/james/server/trunk/jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java?rev=1153875&r1=1153874&r2=1153875&view=diff
==============================================================================
--- james/server/trunk/jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java (original)
+++ james/server/trunk/jpa/src/main/java/org/apache/james/user/jpa/model/JPAUser.java Thu
Aug  4 13:07:50 2011
@@ -33,8 +33,12 @@ import org.apache.james.user.api.model.U
 
 @Entity(name = "JamesUser")
 @Table(name = "JAMES_USER")
-@NamedQueries({ @NamedQuery(name = "findUserByName", query = "SELECT user FROM JamesUser
user WHERE user.name=:name"), @NamedQuery(name = "deleteUserByName", query = "DELETE FROM
JamesUser user WHERE user.name=:name"),
-        @NamedQuery(name = "containsUser", query = "SELECT COUNT(user) FROM JamesUser user
WHERE user.name=:name"), @NamedQuery(name = "countUsers", query = "SELECT COUNT(user) FROM
JamesUser user"), @NamedQuery(name = "listUserNames", query = "SELECT user.name FROM JamesUser
user") })
+@NamedQueries({ 
+    @NamedQuery(name = "findUserByName", query = "SELECT user FROM JamesUser user WHERE user.name=:name"),

+    @NamedQuery(name = "deleteUserByName", query = "DELETE FROM JamesUser user WHERE user.name=:name"),
+    @NamedQuery(name = "containsUser", query = "SELECT COUNT(user) FROM JamesUser user WHERE
user.name=:name"), 
+    @NamedQuery(name = "countUsers", query = "SELECT COUNT(user) FROM JamesUser user"), 
+    @NamedQuery(name = "listUserNames", query = "SELECT user.name FROM JamesUser user") })
 public class JPAUser implements User {
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message