← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15383: javadoc updates to tracker classes

 

------------------------------------------------------------
revno: 15383
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-05-23 17:22:02 +0200
message:
  javadoc updates to tracker classes
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.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/program/ProgramIndicatorService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramIndicatorService.java	2014-05-23 15:22:02 +0000
@@ -80,7 +80,7 @@
     /**
      * Returns a {@link ProgramIndicator} with a given short name.
      * 
-     * @param name the name of the ProgramIndicator to return.
+     * @param shortName the name of the ProgramIndicator to return.
      * @return the ProgramIndicator with the given short name, or null if no
      *         match.
      */

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java	2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java	2014-05-23 15:22:02 +0000
@@ -189,8 +189,8 @@
      * 
      * @param program Program
      * @param organisationUnit Organisation Unit
-     * @param min
-     * @param max
+     * @param min First result
+     * @param max Maximum results
      * 
      * @return ProgramInstance list
      */
@@ -202,11 +202,11 @@
      * for a certain period with result limited
      * 
      * @param program Program
-     * @param organisationUnit Organisation Unit
+     * @param orgunitIds Organisation Units
      * @param startDate The start date for retrieving on enrollment-date
      * @param endDate The end date for retrieving on enrollment-date
-     * @param min
-     * @param max
+     * @param min First result
+     * @param max Maximum results
      * 
      * @return ProgramInstance list
      */
@@ -218,7 +218,7 @@
      * registered in a certain orgunit by a program for a certain period
      * 
      * @param program Program
-     * @param organisationUnit Organisation Unit
+     * @param orgunitIds Organisation Units
      * @param startDate The start date for retrieving on enrollment-date
      * @param endDate The end date for retrieving on enrollment-date
      * 
@@ -251,7 +251,7 @@
      * Retrieve program instances with a certain status on a program and an
      * orgunit ids list for a period
      * 
-     * @param Status of program-instance, include STATUS_ACTIVE,
+     * @param status of program-instance, include STATUS_ACTIVE,
      *        STATUS_COMPLETED and STATUS_CANCELLED
      * @param program ProgramInstance
      * @param orgunitIds A list of orgunit ids
@@ -267,7 +267,7 @@
      * Get the number of program instances of a program which have a certain
      * status and an orgunit ids list for a period
      * 
-     * @param Status of program-instance, include STATUS_ACTIVE,
+     * @param status of program-instance, include STATUS_ACTIVE,
      *        STATUS_COMPLETED and STATUS_CANCELLED
      * @param program ProgramInstance
      * @param orgunitIds A list of orgunit ids

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java	2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java	2014-05-23 15:22:02 +0000
@@ -147,8 +147,8 @@
      * 
      * @param program Program
      * @param organisationUnit Organisation Unit
-     * @param min
-     * @param max
+     * @param min First result
+     * @param max Maximum results
      * 
      * @return ProgramInstance list
      */
@@ -159,11 +159,11 @@
      * for a certain period with result limited
      * 
      * @param program Program
-     * @param organisationUnit Organisation Unit
+     * @param orgunitIds Organisation Units
      * @param startDate The start date for retrieving on enrollment-date
      * @param endDate The end date for retrieving on enrollment-date
-     * @param min
-     * @param max
+     * @param min First result
+     * @param max Maximum results
      * 
      * @return ProgramInstance list
      */
@@ -175,9 +175,7 @@
      * 
      * @param program Program
      * @param organisationUnit Organisation Unit
-     * @param startDate The start date for retrieving on enrollment-date
-     * @param endDate The end date for retrieving on enrollment-date
-     * 
+     *
      * @return ProgramInstance list
      */
     int count( Program program, OrganisationUnit organisationUnit );
@@ -187,7 +185,7 @@
      * registered in a certain orgunit by a program for a certain period
      * 
      * @param program Program
-     * @param organisationUnit Organisation Unit
+     * @param orgunitIds Organisation Units
      * @param startDate The start date for retrieving on enrollment-date
      * @param endDate The end date for retrieving on enrollment-date
      * 
@@ -199,7 +197,7 @@
      * Get the number of program instances of a program which have a certain
      * status and an orgunit ids list for a period
      * 
