← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1797: Removed unused imports

 

------------------------------------------------------------
revno: 1797
committer: Lars Helge Oeverland <larshelge@xxxxxxxxx>
branch nick: trunk
timestamp: Wed 2010-04-21 14:14:08 +0200
message:
  Removed unused imports
modified:
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataprune/DefaultDataPruneService.java
  dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/DefaultDataValueAuditService.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationMappingStore.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogLevel.java
  dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogUtil.java
  dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.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-administration/src/main/java/org/hisp/dhis/dataprune/DefaultDataPruneService.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataprune/DefaultDataPruneService.java	2010-04-21 03:59:02 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataprune/DefaultDataPruneService.java	2010-04-21 12:14:08 +0000
@@ -28,8 +28,7 @@
  */
 
 import java.util.Set;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
 import org.hisp.dhis.datavalue.DataValueService;
 import org.hisp.dhis.hierarchy.HierarchyViolationException;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -44,8 +43,6 @@
 public class DefaultDataPruneService
     implements DataPruneService
 {
-    private static final Log log = LogFactory.getLog( DefaultDataPruneService.class );
-    
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
@@ -63,7 +60,7 @@
     {
         this.dataValueService = dataValueService;
     }
-    
+
     // -------------------------------------------------------------------------
     // DataPruneService implementation
     // -------------------------------------------------------------------------
@@ -76,29 +73,31 @@
             organisationUnit.setParent( null );
             organisationUnitService.updateOrganisationUnit( organisationUnit );
         }
-        
-        for(OrganisationUnit eachRoot : organisationUnitService.getRootOrganisationUnits())
+
+        for ( OrganisationUnit eachRoot : organisationUnitService.getRootOrganisationUnits() )
         {
-            if(!eachRoot.equals( organisationUnit ))
+            if ( !eachRoot.equals( organisationUnit ) )
             {
-                deleteABranch( eachRoot );
+                deleteBranch( eachRoot );
             }
         }
     }
