openmeetings-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From solo...@apache.org
Subject svn commit: r1442543 - in /openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans: basic/Server.java domain/Organisation.java domain/Organisation_Users.java
Date Tue, 05 Feb 2013 11:19:37 GMT
Author: solomax
Date: Tue Feb  5 11:19:36 2013
New Revision: 1442543

URL: http://svn.apache.org/viewvc?rev=1442543&view=rev
Log:
Queries are fixed after renaming

Modified:
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Server.java
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation.java
    openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation_Users.java

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Server.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Server.java?rev=1442543&r1=1442542&r2=1442543&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Server.java
(original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/basic/Server.java
Tue Feb  5 11:19:36 2013
@@ -47,8 +47,8 @@ import org.simpleframework.xml.Root;
 		@NamedQuery(name = "getServerById", query = "SELECT s FROM Server s LEFT JOIN FETCH s.insertedby
LEFT JOIN FETCH s.updatedby WHERE s.deleted = false AND s.id = :id"),
 		@NamedQuery(name = "getServerByName", query = "SELECT s FROM Server s WHERE s.deleted =
false AND s.name LIKE :name"),
 		@NamedQuery(name = "getServerByAddress", query = "SELECT s FROM Server s WHERE s.deleted
= false AND s.address LIKE :address"),
-		@NamedQuery(name = "getServersWithNoUsers", query = "SELECT s FROM Server s WHERE s.deleted
= false AND s.id NOT IN (SELECT u.server.id FROM Users u where u.server.id IS NOT NULL)"),
-		@NamedQuery(name = "getServerWithMinimumUsers", query = "SELECT s.id, COUNT(u) AS cnt FROM
Users u JOIN u.server s WHERE s.deleted = false GROUP BY s.id ORDER BY cnt"),
+		@NamedQuery(name = "getServersWithNoUsers", query = "SELECT s FROM Server s WHERE s.deleted
= false AND s.id NOT IN (SELECT u.server.id FROM User u where u.server.id IS NOT NULL)"),
+		@NamedQuery(name = "getServerWithMinimumUsers", query = "SELECT s.id, COUNT(u) AS cnt FROM
User u JOIN u.server s WHERE s.deleted = false GROUP BY s.id ORDER BY cnt"),
 		@NamedQuery(name = "getActiveServers", query = "SELECT s FROM Server s WHERE s.deleted
= false AND s.active = true") //
 })
 @Table(name = "server")

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation.java?rev=1442543&r1=1442542&r2=1442543&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation.java
(original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation.java
Tue Feb  5 11:19:36 2013
@@ -41,7 +41,7 @@ import org.simpleframework.xml.Root;
 	, @NamedQuery(name="getAnyOrganisationById",
 		query="SELECT c FROM Organisation AS c WHERE c.organisation_id = :organisation_id")
 	, @NamedQuery(name="getOrganisationsByUserId",
-		query="SELECT ou.organisation FROM Users u, IN(u.organisation_users) ou WHERE u.deleted
= false AND u.user_id = :user_id")
+		query="SELECT ou.organisation FROM User u, IN(u.organisation_users) ou WHERE u.deleted
= false AND u.user_id = :user_id")
 	, @NamedQuery(name="getNondeletedOrganisations", query="SELECT u FROM Organisation u WHERE
u.deleted = false")
 	, @NamedQuery(name="countOrganisations", query="SELECT COUNT(c) FROM Organisation AS c WHERE
c.deleted = false")
 })

Modified: openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation_Users.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation_Users.java?rev=1442543&r1=1442542&r2=1442543&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation_Users.java
(original)
+++ openmeetings/trunk/singlewebapp/src/org/apache/openmeetings/persistence/beans/domain/Organisation_Users.java
Tue Feb  5 11:19:36 2013
@@ -41,7 +41,7 @@ import org.simpleframework.xml.Root;
 @Entity
 @NamedQueries({
 	@NamedQuery(name="getOrganisation_UserByUserAndOrganisation",
-		query="SELECT ou FROM Users u, IN(u.organisation_users) ou WHERE u.deleted = false AND
u.user_id = :user_id AND ou.organisation.organisation_id = :organisation_id")
+		query="SELECT ou FROM User u, IN(u.organisation_users) ou WHERE u.deleted = false AND u.user_id
= :user_id AND ou.organisation.organisation_id = :organisation_id")
 	, @NamedQuery(name="deleteUsersFromOrganisation", query="DELETE FROM Organisation_Users
c WHERE c.organisation.organisation_id = :id")
 	, @NamedQuery(name="countOrganisationUsers", query="SELECT COUNT(c) FROM Organisation_Users
c WHERE c.organisation.organisation_id = :id")
 	, @NamedQuery(name="getOrganisationUsersById", query="SELECT c FROM Organisation_Users c
WHERE c.organisation_users_id = :id")



Mime
View raw message