-     * @param Status of program-instance, include STATUS_ACTIVE,
+     * @param status of program-instance, include STATUS_ACTIVE,
      *        STATUS_COMPLETED and STATUS_CANCELLED
      * @param program ProgramInstance
      * @param orgunitIds A list of orgunit ids
@@ -214,7 +212,7 @@
      * Retrieve program instances with a certain status on a program and an
      * orgunit ids list for a period
      * 
-     * @param Status of program-instance, include STATUS_ACTIVE,
+     * @param status of program-instance, include STATUS_ACTIVE,
      *        STATUS_COMPLETED and STATUS_CANCELLED
      * @param program ProgramInstance
      * @param orgunitIds A list of orgunit ids

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java	2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java	2014-05-23 15:22:02 +0000
@@ -188,8 +188,8 @@
      * Returns {@link Program} list with paging
      * 
      * @param name Keyword for searching by name
-     * @param min
-     * @param max
+     * @param min First result
+     * @param max Maximum results
      * @return a collection of all Program, or an empty collection if
      *         there are no Program.
      */
@@ -204,8 +204,8 @@
     /**
      * Returns {@link Program} list with paging
      * 
-     * @param min
-     * @param max
+     * @param min First result
+     * @param max Maximum results
      * @return a collection of all Program, or an empty collection if
      *         there are no Program.
      */

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java	2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java	2014-05-23 15:22:02 +0000
@@ -46,8 +46,6 @@
      * 
      * @param programStageDataElement The to ProgramStageDataElement add.
      * 
-     * @return A generated unique id of the added
-     *         {@link ProgramStageDataElement}.
      */
     void addProgramStageDataElement( ProgramStageDataElement programStageDataElement );
 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementStore.java	2014-05-16 15:26:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementStore.java	2014-05-23 15:22:02 +0000
@@ -28,13 +28,12 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import org.hisp.dhis.dataelement.DataElement;
+
 import java.util.Collection;
 
-import org.hisp.dhis.dataelement.DataElement;
-
 /**
  * @author Viet Nguyen
- * 
  * @version $Id$
  */
 public interface ProgramStageDataElementStore
@@ -43,24 +42,21 @@
 
     /**
      * Adds an {@link ProgramStageDataElement}
-     * 
+     *
      * @param programStageDataElement The to ProgramStageDataElement add.
-     * 
-     * @return A generated unique id of the added
-     *         {@link ProgramStageDataElement}.
      */
     void save( ProgramStageDataElement programStageDataElement );
 
     /**
      * Updates an {@link ProgramStageDataElement}.
-     * 
+     *
      * @param programStageDataElement the ProgramStageDataElement to update.
      */
     void update( ProgramStageDataElement programStageDataElement );
 
     /**
      * Deletes a {@link ProgramStageDataElement}.
-     * 
+     *
      * @param programStageDataElement the ProgramStageDataElement to delete.
      */
     void delete( ProgramStageDataElement programStageDataElement );
@@ -68,27 +64,25 @@
     /**
      * Retrieve ProgramStageDataElement list on a program stage and a data
      * element
-     * 
+     *
      * @param programStage ProgramStage
-     * @param dataElement DataElement
-     * 
+     * @param dataElement  DataElement
      * @return ProgramStageDataElement
      */
     ProgramStageDataElement get( ProgramStage programStage, DataElement dataElement );
 
     /**
      * Returns all {@link ProgramStageDataElement}
-     * 
+     *
      * @return a collection of all ProgramStageDataElement, or an empty
-     *         collection if there are no ProgramStageDataElements.
+     * collection if there are no ProgramStageDataElements.
      */
     Collection<ProgramStageDataElement> getAll();
 
     /**
      * Retrieve Data element list on a program stage
-     * 
+     *
      * @param programStage ProgramStage
-     * 
      * @return ProgramStageDataElement list
      */
     Collection<DataElement> getListDataElement( ProgramStage programStage );

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2014-05-21 08:04:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2014-05-23 15:22:02 +0000
@@ -28,11 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.i18n.I18nFormat;
@@ -40,6 +35,11 @@
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author Abyot Asalefew
  * @version $Id$