-    
-    private void deleteABranch(OrganisationUnit organisationUnit) {
-        if(!organisationUnit.getChildren().isEmpty()) {
+
+    private void deleteBranch( OrganisationUnit organisationUnit )
+    {
+        if ( !organisationUnit.getChildren().isEmpty() )
+        {
             Set<OrganisationUnit> tmp = organisationUnit.getChildren();
             Object[] childrenAsArray = tmp.toArray();
-            
+
             for ( Object eachChild : childrenAsArray )
             {
-                deleteABranch( (OrganisationUnit)eachChild );
+                deleteBranch( (OrganisationUnit) eachChild );
             }
         }
-        
+
         dataValueService.deleteDataValuesBySource( organisationUnit );
-        
+
         try
         {
             organisationUnitService.deleteOrganisationUnit( organisationUnit );

=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java'
--- dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/test/java/org/hisp/dhis/dataintegrity/DataIntegrityServiceTest.java	2010-04-21 12:14:08 +0000
@@ -30,7 +30,6 @@
 import static junit.framework.Assert.assertEquals;
 import static junit.framework.Assert.assertTrue;
 
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Map;
 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/DefaultDataValueAuditService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/DefaultDataValueAuditService.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/DefaultDataValueAuditService.java	2010-04-21 12:14:08 +0000
@@ -29,8 +29,6 @@
 
 import java.util.Collection;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.source.Source;
 
@@ -42,8 +40,6 @@
 public class DefaultDataValueAuditService
     implements DataValueAuditService
 {
-    private static final Log log = LogFactory.getLog( DefaultDataValueAuditService.class );
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java	2010-04-21 12:14:08 +0000
@@ -42,13 +42,10 @@
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementCategoryOptionCombo;
 import org.hisp.dhis.datavalue.DataValue;
-import org.hisp.dhis.datavalue.DataValueAuditService;
-import org.hisp.dhis.datavalue.DataValueAuditStore;
 import org.hisp.dhis.datavalue.DataValueStore;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodStore;
 import org.hisp.dhis.source.Source;
-import org.springframework.transaction.annotation.Transactional;
 
 /**
  * @author Torgeir Lorange Ostby

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationMappingStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationMappingStore.java	2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/caseaggregation/hibernate/HibernateCaseAggregationMappingStore.java	2010-04-21 12:14:08 +0000
@@ -103,7 +103,7 @@
         Session session = sessionFactory.getCurrentSession();
         Query query = session.createQuery( sQuery );
         
-        Iterator  it = query.iterate(); 
+        Iterator<?>  it = query.iterate(); 
         int rs = 0;
         while( it.hasNext() )
         {
@@ -115,6 +115,7 @@
         return rs;
     }
 
+    @SuppressWarnings("unchecked")
     public List<PatientDataValue> executeMappingQueryForListPatientDataValue( String squery )
     {
         Session session = sessionFactory.getCurrentSession();

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java	2010-04-05 12:41:21 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientStore.java	2010-04-21 12:14:08 +0000
@@ -34,7 +34,6 @@
 import org.hibernate.Criteria;
 import org.hibernate.criterion.Conjunction;
 import org.hibernate.criterion.Order;
-import org.hibernate.criterion.Projection;
 import org.hibernate.criterion.Projections;
 import org.hibernate.criterion.Restrictions;
 import org.hisp.dhis.hibernate.HibernateGenericStore;

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogLevel.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogLevel.java	2010-04-19 09:54:45 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogLevel.java	2010-04-21 12:14:08 +0000
@@ -2,8 +2,8 @@
 
 import org.apache.log4j.Level;
 
-
-public class AuditLogLevel extends Level
+public class AuditLogLevel
+    extends Level
 {
     /**
      * 
@@ -15,78 +15,92 @@
      * 
      */
     public static final int AUDIT_TRAIL_INT = INFO_INT + 10;
-   
+
     /**
      * {@link Level} representing my log level
      */
-    public static final Level AUDIT_TRAIL = new AuditLogLevel(AUDIT_TRAIL_INT, "AUDIT_TRAIL",7);
+    public static final Level AUDIT_TRAIL = new AuditLogLevel( AUDIT_TRAIL_INT, "AUDIT_TRAIL", 7 );
 
     /**
      * Constructor
-     *
+     * 
      * @param arg0
      * @param arg1
      * @param arg2
      */
-    protected AuditLogLevel(int arg0, String arg1, int arg2) {
-        super(arg0, arg1, arg2);
+    protected AuditLogLevel( int arg0, String arg1, int arg2 )
+    {
+        super( arg0, arg1, arg2 );
 
     }
-   
+
     /**
-     * Checks whether <code>sArg</code> is "AUDIT_TRAIL" level. If yes then returns {@link AuditLogLevel#AUDIT_TRAIL},
-     * else calls {@link AuditLogLevel#toLevel(String, Level)} passing it {@link Level#DEBUG} as the defaultLevel
-     *
+     * Checks whether <code>sArg</code> is "AUDIT_TRAIL" level. If yes then
+     * returns {@link AuditLogLevel#AUDIT_TRAIL}, else calls
+     * {@link AuditLogLevel#toLevel(String, Level)} passing it
+     * {@link Level#DEBUG} as the defaultLevel
+     * 
      * @see Level#toLevel(java.lang.String)
      * @see Level#toLevel(java.lang.String, org.apache.log4j.Level)
-     *
+     * 
      */
-    public static Level toLevel(String sArg) {
-        if (sArg != null && sArg.toUpperCase().equals("AUDIT_TRAIL")) {
+    public static Level toLevel( String sArg )
+    {
+        if ( sArg != null && sArg.toUpperCase().equals( "AUDIT_TRAIL" ) )
+        {
             return AUDIT_TRAIL;
         }
-        return (Level) toLevel(sArg, Level.DEBUG);
+        return (Level) toLevel( sArg, Level.DEBUG );
     }
 
     /**
-     * Checks whether <code>val</code> is {@link AuditLogLevel#AUDIT_TRAIL_INT}. If yes then returns {@link AuditLogLevel#AUDIT_TRAIL},
-     * else calls {@link AuditLogLevel#toLevel(int, Level)} passing it {@link Level#DEBUG} as the defaultLevel
-     *
+     * Checks whether <code>val</code> is {@link AuditLogLevel#AUDIT_TRAIL_INT}.
+     * If yes then returns {@link AuditLogLevel#AUDIT_TRAIL}, else calls
+     * {@link AuditLogLevel#toLevel(int, Level)} passing it {@link Level#DEBUG}
+     * as the defaultLevel
+     * 
      * @see Level#toLevel(int)
      * @see Level#toLevel(int, org.apache.log4j.Level)
-     *
+     * 
      */
-    public static Level toLevel(int val) {
-        if (val == AUDIT_TRAIL_INT) {
+    public static Level toLevel( int val )
+    {
+        if ( val == AUDIT_TRAIL_INT )
+        {
             return AUDIT_TRAIL;
         }
-        return (Level) toLevel(val, Level.DEBUG);
+        return (Level) toLevel( val, Level.DEBUG );
     }
 
     /**
-     * Checks whether <code>val</code> is {@link AuditLogLevel#AUDIT_TRAIL_INT}. If yes then returns {@link AuditLogLevel#AUDIT_TRAIL},
-     * else calls {@link Level#toLevel(int, org.apache.log4j.Level)}
-     *
+     * Checks whether <code>val</code> is {@link AuditLogLevel#AUDIT_TRAIL_INT}.
+     * If yes then returns {@link AuditLogLevel#AUDIT_TRAIL}, else calls
+     * {@link Level#toLevel(int, org.apache.log4j.Level)}
+     * 
      * @see Level#toLevel(int, org.apache.log4j.Level)
      */
-    public static Level toLevel(int val, Level defaultLevel) {
-        if (val == AUDIT_TRAIL_INT) {
+    public static Level toLevel( int val, Level defaultLevel )
+    {
+        if ( val == AUDIT_TRAIL_INT )
+        {
             return AUDIT_TRAIL;
         }
-        return Level.toLevel(val,defaultLevel);
+        return Level.toLevel( val, defaultLevel );
     }
 
     /**
-     * Checks whether <code>sArg</code> is "AUDIT_TRAIL" level. If yes then returns {@link AuditLogLevel#AUDIT_TRAIL},
-     * else calls {@link Level#toLevel(java.lang.String, org.apache.log4j.Level)}
-     *
+     * Checks whether <code>sArg</code> is "AUDIT_TRAIL" level. If yes then
+     * returns {@link AuditLogLevel#AUDIT_TRAIL}, else calls
+     * {@link Level#toLevel(java.lang.String, org.apache.log4j.Level)}
+     * 
      * @see Level#toLevel(java.lang.String, org.apache.log4j.Level)
      */
-    public static Level toLevel(String sArg, Level defaultLevel) {                 
-    if(sArg != null && sArg.toUpperCase().equals("AUDIT_TRAIL")) {
-        return AUDIT_TRAIL;
+    public static Level toLevel( String sArg, Level defaultLevel )
+    {
+        if ( sArg != null && sArg.toUpperCase().equals( "AUDIT_TRAIL" ) )
+        {
+            return AUDIT_TRAIL;
+        }
+        return Level.toLevel( sArg, defaultLevel );
     }
-    return Level.toLevel(sArg,defaultLevel);
- }
-  
 }

=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogUtil.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogUtil.java	2010-04-19 09:54:45 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AuditLogUtil.java	2010-04-21 12:14:08 +0000
@@ -2,7 +2,6 @@
 
 public class AuditLogUtil
 {
-
     public static final String ACTION_ADD = "added";
     
     public static final String ACTION_EDIT = "edited";

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java	2010-04-05 12:33:38 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/SearchPatientAction.java	2010-04-21 12:14:08 +0000
@@ -40,7 +40,6 @@
 import org.hisp.dhis.patient.paging.PagingUtil;
 import org.hisp.dhis.patient.paging.RequestUtil;
 import org.hisp.dhis.patient.state.SelectedStateManager;
-import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
 import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
 
 import com.opensymphony.xwork2.Action;
@@ -52,7 +51,6 @@
 public class SearchPatientAction
     implements Action
 {
-
     // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------