← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17797: Removed unused method (which could not have worked)

 

------------------------------------------------------------
revno: 17797
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-12-25 15:26:57 +0100
message:
  Removed unused method (which could not have worked)
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.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-api/src/main/java/org/hisp/dhis/user/UserService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java	2014-12-23 10:59:45 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserService.java	2014-12-25 14:26:57 +0000
@@ -102,14 +102,6 @@
     Collection<User> getUsersWithoutOrganisationUnit();
 
     /**
-     * Returns a Collection of the Users which are associated with OrganisationUnits.
-     *
-     * @param units a Collection of the organization units.
-     * @return a Collection of Users.
-     */
-    Collection<User> getUsersByOrganisationUnits( Collection<OrganisationUnit> units );
-
-    /**
      * Returns a Collection of Users which are having given Phone number.
      *
      * @param phoneNumber

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java	2014-12-22 11:16:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/user/UserStore.java	2014-12-25 14:26:57 +0000
@@ -31,7 +31,6 @@
 import java.util.Collection;
 
 import org.hisp.dhis.common.GenericIdentifiableObjectStore;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 /**
  * @author Nguyen Hong Duc
@@ -50,16 +49,6 @@
     Collection<User> getUsersWithoutOrganisationUnit();
 
     /**
-     * Returns a Collection of the Users which are associated with
-     * OrganisationUnits.
-     * 
-     * @param orgunits a Collection of the organization units.
-     * 
-     * @return a Collection of Users.
-     */
-    Collection<User> getUsersByOrganisationUnits( Collection<OrganisationUnit> orgunits );
-
-    /**
      * Returns a Collection of Users which are having given Phone number.
      * 
      * @param phoneNumber

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2014-12-23 10:59:45 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/DefaultUserService.java	2014-12-25 14:26:57 +0000
@@ -330,12 +330,6 @@
     }
 
     @Override
-    public Collection<User> getUsersByOrganisationUnits( Collection<OrganisationUnit> units )
-    {
-        return userStore.getUsersByOrganisationUnits( units );
-    }
-
-    @Override
     public Collection<String> getUsernames( String query, Integer max )
     {
         return userCredentialsStore.getUsernames( query, max );

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java	2014-12-22 11:16:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java	2014-12-25 14:26:57 +0000
@@ -28,19 +28,17 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.Iterator;
+import java.util.List;
+
 import org.hibernate.Criteria;
 import org.hibernate.Query;
 import org.hibernate.criterion.Order;
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.user.User;
 import org.hisp.dhis.user.UserStore;
 
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
 /**
  * @author Nguyen Hong Duc
  */
@@ -108,15 +106,6 @@
 
     @Override
     @SuppressWarnings("unchecked")
-    public List<User> getUsersByOrganisationUnits( Collection<OrganisationUnit> orgunits )
-    {
-        String hql = "select distinct u from User u join u.organisationUnits o where o.id in (:ids)";
-
-        return sessionFactory.getCurrentSession().createQuery( hql ).setParameterList( "ids", orgunits ).list();
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
     public List<User> getUsersByName( String name )
     {
         Criteria criteria = getCriteria();