@@ -50,39 +50,37 @@
 
     /**
      * Adds an {@link TrackedEntityAttribute}
-     * 
-     * @param TrackedEntityAttribute The to TrackedEntityAttribute add.
-     * 
+     *
+     * @param programStageInstance The to TrackedEntityAttribute add.
      * @return A generated unique id of the added {@link TrackedEntityAttribute}.
      */
     int addProgramStageInstance( ProgramStageInstance programStageInstance );
 
     /**
      * Deletes a {@link TrackedEntityAttribute}.
-     * 
+     *
      * @param programStageInstance the TrackedEntityAttribute to delete.
      */
     void deleteProgramStageInstance( ProgramStageInstance programStageInstance );
 
     /**
      * Updates an {@link TrackedEntityAttribute}.
-     * 
-     * @param TrackedEntityAttribute the TrackedEntityAttribute to update.
+     *
+     * @param programStageInstance the TrackedEntityAttribute to update.
      */
     void updateProgramStageInstance( ProgramStageInstance programStageInstance );
 
     /**
      * Returns a {@link TrackedEntityAttribute}.
-     * 
+     *
      * @param id the id of the TrackedEntityAttribute to return.
-     * 
      * @return the TrackedEntityAttribute with the given id
      */
     ProgramStageInstance getProgramStageInstance( int id );
 
     /**
      * Returns the {@link TrackedEntityAttribute} with the given UID.
-     * 
+     *
      * @param uid the UID.
      * @return the TrackedEntityAttribute with the given UID, or null if no match.
      */
