portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r788993 - /portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
Date Sat, 27 Jun 2009 16:16:11 GMT
Author: rwatler
Date: Sat Jun 27 16:16:11 2009
New Revision: 788993

URL: http://svn.apache.org/viewvc?rev=788993&view=rev
Log:
correct association queries to include type criteria on to/from principals

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java?rev=788993&r1=788992&r2=788993&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/JetspeedSecurityPersistenceManager.java
Sat Jun 27 16:16:11 2009
@@ -146,6 +146,7 @@
         Criteria criteria = new Criteria();
         criteria.addEqualTo("associationsTo.associationName", associationName);
         criteria.addEqualTo("associationsTo.from.name", principalFromName);
+        criteria.addEqualTo("associationsTo.from.type", from.getName());
         criteria.addEqualTo("type", to.getName());
         criteria.addEqualTo("associationsTo.from.domainId", fromSecurityDomain);
         criteria.addEqualTo("domainId", toSecurityDomain);
@@ -165,6 +166,7 @@
         criteria.addEqualTo("associationsFrom.associationName", associationName);
         criteria.addEqualTo("associationsFrom.to.name", principalToName);
         criteria.addEqualTo("type", from.getName());
+        criteria.addEqualTo("associationsFrom.to.type", to.getName());
         criteria.addEqualTo("associationsFrom.to.domainId", toSecurityDomain);
         criteria.addEqualTo("domainId", fromSecurityDomain);
         Query query = QueryFactory.newQuery(PersistentJetspeedPrincipal.class, criteria);
@@ -182,6 +184,7 @@
         Criteria criteria = new Criteria();
         criteria.addEqualTo("associationsTo.associationName", associationName);
         criteria.addEqualTo("associationsTo.from.id", principalFromId);
+        criteria.addEqualTo("associationsTo.from.type", from.getName());
         criteria.addEqualTo("type", to.getName());
         criteria.addEqualTo("associationsTo.from.domainId", fromSecurityDomain);
         criteria.addEqualTo("domainId", toSecurityDomain);
@@ -201,6 +204,7 @@
         criteria.addEqualTo("associationsFrom.associationName", associationName);
         criteria.addEqualTo("associationsFrom.to.id", principalToId);
         criteria.addEqualTo("type", from.getName());
+        criteria.addEqualTo("associationsFrom.to.type", to.getName());
         criteria.addEqualTo("associationsFrom.to.domainId", toSecurityDomain);
         criteria.addEqualTo("domainId", fromSecurityDomain);
         Query query = QueryFactory.newQuery(PersistentJetspeedPrincipal.class, criteria);
@@ -218,6 +222,7 @@
         Criteria criteria = new Criteria();
         criteria.addEqualTo("associationsTo.associationName", associationName);
         criteria.addEqualTo("associationsTo.from.name", principalFromName);
+        criteria.addEqualTo("associationsTo.from.type", from.getName());
         criteria.addEqualTo("type", to.getName());
         criteria.addEqualTo("associationsTo.from.domainId", fromSecurityDomain);
         criteria.addEqualTo("domainId", toSecurityDomain);
@@ -242,6 +247,7 @@
         Criteria criteria = new Criteria();
         criteria.addEqualTo("associationsTo.associationName", associationName);
         criteria.addEqualTo("associationsTo.from.id", principalFromId);
+        criteria.addEqualTo("associationsTo.from.type", from.getName());
         criteria.addEqualTo("type", to.getName());
         criteria.addEqualTo("associationsTo.from.domainId", fromSecurityDomain);
         criteria.addEqualTo("domainId", toSecurityDomain);
@@ -267,6 +273,7 @@
         criteria.addEqualTo("associationsFrom.associationName", associationName);
         criteria.addEqualTo("associationsFrom.to.name", principalToName);
         criteria.addEqualTo("type", from.getName());
+        criteria.addEqualTo("associationsFrom.to.type", to.getName());
         criteria.addEqualTo("associationsFrom.to.domainId", toSecurityDomain);
         criteria.addEqualTo("domainId", fromSecurityDomain);
         ReportQueryByCriteria query = QueryFactory.newReportQuery(PersistentJetspeedPrincipal.class,
criteria);
@@ -291,6 +298,7 @@
         criteria.addEqualTo("associationsFrom.associationName", associationName);
         criteria.addEqualTo("associationsFrom.to.id", principalToId);
         criteria.addEqualTo("type", from.getName());
+        criteria.addEqualTo("associationsFrom.to.type", to.getName());
         criteria.addEqualTo("associationsFrom.to.domainId", toSecurityDomain);
         criteria.addEqualTo("domainId", fromSecurityDomain);
         ReportQueryByCriteria query = QueryFactory.newReportQuery(PersistentJetspeedPrincipal.class,
criteria);



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


Mime
View raw message