← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21085: Minor

 

------------------------------------------------------------
revno: 21085
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-11-17 12:48:47 +0100
message:
  Minor
modified:
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/CriteriaQueryEngine.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/InMemoryQueryEngine.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/CriteriaQueryEngine.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/CriteriaQueryEngine.java	2015-11-16 02:27:15 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/CriteriaQueryEngine.java	2015-11-17 11:48:47 +0000
@@ -28,8 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 import org.hibernate.Criteria;
 import org.hibernate.criterion.Criterion;
 import org.hibernate.criterion.Projections;
@@ -40,22 +44,15 @@
 import org.hisp.dhis.schema.Schema;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 /**
  * Implementation of QueryEngine that uses Hibernate Criteria and
  * supports idObjects only.
  *
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
-public class CriteriaQueryEngine<T extends IdentifiableObject> implements QueryEngine
+public class CriteriaQueryEngine<T extends IdentifiableObject> 
+    implements QueryEngine<T>
 {
-    private static final Log log = LogFactory.getLog( CriteriaQueryEngine.class );
-
     @Autowired
     private final List<HibernateGenericStore<T>> hibernateGenericStores = new ArrayList<>();
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.java	2015-11-12 04:47:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/DefaultQueryService.java	2015-11-17 11:48:47 +0000
@@ -40,7 +40,8 @@
  *
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
-public class DefaultQueryService implements QueryService
+public class DefaultQueryService 
+    implements QueryService
 {
     private static final Log log = LogFactory.getLog( DefaultQueryService.class );
 
@@ -54,7 +55,6 @@
     private InMemoryQueryEngine<? extends IdentifiableObject> inMemoryQueryEngine;
 
     @Override
-    @SuppressWarnings( "unchecked" )
     public List<? extends IdentifiableObject> query( Query query )
     {
         return queryObjects( query );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/InMemoryQueryEngine.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/InMemoryQueryEngine.java	2015-11-12 04:47:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/InMemoryQueryEngine.java	2015-11-17 11:48:47 +0000
@@ -29,8 +29,6 @@
  */
 
 import com.google.common.collect.Lists;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.IdentifiableObject;
 import org.hisp.dhis.common.PagerUtils;
 import org.hisp.dhis.schema.Property;
@@ -47,10 +45,9 @@
 /**
  * @author Morten Olav Hansen <mortenoh@xxxxxxxxx>
  */
-public class InMemoryQueryEngine<T extends IdentifiableObject> implements QueryEngine
+public class InMemoryQueryEngine<T extends IdentifiableObject> 
+    implements QueryEngine
 {
-    private static final Log log = LogFactory.getLog( InMemoryQueryEngine.class );
-
     @Autowired
     private SchemaService schemaService;