@@ -91,21 +89,19 @@
     /**
      * Retrieve an event on a program instance and a program stage. For
      * repeatable stage, the system returns the last event
-     * 
+     *
      * @param programInstance ProgramInstance
-     * @param programStage ProgramStage
-     * 
+     * @param programStage    ProgramStage
      * @return ProgramStageInstance
      */
     ProgramStageInstance getProgramStageInstance( ProgramInstance programInstance, ProgramStage programStage );
 
     /**
      * Retrieve an event list on program instance list with a certain status
-     * 
+     *
      * @param programInstances ProgramInstance list
-     * @param completed Optional flag to only get completed (<code>true</code> )
-     *        or uncompleted (<code>false</code>) instances.
-     * 
+     * @param completed        Optional flag to only get completed (<code>true</code> )
+     *                         or uncompleted (<code>false</code>) instances.
      * @return ProgramStageInstance list
      */
     Collection<ProgramStageInstance> getProgramStageInstances( Collection<ProgramInstance> programInstances,
@@ -113,56 +109,51 @@
 
     /**
      * Get statuses of events
-     * 
+     *
      * @param programStageInstances ProgramStageInstance list
-     * 
      * @return Map< ProgramStageInstance ID, status >
      */
     Map<Integer, Integer> statusProgramStageInstances( Collection<ProgramStageInstance> programStageInstances );
 
     /**
      * Get all events by TrackedEntityInstance, optionally filtering by completed.
-     * 
+     *
      * @param entityInstance TrackedEntityInstance
-     * 
-     * @param completed - optional flag to only get completed (
-     *        <code>true</code> ) or uncompleted (<code>false</code>) instances.
-     * 
+     * @param completed      - optional flag to only get completed (
+     *                       <code>true</code> ) or uncompleted (<code>false</code>) instances.
      * @return ProgramStageInstance list
      */
     List<ProgramStageInstance> getProgramStageInstances( TrackedEntityInstance entityInstance, boolean completed );
 
     /**
      * Retrieve scheduled list of entityInstances registered
-     * 
+     *
      * @return A SchedulingProgramObject list
      */
     Collection<SchedulingProgramObject> getSendMesssageEvents();
 
     /**
      * Get/export statistical report of a program
-     * 
-     * @param program Program needs to report
+     *
+     * @param program    Program needs to report
      * @param orgunitIds The ids of orgunits where the events happened
-     * @param after Optional date the instance should be on or after.
-     * @param before Optional date the instance should be on or before.
-     * @param i18n I18n object
-     * @param format I18nFormat
-     * 
+     * @param startDate  Optional date the instance should be on or after.
+     * @param endDate    Optional date the instance should be on or before.
+     * @param i18n       I18n object
+     * @param format     I18nFormat
      * @return Program report
      */
     Grid getStatisticalReport( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate,
         I18n i18n, I18nFormat format );
-    
+
     /**
      * Get/Export a report about the number of events of a program completed on
      * a orgunit
-     * 
-     * @param orgunitIds The ids of orgunits where the events happened
-     * @param program The program needs for reporting
-     * @param after Optional date the instance should be on or after.
-     * @param before Optional date the instance should be on or before.
-     * 
+     *
+     * @param orgunits  The ids of orgunits where the events happened
+     * @param program   The program needs for reporting
+     * @param startDate Optional date the instance should be on or after.
+     * @param endDate   Optional date the instance should be on or before.
      * @return Grid
      */
     Grid getCompletenessProgramStageInstance( Collection<Integer> orgunits, Program program, String startDate,
@@ -171,18 +162,18 @@
     /**
      * Complete an event. Besides, program template messages will be send if it
      * was defined to send when to complete this program
-     * 
-     * @param programInstance ProgramInstance
-     * @param format I18nFormat
+     *
+     * @param programStageInstance ProgramStageInstance
+     * @param format               I18nFormat
      */
     void completeProgramStageInstance( ProgramStageInstance programStageInstance, I18nFormat format );
 
     /**
      * Set report date and orgunit where an event happened for the event
-     * 
+     *
      * @param programStageInstance ProgramStageInstance
-     * @param executionDate Report date
-     * @param organisationUnit Orgunit where the event happens
+     * @param executionDate        Report date
+     * @param organisationUnit     Orgunit where the event happens
      */
     void setExecutionDate( ProgramStageInstance programStageInstance, Date executionDate,
         OrganisationUnit organisationUnit );
@@ -192,12 +183,11 @@
      * exist, So system has to create a program-instance and
      * program-stage-instance. The similar thing happens for single event with
      * registration.
-     * 
-     * @param entityInstance TrackedEntityInstance
-     * @param program Single event without registration
-     * @param executionDate Report date of the event
+     *
+     * @param entityInstance   TrackedEntityInstance
+     * @param program          Single event without registration
+     * @param executionDate    Report date of the event
      * @param organisationUnit Orgunit where the event happens
-     * 
      * @return ProgramStageInstance ProgramStageInstance object
      */
     ProgramStageInstance createProgramStageInstance( TrackedEntityInstance entityInstance, Program program, Date executionDate,

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2014-05-21 08:04:49 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2014-05-23 15:22:02 +0000
@@ -90,10 +90,10 @@
     /**
      * Get the number of events by completed status
      * 
-     * @param program Program
+     * @param programStage Program
      * @param orgunitIds The ids of orgunits where the events happened
-     * @param after Optional date the instance should be on or after.
-     * @param before Optional date the instance should be on or before.
+     * @param startDate Optional date the instance should be on or after.
+     * @param endDate Optional date the instance should be on or before.
      * @param completed Optional flag to only get completed (<code>true</code> )
      *        or uncompleted (<code>false</code>) instances.
      * @return A number
@@ -106,8 +106,8 @@
      * 
      * @param programStage ProgramStage
      * @param orgunitIds The ids of orgunits where the events happened
-     * @param after Optional date the instance should be on or after.
-     * @param before Optional date the instance should be on or before.
+     * @param startDate Optional date the instance should be on or after.
+     * @param endDate Optional date the instance should be on or before.
      * 
      * @return A number
      */
@@ -133,8 +133,8 @@
      * 
      * @param orgunitIds The ids of orgunits where the events happened
      * @param program The program needs for reporting
-     * @param after Optional date the instance should be on or after.
-     * @param before Optional date the instance should be on or before.
+     * @param startDate Optional date the instance should be on or after.
+     * @param endDate Optional date the instance should be on or before.
      * 
      * @return Grid
      */

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java	2014-05-23 14:58:07 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramTrackedEntityAttribute.java	2014-05-23 15:22:02 +0000
@@ -118,7 +118,7 @@
 
         final ProgramTrackedEntityAttribute other = (ProgramTrackedEntityAttribute) object;
 
-        return attribute != null && attribute.equals( other.getAttribute() ) && sortOrder == other.getSortOrder();
+        return attribute != null && attribute.equals( other.getAttribute() ) && sortOrder.equals( other.getSortOrder() );
     }
 
     // -------------------------------------------------------------------------