streams-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsulli...@apache.org
Subject svn commit: r1542382 - in /incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository: ActivityStreamsRepository.java mongo/MongoActivityStreamsRepository.java
Date Fri, 15 Nov 2013 20:09:16 GMT
Author: dsullivan
Date: Fri Nov 15 20:09:16 2013
New Revision: 1542382

URL: http://svn.apache.org/r1542382
Log:
adding more parameters to query

Modified:
    incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/ActivityStreamsRepository.java
    incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/mongo/MongoActivityStreamsRepository.java

Modified: incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/ActivityStreamsRepository.java
URL: http://svn.apache.org/viewvc/incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/ActivityStreamsRepository.java?rev=1542382&r1=1542381&r2=1542382&view=diff
==============================================================================
--- incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/ActivityStreamsRepository.java
(original)
+++ incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/ActivityStreamsRepository.java
Fri Nov 15 20:09:16 2013
@@ -10,6 +10,4 @@ import java.util.Set;
 public interface ActivityStreamsRepository {
     void save(ActivityStreamsEntry entry);
     List<ActivityStreamsEntry> getActivitiesForFilters(Set<String> filters, Date
lastUpdated);
-    void dropTable(String table);
-
 }

Modified: incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/mongo/MongoActivityStreamsRepository.java
URL: http://svn.apache.org/viewvc/incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/mongo/MongoActivityStreamsRepository.java?rev=1542382&r1=1542381&r2=1542382&view=diff
==============================================================================
--- incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/mongo/MongoActivityStreamsRepository.java
(original)
+++ incubator/streams/branches/webservice/streams-persistence/src/main/java/org/apache/streams/persistence/repository/mongo/MongoActivityStreamsRepository.java
Fri Nov 15 20:09:16 2013
@@ -37,11 +37,13 @@ public class MongoActivityStreamsReposit
 
     @Override
     public List<ActivityStreamsEntry> getActivitiesForFilters(Set<String> filters,
Date lastUpdated) {
-
-
+        List<String> filterList = new ArrayList<String>(filters);
         DBObject query = QueryBuilder.start("published").greaterThan(lastUpdated).and(QueryBuilder.start().or(
-                QueryBuilder.start("provider.displayName").in(new ArrayList<String>(filters)).get(),
-                QueryBuilder.start("actor.displayName").in(new ArrayList<String>(filters)).get()
+                QueryBuilder.start("provider.displayName").in(filterList).get(),
+                QueryBuilder.start("actor.displayName").in(filterList).get(),
+                QueryBuilder.start("object.displayName").in(filterList).get(),
+                QueryBuilder.start("target.displayName").in(filterList).get(),
+                QueryBuilder.start("verb").in(filterList).get()
         ).get()).get();
 
         DBCursor cursor = activityStreamsCollection.find(query);
@@ -55,8 +57,4 @@ public class MongoActivityStreamsReposit
 
         return results;
     }
-
-    @Override
-    public void dropTable(String table) {
-    }
 }



Mime
View raw message