← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 15293: Remove unused methods in tracker module.

 

------------------------------------------------------------
revno: 15293
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-05-16 23:26:10 +0800
message:
  Remove unused methods in tracker module.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpressionService.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/ProgramStageSectionService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeGroupService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAuditService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentitycomment/TrackedEntityCommentService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramExpressionService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageDataElementService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageSectionService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageDataElementStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/RelationshipDeletionHandler.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/hibernate/HibernateRelationshipStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeGroupService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAuditService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityAttributeStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentityattributevalue/DefaultTrackedEntityAttributeValueService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentityattributevalue/hibernate/HibernateTrackedEntityAttributeValueStore.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentitycomment/DefaultTrackedEntityCommentService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentitydatavalue/DefaultTrackedEntityDataValueService.java
  dhis-2/dhis-services/dhis-service-tracker/src/main/resources/META-INF/dhis/beans.xml
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramExpressionServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageDataElementServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageDataElementStoreTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageInstanceServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageInstanceStoreTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageSectionServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramValidationServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipStoreTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStoreTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAuditServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStoreTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueStoreTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitycomment/TrackedEntityCommentServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueServiceTest.java
  dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueStoreTest.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/ProgramExpressionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpressionService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramExpressionService.java	2014-05-16 15:26:10 +0000
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
 import java.util.Map;
 
 import org.hisp.dhis.dataelement.DataElement;
@@ -87,14 +86,6 @@
     ProgramExpression getProgramExpression( int id );
 
     /**
-     * Returns all {@link ProgramExpression}
-     * 
-     * @return a collection of all ProgramExpression, or an empty collection if
-     *         there are no ProgramExpressions.
-     */
-    Collection<ProgramExpression> getAllProgramExpressions();
-
-    /**
      * Get value of program expression
      * 
      * @param programExpression {@link ProgramExpression}

=== 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-03-28 11:28:37 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceService.java	2014-05-16 15:26:10 +0000
@@ -34,9 +34,7 @@
 
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.message.MessageConversation;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.sms.outbound.OutboundSms;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 
 /**
@@ -86,25 +84,7 @@
      * @return the ProgramInstance with the given UID, or null if no match.
      */
     ProgramInstance getProgramInstance( String uid );
-
-    /**
-     * Returns all {@link ProgramInstance}.
-     * 
-     * @return a collection of all ProgramInstance, or an empty collection if
-     *         there are no ProgramInstances.
-     */
-    Collection<ProgramInstance> getAllProgramInstances();
-
-    /**
-     * Retrieve program instances by status
-     * 
-     * @param status Status of program-instance, include STATUS_ACTIVE,
-     *        STATUS_COMPLETED and STATUS_CANCELLED
-     * 
-     * @return ProgramInstance list
-     */
-    Collection<ProgramInstance> getProgramInstances( Integer status );
-
+    
     /**
      * Retrieve program instances on a program
      * 
@@ -219,20 +199,6 @@
 
     /**
      * Retrieve program instances with active status on an orgunit by a program
-     * in a certain period
-     * 
-     * @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
-     */
-    Collection<ProgramInstance> getProgramInstances( Program program, OrganisationUnit organisationUnit,
-        Date startDate, Date endDate );
-
-    /**
-     * Retrieve program instances with active status on an orgunit by a program
      * for a certain period with result limited
      * 
      * @param program Program
@@ -322,42 +288,6 @@
     Collection<SchedulingProgramObject> getScheduleMesssages();
 
     /**
-     * Send messages as SMS defined for a program
-     * 
-     * @param programInstance ProgramInstance
-     * @param status The time to send message, send when a person enrolled an
-     *        program or complete a program or send by scheduled days
-     * 
-     * @return OutboundSms list
-     */
-    Collection<OutboundSms> sendMessages( ProgramInstance programInstance, int status );
-
-    /**
-     * Send messages defined as DHIS messages for a program
-     * 
-     * @param programInstance ProgramInstance
-     * @param status The time to send message, send when a person enrolled an
-     *        program or complete a program or send by scheduled days
-     * 
-     * @return MessageConversation list
-     */
-    Collection<MessageConversation> sendMessageConversations( ProgramInstance programInstance, int status );
-
-    /**
-     * Enroll a TrackedEntityInstance into a program
-     * 
-     * @param entityInstance TrackedEntityInstance uid.
-     * @param program Program uid.
-     * @param enrollmentDate The date of enrollment
-     * @param dateOfIncident The date of incident
-     * @param orgunit Organisation Unit uid.
-     * 
-     * @return ProgramInsance
-     */
-    ProgramInstance enrollTrackedEntityInstance( String entityInstance, String program, 
-        Date enrollmentDate, Date dateOfIncident, String organisationUnit );
-    
-    /**
      * Enroll a TrackedEntityInstance into a program. Must be run inside a transaction.
      * 
      * @param entityInstance TrackedEntityInstance

=== 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-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramInstanceStore.java	2014-05-16 15:26:10 +0000
@@ -45,16 +45,6 @@
     String ID = ProgramInstanceStore.class.getName();
 
     /**
-     * Retrieve program instances by status
-     * 
-     * @param status Status of program-instance, include STATUS_ACTIVE,
-     *        STATUS_COMPLETED and STATUS_CANCELLED
-     * 
-     * @return ProgramInstance list
-     */
-    Collection<ProgramInstance> getByStatus( Integer status );
-
-    /**
      * Retrieve program instances on a program
      * 
      * @param program Program
@@ -166,19 +156,6 @@
 
     /**
      * Retrieve program instances with active status on an orgunit by a program
-     * in a certain period
-     * 
-     * @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
-     */
-    Collection<ProgramInstance> get( Program program, OrganisationUnit organisationUnit, Date startDate, Date endDate );
-
-    /**
-     * Retrieve program instances with active status on an orgunit by a program
      * for a certain period with result limited
      * 
      * @param program Program

=== 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-04-15 14:30:00 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramService.java	2014-05-16 15:26:10 +0000
@@ -161,19 +161,6 @@
     Program getProgram( String uid );
 
     /**
-     * Get {@link Program} which are displayed on all {@link OrganisationUnit}
-     * for searching or enrolling a person
-     * 
-     * @param displayOnAllOrgunit Optional flag to specify programs can
-     *        displayed for searching or enrolling (<code>true</code> ) or
-     *        cannot be used on the orgunit (<code>false</code>) instances.
-     * @param orgunit {@link OrganisationUnit}
-     * 
-     * @return Program list
-     */
-    Collection<Program> getProgramsByDisplayOnAllOrgunit( boolean displayOnAllOrgunit, OrganisationUnit orgunit );
-
-    /**
      * Get {@link Program} belong to an orgunit by the current user
      * 
      * @param organisationUnit {@link OrganisationUnit}
@@ -206,7 +193,7 @@
      * @return a collection of all Program, or an empty collection if
      *         there are no Program.
      */
-    Collection<? extends Program> getProgramBetweenByName( String name, int min, int max );
+    Collection<Program> getProgramBetweenByName( String name, int min, int max );
 
     /**
      * Returns The number of all Program available

=== 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-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementService.java	2014-05-16 15:26:10 +0000
@@ -85,15 +85,6 @@
     Collection<ProgramStageDataElement> getAllProgramStageDataElements();
 
     /**
-     * Retrieve ProgramStageDataElement list on a program stage
-     * 
-     * @param programStage ProgramStage
-     * 
-     * @return ProgramStageDataElement list
-     */
-    Collection<ProgramStageDataElement> get( ProgramStage programStage );
-
-    /**
      * Retrieve Data element list on a program stage
      * 
      * @param programStage ProgramStage

=== 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-13 12:54:58 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageDataElementStore.java	2014-05-16 15:26:10 +0000
@@ -85,15 +85,6 @@
     Collection<ProgramStageDataElement> getAll();
 
     /**
-     * Retrieve ProgramStageDataElement list on a program stage
-     * 
-     * @param programStage ProgramStage
-     * 
-     * @return ProgramStageDataElement list
-     */
-    Collection<ProgramStageDataElement> get( ProgramStage programStage );
-
-    /**
      * Retrieve Data element list on a program stage
      * 
      * @param 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-10 11:40:24 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceService.java	2014-05-16 15:26:10 +0000
@@ -36,9 +36,7 @@
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.i18n.I18n;
 import org.hisp.dhis.i18n.I18nFormat;
-import org.hisp.dhis.message.MessageConversation;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.sms.outbound.OutboundSms;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 
@@ -102,17 +100,6 @@
     ProgramStageInstance getProgramStageInstance( ProgramInstance programInstance, ProgramStage programStage );
 
     /**
-     * Retrieve an event list on a program instance and a program stage
-     * 
-     * @param programInstance ProgramInstance
-     * @param programStage ProgramStage
-     * 
-     * @return ProgramStageInstance
-     */
-    Collection<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance,
-        ProgramStage programStage );
-
-    /**
      * Retrieve an event list on program instance list with a certain status
      * 
      * @param programInstances ProgramInstance list
@@ -146,14 +133,6 @@
     List<ProgramStageInstance> getProgramStageInstances( TrackedEntityInstance entityInstance, Boolean completed );
 
     /**
-     * Create relationship between an OutboundSms with many events.
-     * 
-     * @param programStageInstances Event list
-     * @param outboundSms OutboundSms object
-     */
-    void updateProgramStageInstances( Collection<Integer> programStageInstances, OutboundSms outboundSms );
-
-    /**
      * Retrieve scheduled list of entityInstances registered
      * 
      * @return A SchedulingProgramObject list
@@ -174,77 +153,7 @@
      */
     Grid getStatisticalReport( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate,
         I18n i18n, I18nFormat format );
-
-    /**
-     * Get details of events which meets the criteria in statistical report
-     * 
-     * @param programStage The program stage needs to get details
-     * @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 status The status of event. There are four statuses for events,
-     *        includes COMPLETED_STATUS, VISITED_STATUS, FUTURE_VISIT_STATUS,
-     *        LATE_VISIT_STATUS
-     * @param min
-     * @param max
-     */
-    List<ProgramStageInstance> getStatisticalProgramStageDetailsReport( ProgramStage programStage,
-        Collection<Integer> orgunitIds, Date startDate, Date endDate, int status, Integer max, Integer min );
-
-    /**
-     * Get events of a program by report date
-     * 
-     * @param program 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 completed optional flag to only get completed (<code>true</code> )
-     *        or uncompleted (<code>false</code>) or all (<code>null</code>)
-     *        instances.
-     * 
-     * @return ProgramStageInstance list
-     */
-    Collection<ProgramStageInstance> getProgramStageInstances( Program program, Collection<Integer> orgunitIds,
-        Date startDate, Date endDate, Boolean completed );
-
-    /**
-     * Get the number of over due events of a program stage in a certain period
-     * 
-     * @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.
-     * 
-     * @return A number
-     */
-    int getOverDueEventCount( ProgramStage programStage, Collection<Integer> orgunitIds, Date startDate, Date endDate );
-
-    /**
-     * Get the number of program instances completed, includes all program stage
-     * instances were completed
-     * 
-     * @param program 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 status The status of event. There are four statuses for events,
-     *        includes COMPLETED_STATUS, VISITED_STATUS, FUTURE_VISIT_STATUS,
-     *        LATE_VISIT_STATUS
-     * @return A number
-     */
-    int averageNumberCompletedProgramInstance( Program program, Collection<Integer> orgunitIds, Date startDate,
-        Date endDate, int status );
-
-    /**
-     * Get ids of orgunits where events happened in a period
-     * 
-     * @param startDate The start date for retrieving on report date
-     * @param endDate The end date for retrieving on report date
-     * 
-     * @return The ids of orgunits
-     */
-    Collection<Integer> getOrganisationUnitIds( Date startDate, Date endDate );
-
+    
     /**
      * Get/Export a report about the number of events of a program completed on
      * a orgunit
@@ -260,31 +169,6 @@
         String endDate, I18n i18n );
 
     /**
-     * Send messages as SMS defined for a program-stage
-     * 
-     * @param programStageInstance ProgramStageInstance
-     * @param status The time to send message, send when to complete an event or
-     *        send by scheduled days
-     * @param format I18nFormat object
-     * 
-     * @return OutboundSms list
-     */
-    Collection<OutboundSms> sendMessages( ProgramStageInstance programStageInstance, int status, I18nFormat format );
-
-    /**
-     * Send messages defined as DHIS messages for a program-stage
-     * 
-     * @param programStageInstance ProgramStageInstance
-     * @param status The time to send message, send when a person enrolled an
-     *        program or complete a program or send by scheduled days
-     * @param format I18nFormat object
-     * 
-     * @return MessageConversation list
-     */
-    Collection<MessageConversation> sendMessageConversations( ProgramStageInstance programStageInstance, int status,
-        I18nFormat format );
-
-    /**
      * Complete an event. Besides, program template messages will be send if it
      * was defined to send when to complete this program
      * 

=== 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-16 13:43:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageInstanceStore.java	2014-05-16 15:26:10 +0000
@@ -35,7 +35,6 @@
 import org.hisp.dhis.common.GenericIdentifiableObjectStore;
 import org.hisp.dhis.common.Grid;
 import org.hisp.dhis.i18n.I18n;
-import org.hisp.dhis.sms.outbound.OutboundSms;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 
 /**
@@ -59,16 +58,6 @@
     ProgramStageInstance get( ProgramInstance programInstance, ProgramStage programStage );
 
     /**
-     * Retrieve an event list on a program instance and a program stage
-     * 
-     * @param programInstance ProgramInstance
-     * @param programStage ProgramStage
-     * 
-     * @return ProgramStageInstance
-     */
-    Collection<ProgramStageInstance> getAll( ProgramInstance programInstance, ProgramStage programStage );
-
-    /**
      * Retrieve an event list on program instance list with a certain status
      * 
      * @param programInstances ProgramInstance list
@@ -92,14 +81,6 @@
     List<ProgramStageInstance> get( TrackedEntityInstance entityInstance, Boolean completed );
 
     /**
-     * Create relationship between an OutboundSms with many events.
-     * 
-     * @param programStageInstances Event list
-     * @param outboundSms OutboundSms object
-     */
-    void update( Collection<Integer> programStageInstanceIds, OutboundSms outboundSms );
-
-    /**
      * Retrieve scheduled list of entityInstances registered
      * 
      * @return A SchedulingProgramObject list
@@ -107,65 +88,6 @@
     Collection<SchedulingProgramObject> getSendMesssageEvents();
 
     /**
-     * Get the number of events by status
-     * 
-     * @param programStage The program stage needs to get details
-     * @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 status The status of event. There are four statuses for events,
-     *        includes COMPLETED_STATUS, VISITED_STATUS, FUTURE_VISIT_STATUS,
-     *        LATE_VISIT_STATUS
-     */
-    int getStatisticalProgramStageReport( ProgramStage programStage, Collection<Integer> orgunitIds, Date startDate,
-        Date endDate, int status );
-
-    /**
-     * Get details of events which meets the criteria in statistical report
-     * 
-     * @param programStage The program stage needs to get details
-     * @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 status The status of event. There are four statuses for events,
-     *        includes COMPLETED_STATUS, VISITED_STATUS, FUTURE_VISIT_STATUS,
-     *        LATE_VISIT_STATUS
-     * @param min
-     * @param max
-     */
-    List<ProgramStageInstance> getStatisticalProgramStageDetailsReport( ProgramStage programStage,
-        Collection<Integer> orgunitIds, Date startDate, Date endDate, int status, Integer min, Integer max );
-
-    /**
-     * Get events of a program by report date
-     * 
-     * @param program 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 completed optional flag to only get completed (<code>true</code> )
-     *        or uncompleted (<code>false</code>) or all (<code>null</code>)
-     *        instances.
-     * 
-     * @return ProgramStageInstance list
-     */
-    Collection<ProgramStageInstance> get( Program program, Collection<Integer> orgunitIds, Date after, Date before,
-        Boolean completed );
-
-    /**
-     * Get the number of events by completed status
-     * 
-     * @param program 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 completed Optional flag to only get completed (<code>true</code> )
-     *        or uncompleted (<code>false</code>) instances.
-     * @return A number
-     */
-    int count( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate, Boolean completed );
-
-    /**
      * Get the number of events by completed status
      * 
      * @param program Program
@@ -206,16 +128,6 @@
     int averageNumberCompleted( Program program, Collection<Integer> orgunitIds, Date after, Date before, int status );
 
     /**
-     * Get ids of orgunits where events happened in a period
-     * 
-     * @param startDate The start date for retrieving on report date
-     * @param endDate The end date for retrieving on report date
-     * 
-     * @return The ids of orgunits
-     */
-    Collection<Integer> getOrgunitIds( Date startDate, Date endDate );
-
-    /**
      * Get/Export a report about the number of events of a program completed on
      * a orgunit
      * 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageSectionService.java	2014-05-16 15:26:10 +0000
@@ -28,8 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-import java.util.List;
 
 /**
  * @author Chau Thu Tran
@@ -77,15 +75,6 @@
     ProgramStageSection getProgramStageSection( int id );
 
     /**
-     * Returns a {@link ProgramStageSection} with a given name.
-     * 
-     * @param name the name of the ProgramStageSection to return.
-     * 
-     * @return the ProgramStageSection with the given name, or null if no match.
-     */
-    List<ProgramStageSection> getProgramStageSectionByName( String name );
-
-    /**
      * Retrieve a program stage section by name and a program stage
      * 
      * @param name Name of program stage
@@ -96,13 +85,4 @@
      * @return ProgramStage
      */
     ProgramStageSection getProgramStageSectionByName( String name, ProgramStage programStage );
-
-    /**
-     * Returns all {@link ProgramStageSection}
-     * 
-     * @return a collection of all ProgramStageSection, or an empty collection if
-     *         there are no ProgramStageSections.
-     */
-    Collection<ProgramStageSection> getAllProgramStageSections();
-    
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStageService.java	2014-05-16 15:26:10 +0000
@@ -28,8 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-import java.util.List;
 
 /**
  * @author Abyot Asalefew
@@ -84,15 +82,6 @@
     ProgramStage getProgramStage( String uid );
 
     /**
-     * Returns a {@link ProgramStage} with a given name.
-     * 
-     * @param name the name of the ProgramStage to return.
-     * 
-     * @return the ProgramStage with the given name, or null if no match.
-     */
-    List<ProgramStage> getProgramStageByName( String name );
-
-    /**
      * Retrieve a program stage by name and a program
      * 
      * @param name Name of program stage
@@ -104,12 +93,4 @@
      */
     ProgramStage getProgramStageByName( String name, Program program );
 
-    /**
-     * Returns all {@link ProgramStage}
-     * 
-     * @return a collection of all ProgramStage, or an empty collection if there
-     *         are no ProgramStages.
-     */
-    Collection<ProgramStage> getAllProgramStages();
-
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramValidationService.java	2014-05-16 15:26:10 +0000
@@ -97,15 +97,6 @@
     Collection<ProgramValidation> getProgramValidation( ProgramStage programStage );
 
     /**
-     * Get {@link ProgramValidation} list from a {@link ProgramStageDataElement}
-     * 
-     * @param psdataElement {@link ProgramStageDataElement}
-     * 
-     * @return ProgramValidation list
-     */
-    Collection<ProgramValidation> getProgramValidation( ProgramStageDataElement psdataElement );
-
-    /**
      * Get validation violated in an event
      * 
      * @param validation ProgramValidation List

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipService.java	2014-05-16 15:26:10 +0000
@@ -86,25 +86,7 @@
      * @return {@link RelationshipType}
      */
     Relationship getRelationship( TrackedEntityInstance entityInstanceA, TrackedEntityInstance entityInstanceB, RelationshipType relationshipType );
-
-    /**
-     * Get the relationship between two entityInstances
-     * 
-     * @param entityInstanceA {@link TrackedEntityInstance}
-     * @param entityInstanceB {@link TrackedEntityInstance}
-     * 
-     * @return {@link RelationshipType}
-     */
-    Relationship getRelationship( TrackedEntityInstance entityInstanceA, TrackedEntityInstance entityInstanceB );
-
-    /**
-     * Returns all {@link Relationship}.
-     * 
-     * @return a collection of all Relationship, or an empty collection if there
-     *         are no Programs.
-     */
-    Collection<Relationship> getAllRelationships();
-
+    
     /**
      * Retrieve relationships of a instance
      * 
@@ -124,14 +106,4 @@
      * @return Relationship list
      */
     Collection<Relationship> getRelationships( TrackedEntityInstance entityInstanceA, RelationshipType relationshipType );
-
-    /**
-     * Retrieve all relationships of a relationship type
-     * 
-     * @param relationshipType RelationshipType
-     * 
-     * @return Relationship list
-     */
-    Collection<Relationship> getRelationshipsByRelationshipType( RelationshipType relationshipType );
-
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipStore.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/relationship/RelationshipStore.java	2014-05-16 15:26:10 +0000
@@ -55,27 +55,6 @@
     Relationship get( TrackedEntityInstance entityInstanceA, TrackedEntityInstance entityInstanceB, RelationshipType relationshipType );
 
     /**
-     * Get the relationship between two entityInstances
-     * 
-     * @param entityInstanceA {@link TrackedEntityInstance}
-     * @param entityInstanceB {@link TrackedEntityInstance}
-     * 
-     * @return {@link RelationshipType}
-     */
-    Relationship get( TrackedEntityInstance entityInstanceA, TrackedEntityInstance entityInstanceB );
-
-    /**
-     * Retrieve all relationships by relationship type of a person, for example
-     * a instance might have more than one sibling
-     * 
-     * @param entityInstanceA TrackedEntityInstance
-     * @param relationshipType RelationshipType
-     * 
-     * @return Relationship list
-     */
-    Collection<Relationship> get( TrackedEntityInstance entityInstanceA, RelationshipType relationshipType );
-
-    /**
      * Retrieve relationships of a instance
      * 
      * @param instance TrackedEntityInstance

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeGroupService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeGroupService.java	2014-04-14 15:59:05 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeGroupService.java	2014-05-16 15:26:10 +0000
@@ -29,7 +29,6 @@
  */
 
 import java.util.Collection;
-import java.util.List;
 
 /**
  * @author Chau Thu Tran
@@ -103,17 +102,6 @@
     Collection<TrackedEntityAttributeGroup> getAllTrackedEntityAttributeGroups();
 
     /**
-     * Get {@link TrackedEntityAttribute} by a
-     * {@link TrackedEntityAttributeGroup}
-     * 
-     * @param TrackedEntityAttributeGroup {@link TrackedEntityAttributeGroup}
-     * 
-     * @return TrackedEntityAttribute list
-     */
-    List<TrackedEntityAttribute> getTrackedEntityAttributes(
-        TrackedEntityAttributeGroup TrackedEntityAttributeGroup );
-
-    /**
      * Returns The number of TrackedEntityAttributeGroups with the key searched
      * 
      * @param name Keyword for searching by name
@@ -132,7 +120,7 @@
      * @return a collection of all TrackedEntityAttribute, or an empty
      *         collection if there are no TrackedEntityAttributes.
      */
-    Collection<? extends TrackedEntityAttributeGroup> getTrackedEntityAttributeGroupsBetweenByName( String name,
+    Collection<TrackedEntityAttributeGroup> getTrackedEntityAttributeGroupsBetweenByName( String name,
         int min, int max );
 
     /**

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeService.java	2014-05-14 13:37:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeService.java	2014-05-16 15:26:10 +0000
@@ -119,15 +119,6 @@
     Collection<TrackedEntityAttribute> getAllTrackedEntityAttributes();
 
     /**
-     * Get attributes by value type
-     * 
-     * @param valueType Value type
-     * 
-     * @return List of attributes
-     */
-    Collection<TrackedEntityAttribute> getTrackedEntityAttributesByValueType( String valueType );
-
-    /**
      * Get attributes without groups
      * 
      * @return List of attributes

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStore.java	2014-05-14 13:37:02 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStore.java	2014-05-16 15:26:10 +0000
@@ -41,15 +41,6 @@
     String ID = TrackedEntityAttributeStore.class.getName();
 
     /**
-     * Get attributes by value type
-     * 
-     * @param valueType Value type
-     * 
-     * @return List of attributes
-     */
-    Collection<TrackedEntityAttribute> getByValueType( String valueType );
-
-    /**
      * Get attributes without groups
      * 
      * @return List of attributes

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAuditService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAuditService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityAuditService.java	2014-05-16 15:26:10 +0000
@@ -66,14 +66,6 @@
     TrackedEntityAudit getTrackedEntityAudit( int id );
 
     /**
-     * Returns all {@link TrackedEntityAudit}
-     * 
-     * @return a collection of all TrackedEntityAudit, or an empty collection if
-     *         there are no TrackedEntityAttributeGroups.
-     */
-    Collection<TrackedEntityAudit> getAllTrackedEntityAudit();
-
-    /**
      * Get all instance audits of a instance
      * 
      * @param instance TrackedEntityInstance

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java	2014-05-16 13:32:48 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceService.java	2014-05-16 15:26:10 +0000
@@ -204,19 +204,6 @@
         Integer max );
 
     /**
-     * Search entityInstances base on OrganisationUnit and Program with result
-     * limited name
-     * 
-     * @param organisationUnit
-     * @param program
-     * @param min
-     * @param max
-     * @return
-     */
-    Collection<TrackedEntityInstance> getTrackedEntityInstances( OrganisationUnit organisationUnit, Program program,
-        Integer min, Integer max );
-
-    /**
      * Get entityInstances who has the same representative
      * 
      * @params entityInstance The representatives
@@ -254,17 +241,6 @@
         List<TrackedEntityAttributeValue> valuesForUpdate, Collection<TrackedEntityAttributeValue> valuesForDelete );
 
     /**
-     * Cache value from String to the value type based on property
-     * 
-     * @param property Property name of entityInstance
-     * @param value Value
-     * @param format I18nFormat
-     * 
-     * @return An object
-     */
-    Object getObjectValue( String property, String value, I18nFormat format );
-
-    /**
      * Validate entityInstance attributes and validation criteria by program
      * before registering or updating information
      * 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-07 09:33:33 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStore.java	2014-05-16 15:26:10 +0000
@@ -66,22 +66,6 @@
     Collection<TrackedEntityInstance> getByOrgUnit( OrganisationUnit organisationUnit, Integer min, Integer max );
 
     /**
-     * Search entityInstances registered into a certain organisation unit and
-     * enrolled into a program with active status
-     * 
-     * @param organisationUnit Organisation unit where entityInstances
-     *        registered
-     * @param program Program. It's is used for getting attributes of this
-     *        program and put attribute values of entityInstances into the
-     *        result
-     * @param min
-     * @param max
-     * 
-     * @return List of entityInstances
-     */
-    Collection<TrackedEntityInstance> getByOrgUnitProgram( OrganisationUnit organisationUnit, Program program, Integer min, Integer max );
-
-    /**
      * Search instances who has the same representative
      * 
      * @param instances Representative

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueService.java	2014-03-19 06:44:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueService.java	2014-05-16 15:26:10 +0000
@@ -29,7 +29,6 @@
  */
 
 import java.util.Collection;
-import java.util.Map;
 
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
@@ -65,24 +64,6 @@
     void deleteTrackedEntityAttributeValue( TrackedEntityAttributeValue attributeValue );
 
     /**
-     * Deletes all {@link TrackedEntityAttributeValue} of a instance
-     * 
-     * @param instance {@link TrackedEntityInstance}
-     * 
-     * @return The error code. If the code is 0, deleting success
-     */
-    int deleteTrackedEntityAttributeValue( TrackedEntityInstance instance );
-
-    /**
-     * Delete all {@link TrackedEntityAttributeValue} of a {@link TrackedEntityAttribute}
-     * 
-     * @param attribute {@link TrackedEntityAttribute}
-     * 
-     * @return The error code. If the code is 0, deleting success
-     */
-    int deleteTrackedEntityAttributeValue( TrackedEntityAttribute attribute );
-
-    /**
      * Retrieve a {@link TrackedEntityAttributeValue} on a {@link TrackedEntityInstance} and
      * {@link TrackedEntityAttribute}
      * 
@@ -120,38 +101,6 @@
     Collection<TrackedEntityAttributeValue> getTrackedEntityAttributeValues( Collection<TrackedEntityInstance> instances );
 
     /**
-     * Returns all {@link TrackedEntityAttributeValue}
-     * 
-     * @return a collection of all TrackedEntityAttributeValue, or an empty collection
-     *         if there are no TrackedEntityAttributeTrackedEntityAttributeValues.
-     */
-    Collection<TrackedEntityAttributeValue> getAllTrackedEntityAttributeValues();
-
-    /**
-     * Retrieve TrackedEntityAttributeValues of many instances and put them into a Map
-     * Object with key as the ids of instances and values as a
-     * TrackedEntityAttributeValue list of each instance
-     * 
-     * @param instances A TrackedEntityInstance list
-     * 
-     * @return Map<TrackedEntityAttributeValueID, TrackedEntityAttributeValue list>
-     */
-    Map<Integer, Collection<TrackedEntityAttributeValue>> getAttributeValueMapForAttributeValues( Collection<TrackedEntityInstance> instances );
-
-    /**
-     * Retrieve TrackedEntityAttributeValues of many instances on a TrackedEntityAttribute
-     * and put them into a Map Object with key as the ids of instances and values
-     * as a TrackedEntityAttributeValue list of each instance
-     * 
-     * @param instances A instance list
-     * @param attribute TrackedEntityAttribute
-     * 
-     * @return Map<TrackedEntityAttributeValue ID, TrackedEntityAttributeValue>
-     */
-    Map<Integer, TrackedEntityAttributeValue> getAttributeValueMapForAttributeValues( Collection<TrackedEntityInstance> instances,
-        TrackedEntityAttribute attribute );
-
-    /**
      * Search TrackedEntityAttributeValue objects by a TrackedEntityAttribute and a attribute
      * value (performs partial search )
      * 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueStore.java	2014-03-19 06:44:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueStore.java	2014-05-16 15:26:10 +0000
@@ -62,13 +62,6 @@
     int deleteByTrackedEntityInstance( TrackedEntityInstance instance );
 
     /**
-     * Deletes a {@link TrackedEntityAttribute}.
-     * 
-     * @param attribute the TrackedEntityAttribute to delete.
-     */
-    int deleteByAttribute( TrackedEntityAttribute attribute );
-
-    /**
      * Retrieve a {@link TrackedEntityAttributeValue} on a
      * {@link TrackedEntityInstance} and {@link TrackedEntityAttribute}
      * 

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentitycomment/TrackedEntityCommentService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentitycomment/TrackedEntityCommentService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentitycomment/TrackedEntityCommentService.java	2014-05-16 15:26:10 +0000
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
 
 /**
  * @author Chau Thu Tran
@@ -71,12 +70,4 @@
      */
     TrackedEntityComment getTrackedEntityComment( int id );
 
-    /**
-     * Returns all {@link TrackedEntityComment}
-     * 
-     * @return a collection of all TrackedEntityComment, or an empty collection if
-     *         there are no TrackedEntityAttributes.
-     */
-    Collection<TrackedEntityComment> getAllTrackedEntityComments();
-
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueService.java	2014-05-14 14:05:57 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueService.java	2014-05-16 15:26:10 +0000
@@ -136,12 +136,4 @@
      * @return TrackedEntityDataValue
      */
     TrackedEntityDataValue getTrackedEntityDataValue( ProgramStageInstance programStageInstance, DataElement dataElement );
-
-    /**
-     * Returns all {@link TrackedEntityDataValue}
-     * 
-     * @return a collection of all TrackedEntityDataValues, or an empty collection if
-     *         there are no TrackedEntityDataValues.
-     */
-    Collection<TrackedEntityDataValue> getAllTrackedEntityDataValues();
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramExpressionService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramExpressionService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramExpressionService.java	2014-05-16 15:26:10 +0000
@@ -32,7 +32,6 @@
 import static org.hisp.dhis.program.ProgramExpression.SEPARATOR_ID;
 import static org.hisp.dhis.program.ProgramExpression.SEPARATOR_OBJECT;
 
-import java.util.Collection;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
@@ -111,12 +110,6 @@
     }
 
     @Override
-    public Collection<ProgramExpression> getAllProgramExpressions()
-    {
-        return programExpressionStore.getAll();
-    }
-
-    @Override
     public String getProgramExpressionValue( ProgramExpression programExpression,
         ProgramStageInstance programStageInstance, Map<String, String> dataValueMap )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java	2014-04-12 12:12:30 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramInstanceService.java	2014-05-16 15:26:10 +0000
@@ -46,7 +46,6 @@
 import org.hisp.dhis.message.MessageConversation;
 import org.hisp.dhis.message.MessageService;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.sms.SmsSender;
 import org.hisp.dhis.sms.SmsServiceException;
@@ -147,13 +146,6 @@
         this.trackedEntityInstanceService = trackedEntityInstanceService;
     }
 
-    private OrganisationUnitService organisationUnitService;
-
-    public void setOrganisationUnitService( OrganisationUnitService organisationUnitService )
-    {
-        this.organisationUnitService = organisationUnitService;
-    }
-
     private I18nManager i18nManager;
     
     public void setI18nManager( I18nManager i18nManager )
@@ -175,11 +167,6 @@
         programInstanceStore.delete( programInstance );
     }
 
-    public Collection<ProgramInstance> getAllProgramInstances()
-    {
-        return programInstanceStore.getAll();
-    }
-
     public ProgramInstance getProgramInstance( int id )
     {
         return programInstanceStore.get( id );
@@ -191,11 +178,6 @@
         return programInstanceStore.getByUid( id );
     }
 
-    public Collection<ProgramInstance> getProgramInstances( Integer status )
-    {
-        return programInstanceStore.getByStatus( status );
-    }
-
     public void updateProgramInstance( ProgramInstance programInstance )
     {
         programInstanceStore.update( programInstance );
@@ -255,12 +237,6 @@
         return programInstanceStore.get( program, organisationUnit, min, max );
     }
 
-    public Collection<ProgramInstance> getProgramInstances( Program program, OrganisationUnit organisationUnit,
-        Date startDate, Date endDate )
-    {
-        return programInstanceStore.get( program, organisationUnit, startDate, endDate );
-    }
-
     public Collection<ProgramInstance> getProgramInstances( Program program, Collection<Integer> orgunitIds,
         Date startDate, Date endDate, Integer min, Integer max )
     {
@@ -462,69 +438,6 @@
 
         return result;
     }
-
-    public Collection<OutboundSms> sendMessages( ProgramInstance programInstance, int status )
-    {
-        TrackedEntityInstance entityInstance = programInstance.getEntityInstance();
-        Collection<OutboundSms> outboundSmsList = new HashSet<OutboundSms>();
-
-        Collection<TrackedEntityInstanceReminder> reminders = programInstance.getProgram().getInstanceReminders();
-
-        for ( TrackedEntityInstanceReminder rm : reminders )
-        {
-            if ( rm != null
-                && rm.getWhenToSend() != null
-                && rm.getWhenToSend() == status
-                && (rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_DIRECT_SMS || rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_BOTH) )
-            {
-                OutboundSms outboundSms = sendProgramMessage( rm, programInstance, entityInstance );
-
-                if ( outboundSms != null )
-                {
-                    outboundSmsList.add( outboundSms );
-                }
-            }
-        }
-
-        return outboundSmsList;
-    }
-
-    @Override
-    public Collection<MessageConversation> sendMessageConversations( ProgramInstance programInstance, int status )
-    {
-        I18nFormat format = i18nManager.getI18nFormat();
-        
-        Collection<MessageConversation> messageConversations = new HashSet<MessageConversation>();
-
-        Collection<TrackedEntityInstanceReminder> reminders = programInstance.getProgram().getInstanceReminders();
-        for ( TrackedEntityInstanceReminder rm : reminders )
-        {
-            if ( rm != null
-                && rm.getWhenToSend() != null
-                && rm.getWhenToSend() == status
-                && (rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_DHIS_MESSAGE || rm
-                    .getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_BOTH) )
-            {
-                int id = messageService.sendMessage( programInstance.getProgram().getDisplayName(),
-                    reminderService.getMessageFromTemplate( rm, programInstance, format ), null,
-                    reminderService.getUsers( rm, programInstance.getEntityInstance() ), null, false, true );
-                messageConversations.add( messageService.getMessageConversation( id ) );
-            }
-        }
-
-        return messageConversations;
-    }
-    
-    @Override
-    public ProgramInstance enrollTrackedEntityInstance( String entityInstance, String program, 
-        Date enrollmentDate, Date dateOfIncident, String organisationUnit )
-    {
-        TrackedEntityInstance tei = trackedEntityInstanceService.getTrackedEntityInstance( entityInstance );
-        Program pr = programService.getProgram( program );
-        OrganisationUnit ou = organisationUnitService.getOrganisationUnit( organisationUnit );
-        
-        return enrollTrackedEntityInstance( tei, pr, enrollmentDate, dateOfIncident, ou );        
-    }
     
     @Override
     public ProgramInstance enrollTrackedEntityInstance( TrackedEntityInstance entityInstance, Program program,
@@ -846,4 +759,54 @@
         return outboundSms;
     }
 
+    private Collection<OutboundSms> sendMessages( ProgramInstance programInstance, int status )
+    {
+        TrackedEntityInstance entityInstance = programInstance.getEntityInstance();
+        Collection<OutboundSms> outboundSmsList = new HashSet<OutboundSms>();
+
+        Collection<TrackedEntityInstanceReminder> reminders = programInstance.getProgram().getInstanceReminders();
+
+        for ( TrackedEntityInstanceReminder rm : reminders )
+        {
+            if ( rm != null
+                && rm.getWhenToSend() != null
+                && rm.getWhenToSend() == status
+                && (rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_DIRECT_SMS || rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_BOTH) )
+            {
+                OutboundSms outboundSms = sendProgramMessage( rm, programInstance, entityInstance );
+
+                if ( outboundSms != null )
+                {
+                    outboundSmsList.add( outboundSms );
+                }
+            }
+        }
+
+        return outboundSmsList;
+    }
+
+    private Collection<MessageConversation> sendMessageConversations( ProgramInstance programInstance, int status )
+    {
+        I18nFormat format = i18nManager.getI18nFormat();
+        
+        Collection<MessageConversation> messageConversations = new HashSet<MessageConversation>();
+
+        Collection<TrackedEntityInstanceReminder> reminders = programInstance.getProgram().getInstanceReminders();
+        for ( TrackedEntityInstanceReminder rm : reminders )
+        {
+            if ( rm != null
+                && rm.getWhenToSend() != null
+                && rm.getWhenToSend() == status
+                && (rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_DHIS_MESSAGE || rm
+                    .getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_BOTH) )
+            {
+                int id = messageService.sendMessage( programInstance.getProgram().getDisplayName(),
+                    reminderService.getMessageFromTemplate( rm, programInstance, format ), null,
+                    reminderService.getUsers( rm, programInstance.getEntityInstance() ), null, false, true );
+                messageConversations.add( messageService.getMessageConversation( id ) );
+            }
+        }
+
+        return messageConversations;
+    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramService.java	2014-04-15 14:30:00 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramService.java	2014-05-16 15:26:10 +0000
@@ -160,12 +160,6 @@
     }
 
     @Override
-    public Collection<Program> getProgramsByDisplayOnAllOrgunit( boolean displayOnAllOrgunit, OrganisationUnit orgunit )
-    {
-        return i18n( i18nService, programStore.getProgramsByDisplayOnAllOrgunit( displayOnAllOrgunit, orgunit ) );
-    }
-
-    @Override
     public Collection<Program> getProgramsByCurrentUser( OrganisationUnit organisationUnit )
     {
         Collection<Program> programs = new ArrayList<Program>( getProgramsByDisplayOnAllOrgunit( true, null ) );
@@ -204,4 +198,14 @@
     {
         return programStore.getAllOrderedName( min, max );
     }
+    
+    // -------------------------------------------------------------------------
+    // Supportive methods
+    // -------------------------------------------------------------------------
+    
+    private Collection<Program> getProgramsByDisplayOnAllOrgunit( boolean displayOnAllOrgunit, OrganisationUnit orgunit )
+    {
+        return i18n( i18nService, programStore.getProgramsByDisplayOnAllOrgunit( displayOnAllOrgunit, orgunit ) );
+    }
+
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageDataElementService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageDataElementService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageDataElementService.java	2014-05-16 15:26:10 +0000
@@ -70,12 +70,7 @@
     {
         return programStageDataElementStore.getAll();
     }
-
-    public Collection<ProgramStageDataElement> get( ProgramStage programStage )
-    {
-        return programStageDataElementStore.get( programStage );
-    }
-
+    
     public ProgramStageDataElement get( ProgramStage programStage, DataElement dataElement )
     {
         return programStageDataElementStore.get( programStage, dataElement );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2014-05-10 12:06:43 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageInstanceService.java	2014-05-16 15:26:10 +0000
@@ -143,14 +143,7 @@
     {
         return programStageInstanceStore.get( programInstance, programStage );
     }
-
-    @Override
-    public Collection<ProgramStageInstance> getProgramStageInstances( ProgramInstance programInstance,
-        ProgramStage programStage )
-    {
-        return programStageInstanceStore.getAll( programInstance, programStage );
-    }
-
+    
     @Override
     public void updateProgramStageInstance( ProgramStageInstance programStageInstance )
     {
@@ -185,25 +178,12 @@
     }
 
     @Override
-    public void updateProgramStageInstances( Collection<Integer> programStageInstanceIds, OutboundSms outboundSms )
-    {
-        programStageInstanceStore.update( programStageInstanceIds, outboundSms );
-    }
-
-    @Override
     public Collection<SchedulingProgramObject> getSendMesssageEvents()
     {
         return programStageInstanceStore.getSendMesssageEvents();
     }
 
     @Override
-    public Collection<ProgramStageInstance> getProgramStageInstances( Program program, Collection<Integer> orgunitIds,
-        Date startDate, Date endDate, Boolean completed )
-    {
-        return programStageInstanceStore.get( program, orgunitIds, startDate, endDate, completed );
-    }
-
-    @Override
     public Grid getStatisticalReport( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate,
         I18n i18n, I18nFormat format )
     {
@@ -251,7 +231,7 @@
         double percent = 0.0;
         if ( totalCompleted != 0 )
         {
-            int stageCompleted = averageNumberCompletedProgramInstance( program, orgunitIds, startDate, endDate,
+           int stageCompleted =  programStageInstanceStore.averageNumberCompleted( program, orgunitIds, startDate, endDate,
                 ProgramInstance.STATUS_ACTIVE );
             percent = (stageCompleted + 0.0) / totalCompleted;
         }
@@ -318,8 +298,7 @@
             grid.addValue( format.formatValue( percent ) + "%" );
 
             // Visits overdue (#)
-
-            int overdue = this.getOverDueEventCount( programStage, orgunitIds, startDate, endDate );
+            int overdue = programStageInstanceStore.getOverDueCount( programStage, orgunitIds, startDate, endDate );
             grid.addValue( overdue );
 
             // Visits overdue (%)
@@ -336,34 +315,6 @@
     }
 
     @Override
-    public List<ProgramStageInstance> getStatisticalProgramStageDetailsReport( ProgramStage programStage,
-        Collection<Integer> orgunitIds, Date startDate, Date endDate, int status, Integer min, Integer max )
-    {
-        return programStageInstanceStore.getStatisticalProgramStageDetailsReport( programStage, orgunitIds, startDate,
-            endDate, status, min, max );
-    }
-
-    @Override
-    public int getOverDueEventCount( ProgramStage programStage, Collection<Integer> orgunitIds, Date startDate,
-        Date endDate )
-    {
-        return programStageInstanceStore.getOverDueCount( programStage, orgunitIds, startDate, endDate );
-    }
-
-    @Override
-    public int averageNumberCompletedProgramInstance( Program program, Collection<Integer> orgunitIds, Date startDate,
-        Date endDate, int status )
-    {
-        return programStageInstanceStore.averageNumberCompleted( program, orgunitIds, startDate, endDate, status );
-    }
-
-    @Override
-    public Collection<Integer> getOrganisationUnitIds( Date startDate, Date endDate )
-    {
-        return programStageInstanceStore.getOrgunitIds( startDate, endDate );
-    }
-
-    @Override
     public Grid getCompletenessProgramStageInstance( Collection<Integer> orgunitIds, Program program, String startDate,
         String endDate, I18n i18n )
     {
@@ -371,60 +322,6 @@
     }
 
     @Override
-    public Collection<OutboundSms> sendMessages( ProgramStageInstance programStageInstance, int status,
-        I18nFormat format )
-    {
-        TrackedEntityInstance entityInstance = programStageInstance.getProgramInstance().getEntityInstance();
-        Collection<OutboundSms> outboundSmsList = new HashSet<OutboundSms>();
-
-        Collection<TrackedEntityInstanceReminder> reminders = programStageInstance.getProgramStage()
-            .getReminders();
-        for ( TrackedEntityInstanceReminder rm : reminders )
-        {
-            if ( rm != null
-                && rm.getWhenToSend() != null
-                && rm.getWhenToSend() == status
-                && (rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_DIRECT_SMS || rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_BOTH) )
-            {
-                OutboundSms outboundSms = sendEventMessage( rm, programStageInstance, entityInstance, format );
-                if ( outboundSms != null )
-                {
-                    outboundSmsList.add( outboundSms );
-                }
-            }
-        }
-
-        return outboundSmsList;
-    }
-
-    @Override
-    public Collection<MessageConversation> sendMessageConversations( ProgramStageInstance programStageInstance,
-        int status, I18nFormat format )
-    {
-        Collection<MessageConversation> messageConversations = new HashSet<MessageConversation>();
-
-        Collection<TrackedEntityInstanceReminder> reminders = programStageInstance.getProgramStage()
-            .getReminders();
-        for ( TrackedEntityInstanceReminder rm : reminders )
-        {
-            if ( rm != null
-                && rm.getWhenToSend() != null
-                && rm.getWhenToSend() == status
-                && (rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_DHIS_MESSAGE || rm
-                    .getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_BOTH) )
-            {
-                int id = messageService.sendMessage( programStageInstance.getProgramStage().getDisplayName(),
-                    reminderService.getMessageFromTemplate( rm, programStageInstance, format ), null,
-                    reminderService.getUsers( rm, programStageInstance.getProgramInstance().getEntityInstance() ),
-                    null, false, true );
-                messageConversations.add( messageService.getMessageConversation( id ) );
-            }
-        }
-
-        return messageConversations;
-    }
-
-    @Override
     public void completeProgramStageInstance( ProgramStageInstance programStageInstance, I18nFormat format )
     {
         programStageInstance.setCompleted( true );
@@ -580,4 +477,56 @@
 
         return outboundSms;
     }
+    
+    private Collection<OutboundSms> sendMessages( ProgramStageInstance programStageInstance, int status,
+        I18nFormat format )
+    {
+        TrackedEntityInstance entityInstance = programStageInstance.getProgramInstance().getEntityInstance();
+        Collection<OutboundSms> outboundSmsList = new HashSet<OutboundSms>();
+
+        Collection<TrackedEntityInstanceReminder> reminders = programStageInstance.getProgramStage()
+            .getReminders();
+        for ( TrackedEntityInstanceReminder rm : reminders )
+        {
+            if ( rm != null
+                && rm.getWhenToSend() != null
+                && rm.getWhenToSend() == status
+                && (rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_DIRECT_SMS || rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_BOTH) )
+            {
+                OutboundSms outboundSms = sendEventMessage( rm, programStageInstance, entityInstance, format );
+                if ( outboundSms != null )
+                {
+                    outboundSmsList.add( outboundSms );
+                }
+            }
+        }
+
+        return outboundSmsList;
+    }
+
+    private Collection<MessageConversation> sendMessageConversations( ProgramStageInstance programStageInstance,
+         int status, I18nFormat format )
+     {
+         Collection<MessageConversation> messageConversations = new HashSet<MessageConversation>();
+
+         Collection<TrackedEntityInstanceReminder> reminders = programStageInstance.getProgramStage()
+             .getReminders();
+         for ( TrackedEntityInstanceReminder rm : reminders )
+         {
+             if ( rm != null
+                 && rm.getWhenToSend() != null
+                 && rm.getWhenToSend() == status
+                 && (rm.getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_DHIS_MESSAGE || rm
+                     .getMessageType() == TrackedEntityInstanceReminder.MESSAGE_TYPE_BOTH) )
+             {
+                 int id = messageService.sendMessage( programStageInstance.getProgramStage().getDisplayName(),
+                     reminderService.getMessageFromTemplate( rm, programStageInstance, format ), null,
+                     reminderService.getUsers( rm, programStageInstance.getProgramInstance().getEntityInstance() ),
+                     null, false, true );
+                 messageConversations.add( messageService.getMessageConversation( id ) );
+             }
+         }
+
+         return messageConversations;
+     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageSectionService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageSectionService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageSectionService.java	2014-05-16 15:26:10 +0000
@@ -30,9 +30,6 @@
 
 import static org.hisp.dhis.i18n.I18nUtils.i18n;
 
-import java.util.Collection;
-import java.util.List;
-
 import org.hisp.dhis.i18n.I18nService;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -92,18 +89,6 @@
     }
 
     @Override
-    public List<ProgramStageSection> getProgramStageSectionByName( String name )
-    {
-        return programStageSectionStore.getAllEqName( name );
-    }
-
-    @Override
-    public Collection<ProgramStageSection> getAllProgramStageSections()
-    {
-        return i18n( i18nService, programStageSectionStore.getAll() );
-    }
-
-    @Override
     public ProgramStageSection getProgramStageSectionByName( String name, ProgramStage programStage )
     {
         return i18n( i18nService, programStageSectionStore.getByNameAndProgramStage( name, programStage ) );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramStageService.java	2014-05-16 15:26:10 +0000
@@ -30,9 +30,6 @@
 
 import static org.hisp.dhis.i18n.I18nUtils.i18n;
 
-import java.util.Collection;
-import java.util.List;
-
 import org.hisp.dhis.i18n.I18nService;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -86,11 +83,6 @@
         return i18n( i18nService, programStageStore.getByUid( uid ) );
     }
 
-    public List<ProgramStage> getProgramStageByName( String name )
-    {
-        return programStageStore.getAllEqName( name );
-    }
-
     public ProgramStage getProgramStageByName( String name, Program program )
     {
         return i18n( i18nService, programStageStore.getByNameAndProgram( name, program ) );
@@ -101,9 +93,4 @@
         programStageStore.update( programStage );
     }
 
-    public Collection<ProgramStage> getAllProgramStages()
-    {
-        return i18n( i18nService, programStageStore.getAll() );
-    }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/DefaultProgramValidationService.java	2014-05-16 15:26:10 +0000
@@ -28,8 +28,8 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.program.ProgramExpression.OBJECT_PROGRAM_STAGE;
 import static org.hisp.dhis.program.ProgramExpression.OBJECT_PROGRAM_STAGE_DATAELEMENT;
-import static org.hisp.dhis.program.ProgramExpression.OBJECT_PROGRAM_STAGE;
 import static org.hisp.dhis.program.ProgramExpression.SEPARATOR_ID;
 import static org.hisp.dhis.program.ProgramExpression.SEPARATOR_OBJECT;
 
@@ -41,8 +41,6 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
 import org.hisp.dhis.trackedentitydatavalue.TrackedEntityDataValue;
 import org.hisp.dhis.trackedentitydatavalue.TrackedEntityDataValueService;
 import org.springframework.transaction.annotation.Transactional;
@@ -65,22 +63,8 @@
         this.validationStore = validationStore;
     }
 
-    private ProgramStageService programStageService;
-
-    public void setProgramStageService( ProgramStageService programStageService )
-    {
-        this.programStageService = programStageService;
-    }
-
-    private DataElementService dataElementService;
-
     private ProgramExpressionService expressionService;
 
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
     public void setExpressionService( ProgramExpressionService expressionService )
     {
         this.expressionService = expressionService;
@@ -190,27 +174,6 @@
         return validationStore.get( program );
     }
 
-    public Collection<ProgramValidation> getProgramValidation( ProgramStageDataElement psdataElement )
-    {
-        Collection<ProgramValidation> programValidation = validationStore.get( psdataElement.getProgramStage()
-            .getProgram() );
-        Collection<ProgramValidation> result = new HashSet<ProgramValidation>();
-
-        for ( ProgramValidation validation : programValidation )
-        {
-            Collection<DataElement> dataElements = getDataElementInExpression( validation );
-            Collection<ProgramStage> programStages = getProgramStageInExpression( validation );
-
-            if ( dataElements.contains( psdataElement.getDataElement() )
-                && programStages.contains( psdataElement.getProgramStage() ) )
-            {
-                result.add( validation );
-            }
-        }
-
-        return result;
-    }
-
     public Collection<ProgramValidation> getProgramValidation( ProgramStage programStage )
     {
         Collection<ProgramValidation> programValidation = getProgramValidation( programStage.getProgram() );
@@ -253,60 +216,4 @@
 
         return programValidation;
     }
-
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private Collection<DataElement> getDataElementInExpression( ProgramValidation programValidation )
-    {
-        Collection<DataElement> dataElements = new HashSet<DataElement>();
-
-        Pattern pattern = Pattern.compile( regExp );
-        String expression = programValidation.getLeftSide().getExpression() + " "
-            + programValidation.getRightSide().getExpression();
-        Matcher matcher = pattern.matcher( expression );
-        while ( matcher.find() )
-        {
-            String match = matcher.group();
-            match = match.replaceAll( "[\\[\\]]", "" );
-
-            String[] info = match.split( SEPARATOR_OBJECT );
-            String[] ids = info[1].split( SEPARATOR_ID );
-
-            int dataElementId = Integer.parseInt( ids[1] );
-            DataElement dataElement = dataElementService.getDataElement( dataElementId );
-
-            dataElements.add( dataElement );
-        }
-
-        return dataElements;
-    }
-
-    private Collection<ProgramStage> getProgramStageInExpression( ProgramValidation programValidation )
-    {
-        Collection<ProgramStage> programStages = new HashSet<ProgramStage>();
-
-        Pattern pattern = Pattern.compile( regExp );
-        String expression = programValidation.getLeftSide().getExpression() + " "
-            + programValidation.getRightSide().getExpression();
-        Matcher matcher = pattern.matcher( expression );
-
-        while ( matcher.find() )
-        {
-            String match = matcher.group();
-            match = match.replaceAll( "[\\[\\]]", "" );
-
-            String[] info = match.split( SEPARATOR_OBJECT );
-            String[] ids = info[1].split( SEPARATOR_ID );
-
-            int programStageId = Integer.parseInt( ids[0] );
-            ProgramStage programStage = programStageService.getProgramStage( programStageId );
-
-            programStages.add( programStage );
-        }
-
-        return programStages;
-    }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java	2014-05-09 15:49:36 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java	2014-05-16 15:26:10 +0000
@@ -59,12 +59,6 @@
     // -------------------------------------------------------------------------
 
     @SuppressWarnings( "unchecked" )
-    public Collection<ProgramInstance> getByStatus( Integer status )
-    {
-        return getCriteria( Restrictions.eq( "status", status ) ).list();
-    }
-
-    @SuppressWarnings( "unchecked" )
     public Collection<ProgramInstance> get( Program program )
     {
         return getCriteria( Restrictions.eq( "program", program ) ).list();
@@ -171,20 +165,6 @@
     }
 
     @SuppressWarnings( "unchecked" )
-    public Collection<ProgramInstance> get( Program program, OrganisationUnit organisationUnit, Date startDate,
-        Date endDate )
-    {
-        return getCriteria( 
-            Restrictions.eq( "program", program ), 
-            Restrictions.isNull( "endDate" ),
-            Restrictions.ge( "enrollmentDate", startDate ), 
-            Restrictions.le( "enrollmentDate", endDate ) ).
-            createAlias( "entityInstance", "entityInstance" ).
-            add( Restrictions.eq( "entityInstance.organisationUnit", organisationUnit ) ).
-            addOrder( Order.asc( "entityInstance.id" ) ).list();
-    }
-
-    @SuppressWarnings( "unchecked" )
     public Collection<ProgramInstance> get( Program program, Collection<Integer> orgunitIds, Date startDate,
         Date endDate, Integer min, Integer max )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageDataElementStore.java	2014-05-13 12:54:58 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageDataElementStore.java	2014-05-16 15:26:10 +0000
@@ -92,28 +92,6 @@
         return criteria.list();
     }
 
-    @SuppressWarnings( "unchecked" )
-    public Collection<ProgramStageDataElement> get( ProgramStage programStage )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( ProgramStageDataElement.class );
-
-        return criteria.add( Restrictions.eq( "programStage", programStage ) ).list();
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public Collection<ProgramStageDataElement> get( ProgramStage programStage, boolean compulsory )
-    {
-        Session session = sessionFactory.getCurrentSession();
-
-        Criteria criteria = session.createCriteria( ProgramStageDataElement.class );
-        criteria.add( Restrictions.eq( "programStage", programStage ) );
-        criteria.add( Restrictions.eq( "compulsory", compulsory ) );
-
-        return criteria.list();
-    }
-
     public ProgramStageDataElement get( ProgramStage programStage, DataElement dataElement )
     {
         Session session = sessionFactory.getCurrentSession();
@@ -134,4 +112,5 @@
         criteria.setProjection( Projections.property( "dataElement" ) );
         return criteria.list();
     }
+
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2014-05-16 13:43:13 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java	2014-05-16 15:26:10 +0000
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Collection;
 import java.util.Date;
@@ -51,7 +50,6 @@
 import org.hisp.dhis.program.ProgramStageInstance;
 import org.hisp.dhis.program.ProgramStageInstanceStore;
 import org.hisp.dhis.program.SchedulingProgramObject;
-import org.hisp.dhis.sms.outbound.OutboundSms;
 import org.hisp.dhis.system.grid.GridUtils;
 import org.hisp.dhis.system.grid.ListGrid;
 import org.hisp.dhis.system.util.TextUtils;
@@ -95,16 +93,6 @@
 
     @Override
     @SuppressWarnings( "unchecked" )
-    public Collection<ProgramStageInstance> getAll( ProgramInstance programInstance, ProgramStage programStage )
-    {
-        return getCriteria( 
-            Restrictions.eq( "programInstance", programInstance ),
-            Restrictions.eq( "programStage", programStage ) )
-            .addOrder( Order.asc( "id" ) ).list();
-    }
-
-    @Override
-    @SuppressWarnings( "unchecked" )
     public Collection<ProgramStageInstance> get( Collection<ProgramInstance> programInstances, boolean completed )
     {
         return getCriteria( 
@@ -124,31 +112,6 @@
         return criteria.list();
     }
 
-    // TODO this class must be re-written from here
-    
-    @Override
-    public void update( Collection<Integer> programStageInstanceIds, OutboundSms outboundSms )
-    {
-        for ( Integer programStageInstanceId : programStageInstanceIds )
-        {
-            if ( programStageInstanceId != null && programStageInstanceId != 0 )
-            {
-                ProgramStageInstance programStageInstance = get( programStageInstanceId );
-
-                List<OutboundSms> outboundSmsList = programStageInstance.getOutboundSms();
-
-                if ( outboundSmsList == null )
-                {
-                    outboundSmsList = new ArrayList<OutboundSms>();
-                }
-
-                outboundSmsList.add( outboundSms );
-                programStageInstance.setOutboundSms( outboundSmsList );
-                update( programStageInstance );
-            }
-        }
-    }
-
     @Override
     public Collection<SchedulingProgramObject> getSendMesssageEvents()
     {
@@ -199,33 +162,6 @@
     }
 
     @Override
-    public int getStatisticalProgramStageReport( ProgramStage programStage, Collection<Integer> orgunitIds,
-        Date startDate, Date endDate, int status )
-    {
-        Criteria criteria = getStatisticalProgramStageCriteria( programStage, orgunitIds, startDate, endDate, status );
-
-        Number rs = (Number) criteria.setProjection( Projections.rowCount() ).uniqueResult();
-
-        return rs != null ? rs.intValue() : 0;
-    }
-
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public List<ProgramStageInstance> getStatisticalProgramStageDetailsReport( ProgramStage programStage,
-        Collection<Integer> orgunitIds, Date startDate, Date endDate, int status, Integer min, Integer max )
-    {
-        Criteria criteria = getStatisticalProgramStageCriteria( programStage, orgunitIds, startDate, endDate, status );
-
-        if ( min != null && max != null )
-        {
-            criteria.setFirstResult( min );
-            criteria.setMaxResults( max );
-        }
-
-        return criteria.list();
-    }
-
-    @Override
     public int getOverDueCount( ProgramStage programStage, Collection<Integer> orgunitIds, Date startDate, Date endDate )
     {
         Calendar yesterday = Calendar.getInstance();
@@ -255,23 +191,6 @@
     }
 
     @Override
-    @SuppressWarnings( "unchecked" )
-    public Collection<ProgramStageInstance> get( Program program, Collection<Integer> orgunitIds, Date startDate,
-        Date endDate, Boolean completed )
-    {
-        return getCriteria( program, orgunitIds, startDate, endDate, completed ).list();
-    }
-
-    @Override
-    public int count( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate, Boolean completed )
-    {
-        Number rs = (Number) getCriteria( program, orgunitIds, startDate, endDate, completed ).setProjection(
-            Projections.rowCount() ).uniqueResult();
-
-        return rs != null ? rs.intValue() : 0;
-    }
-
-    @Override
     public int count( ProgramStage programStage, Collection<Integer> orgunitIds, Date startDate, Date endDate,
         Boolean completed )
     {
@@ -315,46 +234,38 @@
 
         return grid;
     }
-
-    // -------------------------------------------------------------------------
-    // Supportive methods
-    // -------------------------------------------------------------------------
-
-    private Criteria getCriteria( Program program, Collection<Integer> orgunitIds, Date startDate, Date endDate,
-        Boolean completed )
+    
+    @Override
+    public int averageNumberCompleted( Program program, Collection<Integer> orgunitIds, Date after, Date before,
+        int status )
     {
+        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstancesByStatus(
+            ProgramInstance.STATUS_COMPLETED, program, orgunitIds, after, before );
+        
         Criteria criteria = getCriteria();
         criteria.createAlias( "programInstance", "programInstance" );
+        criteria.createAlias( "programStage", "programStage" );
+        criteria.createAlias( "programInstance.entityInstance", "entityInstance" );
         criteria.add( Restrictions.eq( "programInstance.program", program ) );
-
-        if ( completed == null )
-        {
-            criteria.add( Restrictions.between( "programInstance.enrollmentDate", startDate, endDate ) );
-        }
-        else
-        {
-            if ( completed )
-            {
-                criteria.add( Restrictions.and( Restrictions.eq( "completed", true ),
-                    Restrictions.between( "executionDate", startDate, endDate ),
-                    Restrictions.in( "organisationUnit.id", orgunitIds ) ) );
-            }
-            else
-            {
-                criteria.createAlias( "programInstance.entityInstance", "entityInstance" );
-                criteria.createAlias( "entityInstance.organisationUnit", "regOrgunit" );
-                criteria.add( Restrictions.or( Restrictions.and( Restrictions.isNull( "executionDate" ),
-                    Restrictions.between( "dueDate", startDate, endDate ),
-                    Restrictions.in( "regOrgunit.id", orgunitIds ) ), Restrictions.and(
-                    Restrictions.eq( "completed", false ), Restrictions.isNotNull( "executionDate" ),
-                    Restrictions.between( "executionDate", startDate, endDate ),
-                    Restrictions.in( "organisationUnit.id", orgunitIds ) ) ) );
-            }
-        }
-
-        return criteria;
+        criteria.add( Restrictions.eq( "programInstance.status", status ) );
+        criteria.add( Restrictions.in( "organisationUnit.id", orgunitIds ) );
+        criteria.add( Restrictions.between( "programInstance.endDate", after, before ) );
+        criteria.add( Restrictions.eq( "completed", true ) );
+        
+        if ( programInstances != null && programInstances.size() > 0 )
+        {
+            criteria.add( Restrictions.not( Restrictions.in( "programInstance", programInstances ) ) );
+        }
+        
+        Number rs = (Number) criteria.setProjection( Projections.rowCount() ).uniqueResult();
+        
+        return rs != null ? rs.intValue() : 0;
     }
 
+    // -------------------------------------------------------------------------
+    // Supportive methods
+    // -------------------------------------------------------------------------
+
     private Criteria getCriteria( ProgramStage programStage, Collection<Integer> orgunitIds, Date startDate,
         Date endDate, Boolean completed )
     {
@@ -401,87 +312,6 @@
         return criteria;
     }
 
-    private Criteria getStatisticalProgramStageCriteria( ProgramStage programStage, Collection<Integer> orgunitIds,
-        Date startDate, Date endDate, int status )
-    {
-        Criteria criteria = getCriteria( Restrictions.eq( "programStage", programStage ),
-            Restrictions.isNull( "programInstance.endDate" ) );
-        
-        criteria.createAlias( "programInstance", "programInstance" );
-        criteria.createAlias( "programInstance.entityInstance", "entityInstance" );
-        criteria.createAlias( "entityInstance.organisationUnit", "regOrgunit" );
-        criteria.add( Restrictions.in( "regOrgunit.id", orgunitIds ) );
-
-        switch ( status )
-        {
-            case ProgramStageInstance.COMPLETED_STATUS:
-                criteria.add( Restrictions.eq( "completed", true ) );
-                criteria.add( Restrictions.between( "executionDate", startDate, endDate ) );
-                break;
-            case ProgramStageInstance.VISITED_STATUS:
-                criteria.add( Restrictions.eq( "completed", false ) );
-                criteria.add( Restrictions.between( "executionDate", startDate, endDate ) );
-                break;
-            case ProgramStageInstance.FUTURE_VISIT_STATUS:
-                criteria.add( Restrictions.between( "programInstance.enrollmentDate", startDate, endDate ) );
-                criteria.add( Restrictions.isNull( "executionDate" ) );
-                criteria.add( Restrictions.ge( "dueDate", new Date() ) );
-                break;
-            case ProgramStageInstance.LATE_VISIT_STATUS:
-                criteria.add( Restrictions.between( "programInstance.enrollmentDate", startDate, endDate ) );
-                criteria.add( Restrictions.isNull( "executionDate" ) );
-                criteria.add( Restrictions.lt( "dueDate", new Date() ) );
-                break;
-            default:
-                break;
-        }
-
-        return criteria;
-    }
-
-    @Override
-    public int averageNumberCompleted( Program program, Collection<Integer> orgunitIds, Date after, Date before,
-        int status )
-    {
-        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstancesByStatus(
-            ProgramInstance.STATUS_COMPLETED, program, orgunitIds, after, before );
-        
-        Criteria criteria = getCriteria();
-        criteria.createAlias( "programInstance", "programInstance" );
-        criteria.createAlias( "programStage", "programStage" );
-        criteria.createAlias( "programInstance.entityInstance", "entityInstance" );
-        criteria.add( Restrictions.eq( "programInstance.program", program ) );
-        criteria.add( Restrictions.eq( "programInstance.status", status ) );
-        criteria.add( Restrictions.in( "organisationUnit.id", orgunitIds ) );
-        criteria.add( Restrictions.between( "programInstance.endDate", after, before ) );
-        criteria.add( Restrictions.eq( "completed", true ) );
-        
-        if ( programInstances != null && programInstances.size() > 0 )
-        {
-            criteria.add( Restrictions.not( Restrictions.in( "programInstance", programInstances ) ) );
-        }
-        
-        Number rs = (Number) criteria.setProjection( Projections.rowCount() ).uniqueResult();
-        
-        return rs != null ? rs.intValue() : 0;
-    }
-
-    @SuppressWarnings( "unchecked" )
-    public Collection<Integer> getOrgunitIds( Date startDate, Date endDate )
-    {
-        Criteria criteria = getCriteria();
-        criteria.add( Restrictions.between( "executionDate", startDate, endDate ) );
-        criteria.createAlias( "organisationUnit", "orgunit" );
-        criteria.setProjection( Projections.distinct( Projections.projectionList().add(
-            Projections.property( "orgunit.id" ), "orgunitid" ) ) );
-        
-        return criteria.list();
-    }
-
-    // ---------------------------------------------------------------------
-    // Supportive methods
-    // ---------------------------------------------------------------------
-
     //TODO this must be re-written
     
     private String sendMessageToTrackedEntityInstanceSql()

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/DefaultRelationshipService.java	2014-05-16 15:26:10 +0000
@@ -61,11 +61,6 @@
         relationshipStore.delete( relationship );
     }
 
-    public Collection<Relationship> getAllRelationships()
-    {
-        return relationshipStore.getAll();
-    }
-
     public Relationship getRelationship( int id )
     {
         return relationshipStore.get( id );
@@ -86,23 +81,16 @@
         relationshipStore.update( relationship );
     }
 
-    public Collection<Relationship> getRelationshipsByRelationshipType( RelationshipType relationshipType )
-    {
-        return relationshipStore.getByRelationshipType( relationshipType );
-    }
-
-    public Collection<Relationship> getRelationships( TrackedEntityInstance instanceA, RelationshipType relationshipType )
-    {
-        return relationshipStore.get( instanceA, relationshipType );
-    }
-
     public Relationship getRelationship( TrackedEntityInstance instanceA, TrackedEntityInstance instanceB, RelationshipType relationshipType )
     {
         return relationshipStore.get( instanceA, instanceB, relationshipType );
     }
-    
-    public Relationship getRelationship( TrackedEntityInstance instanceA, TrackedEntityInstance instanceB )
+
+    @Override
+    public Collection<Relationship> getRelationships( TrackedEntityInstance entityInstanceA,
+        RelationshipType relationshipType )
     {
-        return relationshipStore.get( instanceA, instanceB );
+        // TODO Auto-generated method stub
+        return null;
     }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/RelationshipDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/RelationshipDeletionHandler.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/RelationshipDeletionHandler.java	2014-05-16 15:26:10 +0000
@@ -76,17 +76,5 @@
             }
         }
     }
-
-    @Override
-    public void deleteRelationshipType( RelationshipType relationshipType )
-    {
-        Collection<Relationship> relationships = relationshipSevice
-            .getRelationshipsByRelationshipType( relationshipType );
-
-        for ( Relationship relationship : relationships )
-        {
-            relationshipSevice.deleteRelationship( relationship );
-        }
-    }
-
+    
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/hibernate/HibernateRelationshipStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/hibernate/HibernateRelationshipStore.java	2014-05-09 15:49:36 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/relationship/hibernate/HibernateRelationshipStore.java	2014-05-16 15:26:10 +0000
@@ -75,10 +75,4 @@
             Restrictions.eq( "entityInstanceB", entityInstanceB ), 
             Restrictions.eq( "relationshipType", relationshipType ) ).uniqueResult();
     }
-    
-    public Relationship get( TrackedEntityInstance entityInstanceA, TrackedEntityInstance entityInstanceB )
-    {
-        return (Relationship) getCriteria( Restrictions.eq( "entityInstanceA", entityInstanceA ),
-            Restrictions.eq( "entityInstanceB", entityInstanceB ) ).uniqueResult();
-    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeGroupService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeGroupService.java	2014-05-09 15:49:36 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeGroupService.java	2014-05-16 15:26:10 +0000
@@ -28,16 +28,14 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import static org.hisp.dhis.i18n.I18nUtils.i18n;
+
+import java.util.Collection;
+
 import org.hisp.dhis.common.GenericIdentifiableObjectStore;
 import org.hisp.dhis.i18n.I18nService;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import static org.hisp.dhis.i18n.I18nUtils.i18n;
-
 /**
  * @author Chau Thu Tran
  * @version $Id$
@@ -111,19 +109,13 @@
     }
 
     @Override
-    public List<TrackedEntityAttribute> getTrackedEntityAttributes( TrackedEntityAttributeGroup attributeGroup )
-    {
-        return new ArrayList<TrackedEntityAttribute>( i18n( i18nService, attributeGroup.getAttributes() ) );
-    }
-
-    @Override
     public Integer getTrackedEntityAttributeGroupCountByName( String name )
     {
         return attributeGroupStore.getCountLikeName( name );
     }
 
     @Override
-    public Collection<? extends TrackedEntityAttributeGroup> getTrackedEntityAttributeGroupsBetweenByName( String name, int min, int max )
+    public Collection<TrackedEntityAttributeGroup> getTrackedEntityAttributeGroupsBetweenByName( String name, int min, int max )
     {
         return attributeGroupStore.getAllLikeNameOrderedName( name, min, max );
     }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java	2014-05-14 13:37:02 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.java	2014-05-16 15:26:10 +0000
@@ -89,11 +89,6 @@
         attributeStore.update( attribute );
     }
 
-    public Collection<TrackedEntityAttribute> getTrackedEntityAttributesByValueType( String valueType )
-    {
-        return attributeStore.getByValueType( valueType );
-    }
-
     public TrackedEntityAttribute getTrackedEntityAttributeByName( String name )
     {
         return attributeStore.getByName( name );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAuditService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAuditService.java	2014-03-27 23:40:38 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityAuditService.java	2014-05-16 15:26:10 +0000
@@ -80,12 +80,6 @@
     }
 
     @Override
-    public Collection<TrackedEntityAudit> getAllTrackedEntityAudit()
-    {
-        return auditStore.getAll();
-    }
-
-    @Override
     public Collection<TrackedEntityAudit> getTrackedEntityAudits( TrackedEntityInstance instance )
     {
         return auditStore.get( instance );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-05-16 13:32:48 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/DefaultTrackedEntityInstanceService.java	2014-05-16 15:26:10 +0000
@@ -36,7 +36,6 @@
 import static org.hisp.dhis.trackedentity.TrackedEntityInstanceQueryParams.TRACKED_ENTITY_ID;
 import static org.hisp.dhis.trackedentity.TrackedEntityInstanceQueryParams.TRACKED_ENTITY_INSTANCE_ID;
 
-import java.lang.reflect.Type;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
@@ -45,7 +44,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import org.apache.commons.lang.StringUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.DimensionalObjectUtils;
@@ -590,49 +588,7 @@
 
         return instance.getRepresentative() == null || !(instance.getRepresentative().getUid() == representativeId);
     }
-
-    @Override
-    public Collection<TrackedEntityInstance> getTrackedEntityInstances( OrganisationUnit organisationUnit,
-        Program program, Integer min, Integer max )
-    {
-        return trackedEntityInstanceStore.getByOrgUnitProgram( organisationUnit, program, min, max );
-    }
-
-    @Override
-    public Object getObjectValue( String property, String value, I18nFormat format )
-    {
-        try
-        {
-            Type type = TrackedEntityInstance.class.getMethod( "get" + StringUtils.capitalize( property ) )
-                .getReturnType();
-
-            if ( type == Integer.class || type == Integer.TYPE )
-            {
-                return Integer.valueOf( value );
-            }
-            else if ( type.equals( Boolean.class ) || type == Boolean.TYPE )
-            {
-                return Boolean.valueOf( value );
-            }
-            else if ( type.equals( Date.class ) )
-            {
-                return format.parseDate( value.trim() );
-            }
-            else if ( type.equals( Character.class ) || type == Character.TYPE )
-            {
-                return Character.valueOf( value.charAt( 0 ) );
-            }
-
-            return value;
-        }
-        catch ( Exception ex )
-        {
-            ex.printStackTrace();
-        }
-
-        return null;
-    }
-
+    
     @Override
     public Collection<TrackedEntityInstance> getRepresentatives( TrackedEntityInstance instance )
     {

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityAttributeStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityAttributeStore.java	2014-05-14 13:37:02 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityAttributeStore.java	2014-05-16 15:26:10 +0000
@@ -48,13 +48,6 @@
 
     @Override
     @SuppressWarnings( "unchecked" )
-    public Collection<TrackedEntityAttribute> getByValueType( String valueType )
-    {
-        return getCriteria( Restrictions.eq( "valueType", valueType ) ).list();
-    }
-
-    @Override
-    @SuppressWarnings( "unchecked" )
     public Collection<TrackedEntityAttribute> getOptionalAttributesWithoutGroup()
     {
         return getCriteria( Restrictions.isNull( "attributeGroup" ) ).list();

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2014-05-07 09:33:33 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/hibernate/HibernateTrackedEntityInstanceStore.java	2014-05-16 15:26:10 +0000
@@ -415,23 +415,6 @@
 
     @Override
     @SuppressWarnings( "unchecked" )
-    public Collection<TrackedEntityInstance> getByOrgUnitProgram( OrganisationUnit organisationUnit, Program program,
-        Integer min, Integer max )
-    {
-        String hql = "select pt from TrackedEntityInstance pt inner join pt.programInstances pi "
-            + "where pt.organisationUnit = :organisationUnit " + "and pi.program = :program "
-            + "and pi.status = :status";
-
-        Query query = getQuery( hql );
-        query.setEntity( "organisationUnit", organisationUnit );
-        query.setEntity( "program", program );
-        query.setInteger( "status", ProgramInstance.STATUS_ACTIVE );
-
-        return query.list();
-    }
-
-    @Override
-    @SuppressWarnings( "unchecked" )
     public Collection<TrackedEntityInstance> getRepresentatives( TrackedEntityInstance instance )
     {
         String hql = "select distinct p from TrackedEntityInstance p where p.representative = :representative order by p.id DESC";

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java	2014-05-14 15:14:18 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentity/startup/TableAlteror.java	2014-05-16 15:26:10 +0000
@@ -30,8 +30,6 @@
 
 import java.sql.ResultSet;
 import java.sql.Statement;
-import java.util.Collection;
-import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.amplecode.quick.StatementHolder;
@@ -39,13 +37,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.hisp.dhis.common.CodeGenerator;
-import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.dataentryform.DataEntryForm;
-import org.hisp.dhis.dataentryform.DataEntryFormService;
 import org.hisp.dhis.jdbc.StatementBuilder;
-import org.hisp.dhis.program.ProgramStage;
-import org.hisp.dhis.program.ProgramStageService;
 import org.hisp.dhis.system.startup.AbstractStartupRoutine;
 import org.hisp.dhis.system.util.ValidationUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -77,27 +69,6 @@
         this.statementManager = statementManager;
     }
 
-    private ProgramStageService programStageService;
-
-    public void setProgramStageService( ProgramStageService programStageService )
-    {
-        this.programStageService = programStageService;
-    }
-
-    private DataElementService dataElementService;
-
-    public void setDataElementService( DataElementService dataElementService )
-    {
-        this.dataElementService = dataElementService;
-    }
-
-    private DataEntryFormService dataEntryFormService;
-
-    public void setDataEntryFormService( DataEntryFormService dataEntryFormService )
-    {
-        this.dataEntryFormService = dataEntryFormService;
-    }
-
     @Autowired
     private JdbcTemplate jdbcTemplate;
 
@@ -184,8 +155,6 @@
         executeSql( "update program set remindCompleted=false where remindCompleted is null" );
         executeSql( "UPDATE programinstance SET followup=false where followup is null" );
 
-        updateUidInDataEntryFrom();
-
         updateProgramInstanceStatus();
 
         executeSql( "ALTER TABLE program DROP COLUMN disableRegistrationFields" );
@@ -301,75 +270,6 @@
     // Supporting methods
     // -------------------------------------------------------------------------
 
-    private void updateUidInDataEntryFrom()
-    {
-        Collection<ProgramStage> programStages = programStageService.getAllProgramStages();
-
-        for ( ProgramStage programStage : programStages )
-        {
-            DataEntryForm dataEntryForm = programStage.getDataEntryForm();
-            if ( dataEntryForm != null && dataEntryForm.getFormat() != DataEntryForm.CURRENT_FORMAT )
-            {
-                String programStageUid = programStage.getUid();
-                String htmlCode = programStage.getDataEntryForm().getHtmlCode();
-
-                // ---------------------------------------------------------------------
-                // Metadata code to add to HTML before outputting
-                // ---------------------------------------------------------------------
-
-                StringBuffer sb = new StringBuffer();
-
-                // ---------------------------------------------------------------------
-                // Pattern to match data elements in the HTML code
-                // ---------------------------------------------------------------------
-
-                Matcher inputMatcher = INPUT_PATTERN.matcher( htmlCode );
-
-                // ---------------------------------------------------------------------
-                // Iterate through all matching data element fields
-                // ---------------------------------------------------------------------
-
-                while ( inputMatcher.find() )
-                {
-                    String inputHTML = inputMatcher.group();
-
-                    // -----------------------------------------------------------------
-                    // Get HTML input field code
-                    // -----------------------------------------------------------------
-
-                    String dataElementCode = inputMatcher.group( 1 );
-
-                    Matcher identifierMatcher = IDENTIFIER_PATTERN_FIELD.matcher( dataElementCode );
-
-                    if ( identifierMatcher.find() && identifierMatcher.groupCount() > 0 )
-                    {
-                        // -------------------------------------------------------------
-                        // Get data element ID of data element
-                        // -------------------------------------------------------------
-
-                        int dataElementId = Integer.parseInt( identifierMatcher.group( 2 ) );
-                        DataElement dataElement = dataElementService.getDataElement( dataElementId );
-
-                        if ( dataElement != null )
-                        {
-                            inputHTML = inputHTML.replaceFirst( identifierMatcher.group( 1 ), programStageUid );
-                            inputHTML = inputHTML.replaceFirst( identifierMatcher.group( 2 ), dataElement.getUid() );
-                            inputMatcher.appendReplacement( sb, inputHTML );
-                        }
-
-                    }
-                }
-
-                inputMatcher.appendTail( sb );
-
-                htmlCode = (sb.toString().isEmpty()) ? htmlCode : sb.toString();
-                dataEntryForm.setHtmlCode( htmlCode );
-                dataEntryForm.setFormat( DataEntryForm.CURRENT_FORMAT );
-                dataEntryFormService.updateDataEntryForm( dataEntryForm );
-            }
-        }
-    }
-
     private void updateProgramInstanceStatus()
     {
         // Set active status for events

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentityattributevalue/DefaultTrackedEntityAttributeValueService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentityattributevalue/DefaultTrackedEntityAttributeValueService.java	2014-03-19 06:44:30 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentityattributevalue/DefaultTrackedEntityAttributeValueService.java	2014-05-16 15:26:10 +0000
@@ -29,10 +29,6 @@
  */
 
 import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
 
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
@@ -68,24 +64,6 @@
     }
 
     @Override
-    public int deleteTrackedEntityAttributeValue( TrackedEntityInstance instance )
-    {
-        return attributeValueStore.deleteByTrackedEntityInstance( instance );
-    }
-
-    @Override
-    public int deleteTrackedEntityAttributeValue( TrackedEntityAttribute attribute )
-    {
-        return attributeValueStore.deleteByAttribute( attribute );
-    }
-
-    @Override
-    public Collection<TrackedEntityAttributeValue> getAllTrackedEntityAttributeValues()
-    {
-        return attributeValueStore.getAll();
-    }
-
-    @Override
     public TrackedEntityAttributeValue getTrackedEntityAttributeValue( TrackedEntityInstance instance,
         TrackedEntityAttribute attribute )
     {
@@ -136,59 +114,6 @@
     }
 
     @Override
-    public Map<Integer, Collection<TrackedEntityAttributeValue>> getAttributeValueMapForAttributeValues(
-        Collection<TrackedEntityInstance> instances )
-    {
-        Map<Integer, Collection<TrackedEntityAttributeValue>> attributeValueMap = new HashMap<Integer, Collection<TrackedEntityAttributeValue>>();
-
-        Collection<TrackedEntityAttributeValue> attributeValues = getTrackedEntityAttributeValues( instances );
-
-        if ( attributeValues != null )
-        {
-            for ( TrackedEntityAttributeValue attributeValue : attributeValues )
-            {
-                if ( attributeValueMap.containsKey( attributeValue.getEntityInstance().getId() ) )
-                {
-                    Collection<TrackedEntityAttributeValue> values = attributeValueMap.get( attributeValue
-                        .getEntityInstance().getId() );
-                    values.add( attributeValue );
-                }
-                else
-                {
-                    Set<TrackedEntityAttributeValue> values = new HashSet<TrackedEntityAttributeValue>();
-                    values.add( attributeValue );
-                    attributeValueMap.put( attributeValue.getEntityInstance().getId(), values );
-                }
-            }
-
-        }
-
-        return attributeValueMap;
-    }
-
-    @Override
-    public Map<Integer, TrackedEntityAttributeValue> getAttributeValueMapForAttributeValues(
-        Collection<TrackedEntityInstance> entityInstances, TrackedEntityAttribute attribute )
-    {
-        Map<Integer, TrackedEntityAttributeValue> attributeValueMap = new HashMap<Integer, TrackedEntityAttributeValue>();
-
-        Collection<TrackedEntityAttributeValue> attributeValues = getTrackedEntityAttributeValues( entityInstances );
-
-        if ( attributeValues != null )
-        {
-            for ( TrackedEntityAttributeValue attributeValue : attributeValues )
-            {
-                if ( attributeValue.getAttribute() == attribute )
-                {
-                    attributeValueMap.put( attributeValue.getEntityInstance().getId(), attributeValue );
-                }
-            }
-        }
-
-        return attributeValueMap;
-    }
-
-    @Override
     public Collection<TrackedEntityAttributeValue> searchTrackedEntityAttributeValue( TrackedEntityAttribute attribute,
         String searchText )
     {
@@ -198,7 +123,7 @@
     @Override
     public void copyTrackedEntityAttributeValues( TrackedEntityInstance source, TrackedEntityInstance destination )
     {
-        deleteTrackedEntityAttributeValue( destination );
+        attributeValueStore.deleteByTrackedEntityInstance( destination );
 
         for ( TrackedEntityAttributeValue attributeValue : getTrackedEntityAttributeValues( source ) )
         {

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentityattributevalue/hibernate/HibernateTrackedEntityAttributeValueStore.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentityattributevalue/hibernate/HibernateTrackedEntityAttributeValueStore.java	2014-05-14 14:05:57 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentityattributevalue/hibernate/HibernateTrackedEntityAttributeValueStore.java	2014-05-16 15:26:10 +0000
@@ -60,14 +60,6 @@
     }
 
     @Override
-    public int deleteByAttribute( TrackedEntityAttribute attribute )
-    {
-        Query query = getQuery( "delete from TrackedEntityAttributeValue where attribute = :attribute" );
-        query.setEntity( "attribute", attribute );
-        return query.executeUpdate();
-    }
-
-    @Override
     public int deleteByTrackedEntityInstance( TrackedEntityInstance entityInstance )
     {
         Query query = getQuery( "delete from TrackedEntityAttributeValue where entityInstance = :entityInstance" );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentitycomment/DefaultTrackedEntityCommentService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentitycomment/DefaultTrackedEntityCommentService.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentitycomment/DefaultTrackedEntityCommentService.java	2014-05-16 15:26:10 +0000
@@ -28,11 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
-
 import org.hisp.dhis.common.GenericStore;
-import org.hisp.dhis.trackedentitycomment.TrackedEntityComment;
-import org.hisp.dhis.trackedentitycomment.TrackedEntityCommentService;
 
 /**
  * @author Chau Thu Tran
@@ -81,9 +77,4 @@
         return commentStore.get( id );
     }
 
-    @Override
-    public Collection<TrackedEntityComment> getAllTrackedEntityComments()
-    {
-        return commentStore.getAll();
-    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentitydatavalue/DefaultTrackedEntityDataValueService.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentitydatavalue/DefaultTrackedEntityDataValueService.java	2014-05-14 14:05:57 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/trackedentitydatavalue/DefaultTrackedEntityDataValueService.java	2014-05-16 15:26:10 +0000
@@ -91,11 +91,6 @@
         }
     }
 
-    public Collection<TrackedEntityDataValue> getAllTrackedEntityDataValues()
-    {
-        return dataValueStore.getAll();
-    }
-
     public Collection<TrackedEntityDataValue> getTrackedEntityDataValues( ProgramStageInstance programStageInstance )
     {
         return dataValueStore.get( programStageInstance );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-tracker/src/main/resources/META-INF/dhis/beans.xml	2014-05-16 08:12:25 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/main/resources/META-INF/dhis/beans.xml	2014-05-16 15:26:10 +0000
@@ -204,7 +204,6 @@
 			ref="org.hisp.dhis.program.ProgramStageInstanceService" />
 		<property name="i18nManager" ref="org.hisp.dhis.i18n.I18nManager" />
 		<property name="trackedEntityInstanceService" ref="org.hisp.dhis.trackedentity.TrackedEntityInstanceService" />
-		<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
 	</bean>
 
 	<bean id="org.hisp.dhis.program.ProgramStageService" class="org.hisp.dhis.program.DefaultProgramStageService">
@@ -225,8 +224,6 @@
 
 	<bean id="org.hisp.dhis.program.ProgramValidationService" class="org.hisp.dhis.program.DefaultProgramValidationService">
 		<property name="validationStore" ref="org.hisp.dhis.program.ProgramValidationStore" />
-		<property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
-		<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
 		<property name="expressionService"
 			ref="org.hisp.dhis.program.ProgramExpressionService" />
 		<property name="dataValueService"
@@ -362,10 +359,6 @@
 		<property name="name" value="TrackedEntityTableAlteror" />
 		<property name="runlevel" value="4" />
 		<property name="skipInTests" value="true" />
-		<property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
-		<property name="dataElementService" ref="org.hisp.dhis.dataelement.DataElementService" />
-		<property name="dataEntryFormService"
-			ref="org.hisp.dhis.dataentryform.DataEntryFormService" />
 	</bean>
 
 	<bean id="org.hisp.dhis.common.TrackerIdentityPopulator" class="org.hisp.dhis.common.IdentityPopulator">

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramExpressionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramExpressionServiceTest.java	2014-03-26 14:01:14 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramExpressionServiceTest.java	2014-05-16 15:26:10 +0000
@@ -31,7 +31,6 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
 
 import java.util.Date;
 import java.util.HashMap;
@@ -204,15 +203,6 @@
     }
 
     @Test
-    public void tesGetAllProgramExpressions()
-    {
-        programExpressionService.addProgramExpression( programExpressionA );
-        programExpressionService.addProgramExpression( programExpressionB );
-
-        assertTrue( equals( programExpressionService.getAllProgramExpressions(), programExpressionA, programExpressionB ) );
-    }
-
-    @Test
     public void tesGetProgramExpressionValue()
     {
         programExpressionService.addProgramExpression( programExpressionA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java	2014-03-26 14:01:14 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramInstanceServiceTest.java	2014-05-16 15:26:10 +0000
@@ -40,20 +40,14 @@
 import java.util.Set;
 
 import org.hisp.dhis.DhisSpringTest;
-import org.hisp.dhis.message.MessageConversation;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
 import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.sms.config.BulkSmsGatewayConfig;
-import org.hisp.dhis.sms.config.SmsConfiguration;
 import org.hisp.dhis.sms.config.SmsConfigurationManager;
-import org.hisp.dhis.sms.outbound.OutboundSms;
-import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
 import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 import org.hisp.dhis.trackedentity.TrackedEntityInstanceReminder;
 import org.hisp.dhis.trackedentity.TrackedEntityInstanceService;
-import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue;
 import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValueService;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -264,38 +258,6 @@
     }
 
     @Test
-    public void testGetAllProgramInstances()
-    {
-        programInstanceService.addProgramInstance( programInstanceA );
-        programInstanceService.addProgramInstance( programInstanceB );
-
-        assertTrue( equals( programInstanceService.getAllProgramInstances(), programInstanceA, programInstanceB ) );
-    }
-
-    @Test
-    public void testGetProgramInstancesByStatus()
-    {
-        programInstanceService.addProgramInstance( programInstanceA );
-        programInstanceService.addProgramInstance( programInstanceB );
-        programInstanceService.addProgramInstance( programInstanceC );
-        programInstanceService.addProgramInstance( programInstanceD );
-
-        Collection<ProgramInstance> programInstances = programInstanceService
-            .getProgramInstances( ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 2, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-        assertTrue( programInstances.contains( programInstanceD ) );
-
-        programInstances = programInstanceService.getProgramInstances( ProgramInstance.STATUS_CANCELLED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceB ) );
-
-        programInstances = programInstanceService.getProgramInstances( ProgramInstance.STATUS_COMPLETED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceC ) );
-    }
-
-    @Test
     public void testGetProgramInstancesByProgram()
     {
         programInstanceService.addProgramInstance( programInstanceA );
@@ -332,111 +294,6 @@
     }
 
     @Test
-    public void testGetProgramInstancesByOuProgramList()
-    {
-        programInstanceService.addProgramInstance( programInstanceA );
-        programInstanceService.addProgramInstance( programInstanceB );
-        programInstanceService.addProgramInstance( programInstanceC );
-        programInstanceService.addProgramInstance( programInstanceD );
-
-        Collection<Program> programs = new HashSet<Program>();
-        programs.add( programA );
-        programs.add( programB );
-
-        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( programs,
-            organisationUnitA );
-        assertEquals( 2, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-        assertTrue( programInstances.contains( programInstanceB ) );
-
-        programInstances = programInstanceService.getProgramInstances( programs, organisationUnitB );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceD ) );
-    }
-
-    @Test
-    public void testGetProgramInstancesByOuProgramListStatus()
-    {
-        programInstanceService.addProgramInstance( programInstanceA );
-        programInstanceService.addProgramInstance( programInstanceB );
-        programInstanceService.addProgramInstance( programInstanceC );
-
-        Collection<Program> programs = new HashSet<Program>();
-        programs.add( programA );
-        programs.add( programB );
-        programs.add( programC );
-
-        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( programs,
-            organisationUnitA, ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-
-        programInstances = programInstanceService.getProgramInstances( programs, organisationUnitA,
-            ProgramInstance.STATUS_COMPLETED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceC ) );
-
-    }
-
-    @Test
-    public void testGetProgramInstancesByProgramStatus()
-    {
-        programInstanceService.addProgramInstance( programInstanceA );
-        programInstanceService.addProgramInstance( programInstanceB );
-        programInstanceService.addProgramInstance( programInstanceC );
-        programInstanceService.addProgramInstance( programInstanceD );
-
-        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( programA,
-            ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 2, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-        assertTrue( programInstances.contains( programInstanceD ) );
-
-        programInstances = programInstanceService.getProgramInstances( programB, ProgramInstance.STATUS_CANCELLED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceB ) );
-
-        programInstances = programInstanceService.getProgramInstances( programC, ProgramInstance.STATUS_COMPLETED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceC ) );
-    }
-
-    @Test
-    public void testGetProgramInstancesByProgramListStatus()
-    {
-        programInstanceService.addProgramInstance( programInstanceA );
-        programInstanceService.addProgramInstance( programInstanceB );
-        programInstanceService.addProgramInstance( programInstanceC );
-        programInstanceService.addProgramInstance( programInstanceD );
-
-        Collection<Program> programs = new HashSet<Program>();
-        programs.add( programA );
-        programs.add( programB );
-
-        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( programs,
-            ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 2, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-        assertTrue( programInstances.contains( programInstanceD ) );
-    }
-
-    @Test
-    public void testGetProgramInstancesByEntityInstanceStatus()
-    {
-        programInstanceService.addProgramInstance( programInstanceA );
-        programInstanceService.addProgramInstance( programInstanceD );
-
-        Collection<Program> programs = new HashSet<Program>();
-        programs.add( programA );
-        programs.add( programB );
-
-        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( entityInstanceA,
-            ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-    }
-
-    @Test
     public void testGetProgramInstancesByEntityInstanceProgram()
     {
         programInstanceService.addProgramInstance( programInstanceA );
@@ -494,18 +351,6 @@
     }
 
     @Test
-    public void testGetProgramInstancesbyProgramOuPeriod()
-    {
-        programInstanceService.addProgramInstance( programInstanceA );
-        programInstanceService.addProgramInstance( programInstanceD );
-
-        Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( programA,
-            organisationUnitA, incidenDate, enrollmentDate );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-    }
-
-    @Test
     public void testGetProgramInstancesByOuListProgramPeriod()
     {
         programInstanceService.addProgramInstance( programInstanceA );
@@ -557,42 +402,6 @@
     }
 
     @Test
-    public void testSendMessages()
-    {
-        TrackedEntityAttribute attribute = createTrackedEntityAttribute( 'A' );
-        attribute.setValueType( TrackedEntityAttribute.TYPE_PHONE_NUMBER );
-        attributeService.addTrackedEntityAttribute( attribute );
-
-        TrackedEntityAttributeValue attributeValue = createTrackedEntityAttributeValue( 'A', entityInstanceA, attribute );
-        attributeValue.setValue( "123456789" );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValue );
-
-        entityInstanceA.getAttributeValues().add( attributeValue );
-        entityInstanceService.updateTrackedEntityInstance( entityInstanceA );
-
-        programInstanceService.addProgramInstance( programInstanceA );
-        Collection<OutboundSms> outboundSmsList = programInstanceService.sendMessages( programInstanceA,
-            TrackedEntityInstanceReminder.SEND_WHEN_TO_C0MPLETED_EVENT );
-        assertEquals( 1, outboundSmsList.size() );
-        assertEquals( "Test program message template", outboundSmsList.iterator().next().getMessage() );
-    }
-
-    @Test
-    public void testSendMessageConversations()
-    {
-        this.createSMSConfiguration();
-        SmsConfiguration smsConfiguration = new SmsConfiguration();
-        smsConfiguration.setEnabled( true );
-
-        programInstanceService.addProgramInstance( programInstanceB );
-
-        Collection<MessageConversation> messages = programInstanceService.sendMessageConversations( programInstanceA,
-            TrackedEntityInstanceReminder.SEND_WHEN_TO_C0MPLETED_EVENT );
-        assertEquals( 1, messages.size() );
-        assertEquals( "Test program message template", messages.iterator().next().getMessages().get( 0 ).getText() );
-    }
-
-    @Test
     public void testEnrollTrackedEntityInstance()
     {
         ProgramInstance programInstance = programInstanceService.enrollTrackedEntityInstance( entityInstanceA, programB, enrollmentDate,
@@ -637,20 +446,4 @@
         assertEquals( ProgramInstance.STATUS_CANCELLED, programInstanceService.getProgramInstance( idD ).getStatus() );
     }
 
-    private void createSMSConfiguration()
-    {
-        BulkSmsGatewayConfig bulkGatewayConfig = new BulkSmsGatewayConfig();
-        bulkGatewayConfig.setName( "bulksms" );
-        bulkGatewayConfig.setPassword( "bulk" );
-        bulkGatewayConfig.setUsername( "bulk" );
-        bulkGatewayConfig.setRegion( "uk" );
-        bulkGatewayConfig.setDefault( true );
-
-        SmsConfiguration smsConfig = new SmsConfiguration();
-        smsConfig.setPollingInterval( 3000 );
-        smsConfig.getGateways().add( bulkGatewayConfig );
-        smsConfig.setEnabled( true );
-        smsConfigurationManager.updateSmsConfiguration( smsConfig );
-
-    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramInstanceStoreTest.java	2014-05-16 15:26:10 +0000
@@ -180,28 +180,6 @@
     }
 
     @Test
-    public void testGetProgramInstancesByStatus()
-    {
-        programInstanceStore.save( programInstanceA );
-        programInstanceStore.save( programInstanceB );
-        programInstanceStore.save( programInstanceC );
-        programInstanceStore.save( programInstanceD );
-
-        Collection<ProgramInstance> programInstances = programInstanceStore.getByStatus( ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 2, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-        assertTrue( programInstances.contains( programInstanceD ) );
-
-        programInstances = programInstanceStore.getByStatus( ProgramInstance.STATUS_CANCELLED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceB ) );
-
-        programInstances = programInstanceStore.getByStatus( ProgramInstance.STATUS_COMPLETED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceC ) );
-    }
-
-    @Test
     public void testGetProgramInstancesByProgram()
     {
         programInstanceStore.save( programInstanceA );
@@ -238,109 +216,6 @@
     }
 
     @Test
-    public void testGetProgramInstancesByOuProgramList()
-    {
-        programInstanceStore.save( programInstanceA );
-        programInstanceStore.save( programInstanceB );
-        programInstanceStore.save( programInstanceC );
-        programInstanceStore.save( programInstanceD );
-
-        Collection<Program> programs = new HashSet<Program>();
-        programs.add( programA );
-        programs.add( programB );
-
-        Collection<ProgramInstance> programInstances = programInstanceStore.get( programs, organisationUnitA );
-        assertEquals( 2, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-        assertTrue( programInstances.contains( programInstanceB ) );
-
-        programInstances = programInstanceStore.get( programs, organisationUnitB );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceD ) );
-    }
-
-    @Test
-    public void testGetProgramInstancesByOuProgramListStatus()
-    {
-        programInstanceStore.save( programInstanceA );
-        programInstanceStore.save( programInstanceB );
-        programInstanceStore.save( programInstanceC );
-
-        Collection<Program> programs = new HashSet<Program>();
-        programs.add( programA );
-        programs.add( programB );
-        programs.add( programC );
-
-        Collection<ProgramInstance> programInstances = programInstanceStore.get( programs, organisationUnitA,
-            ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-
-        programInstances = programInstanceStore.get( programs, organisationUnitA, ProgramInstance.STATUS_COMPLETED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceC ) );
-
-    }
-
-    @Test
-    public void testGetProgramInstancesByProgramStatus()
-    {
-        programInstanceStore.save( programInstanceA );
-        programInstanceStore.save( programInstanceB );
-        programInstanceStore.save( programInstanceC );
-        programInstanceStore.save( programInstanceD );
-
-        Collection<ProgramInstance> programInstances = programInstanceStore.get( programA,
-            ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 2, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-        assertTrue( programInstances.contains( programInstanceD ) );
-
-        programInstances = programInstanceStore.get( programB, ProgramInstance.STATUS_CANCELLED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceB ) );
-
-        programInstances = programInstanceStore.get( programC, ProgramInstance.STATUS_COMPLETED );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceC ) );
-    }
-
-    @Test
-    public void testGetProgramInstancesByProgramListStatus()
-    {
-        programInstanceStore.save( programInstanceA );
-        programInstanceStore.save( programInstanceB );
-        programInstanceStore.save( programInstanceC );
-        programInstanceStore.save( programInstanceD );
-
-        Collection<Program> programs = new HashSet<Program>();
-        programs.add( programA );
-        programs.add( programB );
-
-        Collection<ProgramInstance> programInstances = programInstanceStore.get( programs,
-            ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 2, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-        assertTrue( programInstances.contains( programInstanceD ) );
-    }
-
-    @Test
-    public void testGetProgramInstancesByEntityInstanceStatus()
-    {
-        programInstanceStore.save( programInstanceA );
-        programInstanceStore.save( programInstanceD );
-
-        Collection<Program> programs = new HashSet<Program>();
-        programs.add( programA );
-        programs.add( programB );
-
-        Collection<ProgramInstance> programInstances = programInstanceStore.get( entityInstanceA,
-            ProgramInstance.STATUS_ACTIVE );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-    }
-
-    @Test
     public void testGetProgramInstancesByEntityInstanceProgramStatus()
     {
         programInstanceStore.save( programInstanceA );
@@ -371,18 +246,6 @@
     }
 
     @Test
-    public void testGetProgramInstancesbyProgramOuPeriod()
-    {
-        programInstanceStore.save( programInstanceA );
-        programInstanceStore.save( programInstanceD );
-
-        Collection<ProgramInstance> programInstances = programInstanceStore.get( programA, organisationUnitA,
-            incidenDate, enrollmentDate );
-        assertEquals( 1, programInstances.size() );
-        assertTrue( programInstances.contains( programInstanceA ) );
-    }
-
-    @Test
     public void testGetProgramInstancesByOuListProgramPeriod()
     {
         programInstanceStore.save( programInstanceA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramServiceTest.java	2014-05-16 15:26:10 +0000
@@ -232,25 +232,4 @@
         assertEquals( programA, programService.getProgram( "UID-A" ) );
         assertEquals( programB, programService.getProgram( "UID-B" ) );
     }
-
-    @Test
-    public void testGetProgramsByDisplayOnAllOrgunit()
-    {
-        programA.setDisplayOnAllOrgunit( true );
-        programB.setDisplayOnAllOrgunit( true );
-        programC.setDisplayOnAllOrgunit( false );
-
-        programService.addProgram( programA );
-        programService.addProgram( programB );
-        programService.addProgram( programC );
-
-        Collection<Program> programs = programService.getProgramsByDisplayOnAllOrgunit( true, organisationUnitA );
-        assertEquals( 2, programs.size() );
-        assertTrue( programs.contains( programA ) );
-        assertTrue( programs.contains( programB ) );
-
-        programs = programService.getProgramsByDisplayOnAllOrgunit( false, organisationUnitB );
-        assertEquals( 1, programs.size() );
-        assertTrue( programs.contains( programC ) );
-    }
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageDataElementServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageDataElementServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageDataElementServiceTest.java	2014-05-16 15:26:10 +0000
@@ -187,21 +187,6 @@
     }
 
     @Test
-    public void testGetByStage()
-    {
-        programStageDataElementService.addProgramStageDataElement( stageDataElementA );
-        programStageDataElementService.addProgramStageDataElement( stageDataElementB );
-        programStageDataElementService.addProgramStageDataElement( stageDataElementC );
-        programStageDataElementService.addProgramStageDataElement( stageDataElementD );
-
-        Collection<ProgramStageDataElement> stageDataElements = programStageDataElementService.get( stageA );
-        assertTrue( equals( stageDataElements, stageDataElementA, stageDataElementB ) );
-
-        stageDataElements = programStageDataElementService.get( stageB );
-        assertTrue( equals( stageDataElements, stageDataElementC, stageDataElementD ) );
-    }
-
-    @Test
     public void testGetListDataElementByStage()
     {
         programStageDataElementService.addProgramStageDataElement( stageDataElementA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageDataElementStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageDataElementStoreTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageDataElementStoreTest.java	2014-05-16 15:26:10 +0000
@@ -181,22 +181,7 @@
 
         assertTrue( equals( programStageDataElementStore.getAll(), stageDataElementA, stageDataElementB ) );
     }
-
-    @Test
-    public void testGetByStage()
-    {
-        programStageDataElementStore.save( stageDataElementA );
-        programStageDataElementStore.save( stageDataElementB );
-        programStageDataElementStore.save( stageDataElementC );
-        programStageDataElementStore.save( stageDataElementD );
-
-        Collection<ProgramStageDataElement> stageDataElements = programStageDataElementStore.get( stageA );
-        assertTrue( equals( stageDataElements, stageDataElementA, stageDataElementB ) );
-
-        stageDataElements = programStageDataElementStore.get( stageB );
-        assertTrue( equals( stageDataElements, stageDataElementC, stageDataElementD ) );
-    }
-
+    
     @Test
     public void testGetListDataElementByStage()
     {

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageInstanceServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageInstanceServiceTest.java	2014-05-16 15:26:10 +0000
@@ -45,7 +45,6 @@
 import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.dataelement.DataElement;
 import org.hisp.dhis.dataelement.DataElementService;
-import org.hisp.dhis.message.MessageConversation;
 import org.hisp.dhis.mock.MockI18nFormat;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
@@ -53,10 +52,9 @@
 import org.hisp.dhis.sms.config.BulkSmsGatewayConfig;
 import org.hisp.dhis.sms.config.SmsConfiguration;
 import org.hisp.dhis.sms.config.SmsConfigurationManager;
-import org.hisp.dhis.sms.outbound.OutboundSms;
-import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
 import org.hisp.dhis.trackedentity.TrackedEntityAttributeService;
+import org.hisp.dhis.trackedentity.TrackedEntityInstance;
 import org.hisp.dhis.trackedentity.TrackedEntityInstanceReminder;
 import org.hisp.dhis.trackedentity.TrackedEntityInstanceService;
 import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue;
@@ -109,10 +107,6 @@
 
     private OrganisationUnit organisationUnitB;
 
-    private int orgunitAId;
-
-    private int orgunitBId;
-
     private ProgramStage stageA;
 
     private ProgramStage stageB;
@@ -165,10 +159,10 @@
         mockFormat = new MockI18nFormat();
 
         organisationUnitA = createOrganisationUnit( 'A' );
-        orgunitAId = organisationUnitService.addOrganisationUnit( organisationUnitA );
+        organisationUnitService.addOrganisationUnit( organisationUnitA );
 
         organisationUnitB = createOrganisationUnit( 'B' );
-        orgunitBId = organisationUnitService.addOrganisationUnit( organisationUnitB );
+        organisationUnitService.addOrganisationUnit( organisationUnitB );
 
         entityInstanceA = createTrackedEntityInstance( 'A', organisationUnitA );
         entityInstanceService.addTrackedEntityInstance( entityInstanceA );
@@ -386,19 +380,6 @@
     }
 
     @Test
-    public void testGetProgramStageInstanceListByProgramInstanceStage()
-    {
-        programStageInstanceService.addProgramStageInstance( programStageInstanceD1 );
-        programStageInstanceService.addProgramStageInstance( programStageInstanceD2 );
-
-        Collection<ProgramStageInstance> stageInstances = programStageInstanceService.getProgramStageInstances(
-            programInstanceB, stageD );
-        assertEquals( 2, stageInstances.size() );
-        assertTrue( stageInstances.contains( programStageInstanceD1 ) );
-        assertTrue( stageInstances.contains( programStageInstanceD2 ) );
-    }
-
-    @Test
     public void testGetProgramStageInstancesByInstanceListComplete()
     {
         programStageInstanceA.setCompleted( true );
@@ -479,110 +460,6 @@
     }
 
     @Test
-    public void testUpdateProgramStageInstances()
-    {
-        int idA = programStageInstanceService.addProgramStageInstance( programStageInstanceA );
-        int idB = programStageInstanceService.addProgramStageInstance( programStageInstanceB );
-
-        OutboundSms outboundSms = new OutboundSms();
-        Collection<Integer> programStageInstances = new HashSet<Integer>();
-        programStageInstances.add( idA );
-        programStageInstances.add( idB );
-
-        programStageInstanceService.updateProgramStageInstances( programStageInstances, outboundSms );
-        assertTrue( programStageInstanceService.getProgramStageInstance( idA ).getOutboundSms().contains( outboundSms ) );
-        assertTrue( programStageInstanceService.getProgramStageInstance( idB ).getOutboundSms().contains( outboundSms ) );
-    }
-
-    @Test
-    public void testGetProgramStageInstancesByOuPeriodProgram()
-    {
-        programStageInstanceA.setExecutionDate( enrollmentDate );
-        programStageInstanceA.setOrganisationUnit( organisationUnitA );
-        programStageInstanceB.setExecutionDate( enrollmentDate );
-        programStageInstanceB.setOrganisationUnit( organisationUnitB );
-
-        programStageInstanceService.addProgramStageInstance( programStageInstanceA );
-        programStageInstanceService.addProgramStageInstance( programStageInstanceB );
-
-        Collection<Integer> orgunitIds = new HashSet<Integer>();
-        orgunitIds.add( orgunitAId );
-        orgunitIds.add( orgunitBId );
-
-        Collection<ProgramStageInstance> result = programStageInstanceService.getProgramStageInstances( programA,
-            orgunitIds, incidenDate, enrollmentDate, false );
-
-        assertEquals( 2, result.size() );
-        assertTrue( result.contains( programStageInstanceA ) );
-        assertTrue( result.contains( programStageInstanceB ) );
-    }
-
-    @Test
-    public void testGetOverDueEventCount()
-    {
-        Calendar cal = Calendar.getInstance();
-        PeriodType.clearTimeOfDay( cal );
-        cal.add( Calendar.DATE, -1 );
-        Date date = cal.getTime();
-
-        programStageInstanceA.setDueDate( date );
-        programStageInstanceB.setDueDate( date );
-
-        programStageInstanceService.addProgramStageInstance( programStageInstanceA );
-        programStageInstanceService.addProgramStageInstance( programStageInstanceB );
-
-        Collection<Integer> orgunitIds = new HashSet<Integer>();
-        orgunitIds.add( orgunitAId );
-        orgunitIds.add( orgunitBId );
-
-        int count = programStageInstanceService.getOverDueEventCount( stageA, orgunitIds, incidenDate, enrollmentDate );
-        assertEquals( 1, count );
-    }
-
-    @Test
-    public void testGetOrganisationUnitIds()
-    {
-        programStageInstanceA.setExecutionDate( enrollmentDate );
-        programStageInstanceA.setOrganisationUnit( organisationUnitA );
-        programStageInstanceB.setExecutionDate( enrollmentDate );
-        programStageInstanceB.setOrganisationUnit( organisationUnitB );
-
-        programStageInstanceService.addProgramStageInstance( programStageInstanceA );
-        programStageInstanceService.addProgramStageInstance( programStageInstanceB );
-
-        Collection<Integer> orgunitIds = programStageInstanceService.getOrganisationUnitIds( incidenDate,
-            enrollmentDate );
-        assertEquals( 2, orgunitIds.size() );
-        assertTrue( orgunitIds.contains( orgunitAId ) );
-        assertTrue( orgunitIds.contains( orgunitBId ) );
-    }
-
-    @Test
-    public void testSendMessages()
-    {
-        createSMSConfiguration();
-
-        programStageInstanceService.addProgramStageInstance( programStageInstanceA );
-
-        Collection<OutboundSms> outboundSmsList = programStageInstanceService.sendMessages( programStageInstanceA,
-            TrackedEntityInstanceReminder.SEND_WHEN_TO_C0MPLETED_EVENT, mockFormat );
-        assertEquals( 1, outboundSmsList.size() );
-        assertEquals( "Test program stage message template", outboundSmsList.iterator().next().getMessage() );
-    }
-
-    @Test
-    public void testSendMessageConversations()
-    {
-        programStageInstanceService.addProgramStageInstance( programStageInstanceB );
-
-        Collection<MessageConversation> messages = programStageInstanceService.sendMessageConversations(
-            programStageInstanceA, TrackedEntityInstanceReminder.SEND_WHEN_TO_C0MPLETED_EVENT, mockFormat );
-        assertEquals( 1, messages.size() );
-        assertEquals( "Test program stage message template", messages.iterator().next().getMessages().get( 0 )
-            .getText() );
-    }
-
-    @Test
     public void testCompleteProgramStageInstance()
     {
         this.createSMSConfiguration();

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageInstanceStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageInstanceStoreTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageInstanceStoreTest.java	2014-05-16 15:26:10 +0000
@@ -279,18 +279,6 @@
     }
 
     @Test
-    public void testGetProgramStageInstanceListByProgramInstanceStage()
-    {
-        programStageInstanceStore.save( programStageInstanceD1 );
-        programStageInstanceStore.save( programStageInstanceD2 );
-
-        Collection<ProgramStageInstance> stageInstances = programStageInstanceStore.getAll( programInstanceB, stageD );
-        assertEquals( 2, stageInstances.size() );
-        assertTrue( stageInstances.contains( programStageInstanceD1 ) );
-        assertTrue( stageInstances.contains( programStageInstanceD2 ) );
-    }
-
-    @Test
     public void testGetProgramStageInstancesByInstanceListComplete()
     {
         programStageInstanceA.setCompleted( true );
@@ -339,30 +327,7 @@
         assertEquals( 1, stageInstances.size() );
         assertTrue( stageInstances.contains( programStageInstanceB ) );
     }
-
-    @Test
-    public void testGetProgramStageInstancesByOuPeriodProgram()
-    {
-        programStageInstanceA.setExecutionDate( enrollmentDate );
-        programStageInstanceA.setOrganisationUnit( organisationUnitA );
-        programStageInstanceB.setExecutionDate( enrollmentDate );
-        programStageInstanceB.setOrganisationUnit( organisationUnitB );
-
-        programStageInstanceStore.save( programStageInstanceA );
-        programStageInstanceStore.save( programStageInstanceB );
-
-        Collection<Integer> orgunitIds = new HashSet<Integer>();
-        orgunitIds.add( orgunitAId );
-        orgunitIds.add( orgunitBId );
-
-        Collection<ProgramStageInstance> result = programStageInstanceStore.get( programA, orgunitIds, incidenDate,
-            enrollmentDate, false );
-
-        assertEquals( 2, result.size() );
-        assertTrue( result.contains( programStageInstanceA ) );
-        assertTrue( result.contains( programStageInstanceB ) );
-    }
-
+    
     @Test
     public void testGetOverDueEventCount()
     {
@@ -384,22 +349,4 @@
         int count = programStageInstanceStore.getOverDueCount( stageA, orgunitIds, incidenDate, enrollmentDate );
         assertEquals( 1, count );
     }
-
-    @Test
-    public void testGetOrganisationUnitIds()
-    {
-        programStageInstanceA.setExecutionDate( enrollmentDate );
-        programStageInstanceA.setOrganisationUnit( organisationUnitA );
-        programStageInstanceB.setExecutionDate( enrollmentDate );
-        programStageInstanceB.setOrganisationUnit( organisationUnitB );
-
-        programStageInstanceStore.save( programStageInstanceA );
-        programStageInstanceStore.save( programStageInstanceB );
-
-        Collection<Integer> orgunitIds = programStageInstanceStore.getOrgunitIds( incidenDate, enrollmentDate );
-        assertEquals( 2, orgunitIds.size() );
-        assertTrue( orgunitIds.contains( orgunitAId ) );
-        assertTrue( orgunitIds.contains( orgunitBId ) );
-    }
-
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageSectionServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageSectionServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageSectionServiceTest.java	2014-05-16 15:26:10 +0000
@@ -31,7 +31,6 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
 import java.util.HashSet;
@@ -191,29 +190,9 @@
     }
 
     @Test
-    public void testGetProgramStageSectionListByName()
-    {
-        programStageService.updateProgramStage( stageA );
-
-        List<ProgramStageSection> sections = programStageSectionService.getProgramStageSectionByName( "A" );
-        assertEquals( 1, sections.size() );
-        assertTrue( sections.contains( sectionA ) );
-    }
-
-    @Test
     public void testGetProgramStageSectionByNameStage()
     {
         programStageService.updateProgramStage( stageA );
         assertNotNull( programStageSectionService.getProgramStageSectionByName( "A", stageA ) );
     }
-
-    @Test
-    public void testGetAllProgramStageSections()
-    {
-        programStageService.updateProgramStage( stageA );
-        Set<ProgramStageSection> sections = stageA.getProgramStageSections();
-
-        assertTrue( equals( sections, sectionA, sectionB ) );
-    }
-
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramStageServiceTest.java	2014-05-16 15:26:10 +0000
@@ -31,7 +31,6 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
 
 import java.util.HashSet;
 
@@ -144,15 +143,6 @@
     }
 
     @Test
-    public void testGetProgramStageByName()
-    {
-        int idA = programStageService.saveProgramStage( stageA );
-
-        assertNotNull( programStageService.getProgramStage( idA ) );
-        assertNotNull( programStageService.getProgramStageByName( "A" ) );
-    }
-
-    @Test
     public void testGetProgramStageByNameProgram()
     {
         programStageService.saveProgramStage( stageA );
@@ -162,13 +152,4 @@
         assertEquals( stageB, programStageService.getProgramStageByName( "B", program ) );
     }
 
-    @Test
-    public void testGetAllProgramStages()
-    {
-        programStageService.saveProgramStage( stageA );
-        programStageService.saveProgramStage( stageB );
-
-        assertTrue( equals( programStageService.getAllProgramStages(), stageA, stageB ) );
-    }
-
 }
\ No newline at end of file

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramValidationServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramValidationServiceTest.java	2014-03-26 14:01:14 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/program/ProgramValidationServiceTest.java	2014-05-16 15:26:10 +0000
@@ -252,15 +252,6 @@
     }
 
     @Test
-    public void testGetProgramValidationByProgram()
-    {
-        programValidationService.addProgramValidation( validationA );
-        programValidationService.addProgramValidation( validationB );
-
-        assertTrue( equals( programValidationService.getProgramValidation( program ), validationA, validationB ) );
-    }
-
-    @Test
     public void testGetProgramValidationByStage()
     {
         programValidationService.addProgramValidation( validationA );
@@ -271,16 +262,6 @@
     }
 
     @Test
-    public void testGetProgramValidationByStageDe()
-    {
-        programValidationService.addProgramValidation( validationA );
-
-        Collection<ProgramValidation> result = programValidationService.getProgramValidation( stageDataElementA );
-        assertEquals( 1, result.size() );
-        assertTrue( result.contains( validationA ) );
-    }
-
-    @Test
     public void testValidate()
     {
         programValidationService.addProgramValidation( validationA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipServiceTest.java	2014-05-16 15:26:10 +0000
@@ -173,28 +173,6 @@
     }
 
     @Test
-    public void testGetRelationshipByTwoEntityInstance()
-    {
-        relationshipService.addRelationship( relationshipA );
-        relationshipService.addRelationship( relationshipB );
-
-        Relationship relationship = relationshipService.getRelationship( entityInstanceA, entityInstanceB );
-        assertEquals( relationshipA, relationship );
-
-        relationship = relationshipService.getRelationship( entityInstanceC, entityInstanceD );
-        assertEquals( relationshipB, relationship );
-    }
-
-    @Test
-    public void testGetAllRelationships()
-    {
-        relationshipService.addRelationship( relationshipA );
-        relationshipService.addRelationship( relationshipB );
-
-        assertTrue( equals( relationshipService.getAllRelationships(), relationshipA, relationshipB ) );
-    }
-
-    @Test
     public void testGetRelationshipsForEntityInstance()
     {
         relationshipService.addRelationship( relationshipA );
@@ -205,26 +183,4 @@
         assertTrue( equals( relationships, relationshipA, relationshipC ) );
     }
 
-    @Test
-    public void testGetRelationships()
-    {
-        relationshipService.addRelationship( relationshipA );
-        relationshipService.addRelationship( relationshipC );
-
-        Collection<Relationship> relationships = relationshipService.getRelationships( entityInstanceA,
-            relationshipType );
-        assertTrue( equals( relationships, relationshipA, relationshipC ) );
-    }
-
-    @Test
-    public void testGetRelationshipsByRelationshipType()
-    {
-        relationshipService.addRelationship( relationshipA );
-        relationshipService.addRelationship( relationshipC );
-
-        Collection<Relationship> relationships = relationshipService
-            .getRelationshipsByRelationshipType( relationshipType );
-        assertTrue( equals( relationships, relationshipA, relationshipC ) );
-    }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipStoreTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/relationship/RelationshipStoreTest.java	2014-05-16 15:26:10 +0000
@@ -117,19 +117,6 @@
     }
 
     @Test
-    public void testGetRelationshipByTwoEntityInstance()
-    {
-        relationshipStore.save( relationshipA );
-        relationshipStore.save( relationshipB );
-
-        Relationship relationship = relationshipStore.get( entityInstanceA, entityInstanceB );
-        assertEquals( relationshipA, relationship );
-
-        relationship = relationshipStore.get( entityInstanceC, entityInstanceD );
-        assertEquals( relationshipB, relationship );
-    }
-
-    @Test
     public void testGetRelationshipsForEntityInstance()
     {
         relationshipStore.save( relationshipA );
@@ -140,16 +127,6 @@
     }
 
     @Test
-    public void testGetRelationships()
-    {
-        relationshipStore.save( relationshipA );
-        relationshipStore.save( relationshipC );
-
-        Collection<Relationship> relationships = relationshipStore.get( entityInstanceA, relationshipType );
-        assertTrue( equals( relationships, relationshipA, relationshipC ) );
-    }
-
-    @Test
     public void testGetRelationshipsByRelationshipType()
     {
         relationshipStore.save( relationshipA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeServiceTest.java	2014-04-15 03:48:38 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeServiceTest.java	2014-05-16 15:26:10 +0000
@@ -75,24 +75,6 @@
     }
 
     @Test
-    public void testGetTrackedEntityAttributesByValueType()
-    {
-        attributeStore.save( attributeA );
-        attributeStore.save( attributeB );
-        attributeStore.save( attributeC );
-
-        Collection<TrackedEntityAttribute> attributes = attributeStore.getByValueType( TrackedEntityAttribute.TYPE_STRING );
-        assertEquals( 2, attributes.size() );
-        assertTrue( attributes.contains( attributeA ) );
-        assertTrue( attributes.contains( attributeB ) );
-
-        attributes = attributeStore.getByValueType( TrackedEntityAttribute.TYPE_NUMBER );
-        assertEquals( 1, attributes.size() );
-        assertTrue( attributes.contains( attributeC ) );
-
-    }
-
-    @Test
     public void testGetTrackedEntityAttributesWithoutGroup()
     {
         attributeStore.save( attributeA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStoreTest.java	2014-04-25 11:14:08 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAttributeStoreTest.java	2014-05-16 15:26:10 +0000
@@ -158,25 +158,6 @@
     }
 
     @Test
-    public void testGetTrackedEntityAttributesByValueType()
-    {
-        attributeService.addTrackedEntityAttribute( attributeA );
-        attributeService.addTrackedEntityAttribute( attributeB );
-        attributeService.addTrackedEntityAttribute( attributeC );
-
-        Collection<TrackedEntityAttribute> attributes = attributeService
-            .getTrackedEntityAttributesByValueType( TrackedEntityAttribute.TYPE_STRING );
-        assertEquals( 2, attributes.size() );
-        assertTrue( attributes.contains( attributeA ) );
-        assertTrue( attributes.contains( attributeB ) );
-
-        attributes = attributeService.getTrackedEntityAttributesByValueType( TrackedEntityAttribute.TYPE_NUMBER );
-        assertEquals( 1, attributes.size() );
-        assertTrue( attributes.contains( attributeC ) );
-
-    }
-
-    @Test
     public void testGetTrackedEntityAttributesWithoutGroup()
     {
         attributeService.addTrackedEntityAttribute( attributeA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAuditServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAuditServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityAuditServiceTest.java	2014-05-16 15:26:10 +0000
@@ -137,15 +137,6 @@
     }
 
     @Test
-    public void testGetAllTrackedEntityAudit()
-    {
-        auditService.saveTrackedEntityAudit( auditA );
-        auditService.saveTrackedEntityAudit( auditB );
-
-        assertTrue( equals( auditService.getAllTrackedEntityAudit(), auditA, auditB ) );
-    }
-
-    @Test
     public void testGetTrackedEntityAuditsByEntityInstance()
     {
         auditService.saveTrackedEntityAudit( auditA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceServiceTest.java	2014-05-08 13:39:17 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceServiceTest.java	2014-05-16 15:26:10 +0000
@@ -35,7 +35,6 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Date;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
@@ -43,10 +42,8 @@
 import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramInstanceService;
 import org.hisp.dhis.program.ProgramService;
-import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.relationship.RelationshipType;
 import org.hisp.dhis.relationship.RelationshipTypeService;
 import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue;
@@ -95,18 +92,10 @@
 
     private TrackedEntityInstance entityInstanceB1;
 
-    private TrackedEntityInstance entityInstanceB2;
-
     private TrackedEntityAttribute entityInstanceAttribute;
 
-    private Program programA;
-
-    private Program programB;
-
     private OrganisationUnit organisationUnit;
 
-    private Date date = new Date();
-
     @Override
     public void setUpTest()
     {
@@ -124,10 +113,6 @@
         entityInstanceA3 = createTrackedEntityInstance( 'A', organisationUnit, entityInstanceAttribute );
         entityInstanceB1 = createTrackedEntityInstance( 'B', organisationUnit );
         entityInstanceB1.setUid( "UID-B1" );
-        entityInstanceB2 = createTrackedEntityInstance( 'B', organisationUnit, entityInstanceAttribute );
-
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
-        programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnit );
     }
 
     @Test
@@ -211,35 +196,6 @@
     }
 
     @Test
-    public void testGetTrackedEntityInstancesByProgramOu()
-    {
-        programService.addProgram( programA );
-        programService.addProgram( programB );
-
-        entityInstanceService.addTrackedEntityInstance( entityInstanceA1 );
-        entityInstanceService.addTrackedEntityInstance( entityInstanceB1 );
-        entityInstanceService.addTrackedEntityInstance( entityInstanceA2 );
-        entityInstanceService.addTrackedEntityInstance( entityInstanceB2 );
-
-        programInstanceService.enrollTrackedEntityInstance( entityInstanceA1, programA, date, date, organisationUnit );
-        programInstanceService.enrollTrackedEntityInstance( entityInstanceB1, programA, date, date, organisationUnit );
-        programInstanceService.enrollTrackedEntityInstance( entityInstanceA2, programA, date, date, organisationUnit );
-        programInstanceService.enrollTrackedEntityInstance( entityInstanceB2, programB, date, date, organisationUnit );
-
-        Collection<TrackedEntityInstance> entityInstances = entityInstanceService.getTrackedEntityInstances(
-            organisationUnit, programA, 0, 100 );
-
-        assertEquals( 2, entityInstances.size() );
-        assertTrue( entityInstances.contains( entityInstanceA1 ) );
-        assertTrue( entityInstances.contains( entityInstanceB1 ) );
-
-        entityInstances = entityInstanceService.getTrackedEntityInstances( organisationUnit, programB, 0, 100 );
-
-        assertEquals( 1, entityInstances.size() );
-        assertTrue( entityInstances.contains( entityInstanceB2 ) );
-    }
-
-    @Test
     public void testGetRepresentatives()
     {
         entityInstanceService.addTrackedEntityInstance( entityInstanceB1 );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStoreTest.java	2014-05-07 09:33:33 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceStoreTest.java	2014-05-16 15:26:10 +0000
@@ -33,17 +33,11 @@
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashSet;
-
 import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 import org.hisp.dhis.organisationunit.OrganisationUnitService;
-import org.hisp.dhis.program.Program;
 import org.hisp.dhis.program.ProgramInstanceService;
 import org.hisp.dhis.program.ProgramService;
-import org.hisp.dhis.program.ProgramStage;
 import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValue;
 import org.hisp.dhis.trackedentityattributevalue.TrackedEntityAttributeValueService;
 import org.hisp.dhis.validation.ValidationCriteriaService;
@@ -83,16 +77,8 @@
 
     private TrackedEntityInstance entityInstanceB1;
 
-    private TrackedEntityInstance entityInstanceB2;
-
-    private Program programA;
-
-    private Program programB;
-
     private OrganisationUnit organisationUnit;
-
-    private Date date = new Date();
-
+    
     @Override
     public void setUpTest()
     {
@@ -109,10 +95,6 @@
         entityInstanceA1 = createTrackedEntityInstance( 'A', organisationUnit );
         entityInstanceA2 = createTrackedEntityInstance( 'A', organisationUnitB );
         entityInstanceB1 = createTrackedEntityInstance( 'B', organisationUnit );
-        entityInstanceB2 = createTrackedEntityInstance( 'B', organisationUnit );
-
-        programA = createProgram( 'A', new HashSet<ProgramStage>(), organisationUnit );
-        programB = createProgram( 'B', new HashSet<ProgramStage>(), organisationUnit );
     }
 
     @Test
@@ -165,35 +147,6 @@
     }
 
     @Test
-    public void testGetByOrgUnitProgram()
-    {
-        programService.addProgram( programA );
-        programService.addProgram( programB );
-
-        entityInstanceStore.save( entityInstanceA1 );
-        entityInstanceStore.save( entityInstanceB1 );
-        entityInstanceStore.save( entityInstanceA2 );
-        entityInstanceStore.save( entityInstanceB2 );
-
-        programInstanceService.enrollTrackedEntityInstance( entityInstanceA1, programA, date, date, organisationUnit );
-        programInstanceService.enrollTrackedEntityInstance( entityInstanceB1, programA, date, date, organisationUnit );
-        programInstanceService.enrollTrackedEntityInstance( entityInstanceA2, programA, date, date, organisationUnit );
-        programInstanceService.enrollTrackedEntityInstance( entityInstanceB2, programB, date, date, organisationUnit );
-
-        Collection<TrackedEntityInstance> entityInstances = entityInstanceStore.getByOrgUnitProgram( organisationUnit,
-            programA, 0, 100 );
-
-        assertEquals( 2, entityInstances.size() );
-        assertTrue( entityInstances.contains( entityInstanceA1 ) );
-        assertTrue( entityInstances.contains( entityInstanceB1 ) );
-
-        entityInstances = entityInstanceStore.getByOrgUnitProgram( organisationUnit, programB, 0, 100 );
-
-        assertEquals( 1, entityInstances.size() );
-        assertTrue( entityInstances.contains( entityInstanceB2 ) );
-    }
-
-    @Test
     public void testGetRepresentatives()
     {
         entityInstanceStore.save( entityInstanceB1 );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueServiceTest.java	2014-03-19 06:44:30 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueServiceTest.java	2014-05-16 15:26:10 +0000
@@ -35,7 +35,6 @@
 
 import java.util.Collection;
 import java.util.HashSet;
-import java.util.Map;
 
 import org.hisp.dhis.DhisSpringTest;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -82,10 +81,6 @@
 
     private TrackedEntityInstance entityInstanceD;
 
-    private int entityInstanceAId;
-
-    private int entityInstanceBId;
-
     private TrackedEntityAttributeValue attributeValueA;
 
     private TrackedEntityAttributeValue attributeValueB;
@@ -103,8 +98,8 @@
         entityInstanceC = createTrackedEntityInstance( 'C', organisationUnit );
         entityInstanceD = createTrackedEntityInstance( 'D', organisationUnit );
 
-        entityInstanceAId = entityInstanceService.addTrackedEntityInstance( entityInstanceA );
-        entityInstanceBId = entityInstanceService.addTrackedEntityInstance( entityInstanceB );
+        entityInstanceService.addTrackedEntityInstance( entityInstanceA );
+        entityInstanceService.addTrackedEntityInstance( entityInstanceB );
         entityInstanceService.addTrackedEntityInstance( entityInstanceC );
         entityInstanceService.addTrackedEntityInstance( entityInstanceD );
 
@@ -166,53 +161,6 @@
     }
 
     @Test
-    public void testDeleteTrackedEntityAttributeValueByEntityInstance()
-    {
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueA );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueB );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueC );
-
-        assertNotNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeA ) );
-        assertNotNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeB ) );
-        assertNotNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceB, attributeA ) );
-
-        attributeValueService.deleteTrackedEntityAttributeValue( entityInstanceA );
-
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeA ) );
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeB ) );
-        assertNotNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceB, attributeA ) );
-
-        attributeValueService.deleteTrackedEntityAttributeValue( entityInstanceB );
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeA ) );
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeB ) );
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceB, attributeA ) );
-    }
-
-    @Test
-    public void testDeleteTrackedEntityAttributeValueByAttribute()
-    {
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueA );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueB );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueC );
-
-        assertNotNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeA ) );
-        assertNotNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeB ) );
-        assertNotNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceB, attributeA ) );
-
-        attributeValueService.deleteTrackedEntityAttributeValue( attributeA );
-
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeA ) );
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceB, attributeA ) );
-        assertNotNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeB ) );
-
-        attributeValueService.deleteTrackedEntityAttributeValue( attributeB );
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeA ) );
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceA, attributeB ) );
-        assertNull( attributeValueService.getTrackedEntityAttributeValue( entityInstanceB, attributeA ) );
-
-    }
-
-    @Test
     public void testGetTrackedEntityAttributeValue()
     {
         attributeValueService.addTrackedEntityAttributeValue( attributeValueA );
@@ -273,56 +221,7 @@
         assertEquals( 3, attributeValues.size() );
         assertTrue( equals( attributeValues, attributeValueA, attributeValueB, attributeValueC ) );
     }
-
-    @Test
-    public void testGetAllTrackedEntityAttributeValues()
-    {
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueA );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueB );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueC );
-
-        assertTrue( equals( attributeValueService.getAllTrackedEntityAttributeValues(), attributeValueA, attributeValueB,
-            attributeValueC ) );
-    }
-
-    @Test
-    public void testGetTrackedEntityAttributeValueMapForEntityInstances()
-    {
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueA );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueB );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueC );
-
-        Collection<TrackedEntityInstance> entityInstances = new HashSet<TrackedEntityInstance>();
-        entityInstances.add( entityInstanceA );
-        entityInstances.add( entityInstanceB );
-
-        Map<Integer, Collection<TrackedEntityAttributeValue>> attributeValueMap = attributeValueService
-            .getAttributeValueMapForAttributeValues( entityInstances );
-
-        assertEquals( 2, attributeValueMap.keySet().size() );
-        assertTrue( equals( attributeValueMap.get( entityInstanceAId ), attributeValueA, attributeValueB ) );
-        assertTrue( equals( attributeValueMap.get( entityInstanceBId ), attributeValueC ) );
-    }
-
-    @Test
-    public void testGetTrackedEntityAttributeValueMapForEntityInstancesAttributes()
-    {
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueA );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueB );
-        attributeValueService.addTrackedEntityAttributeValue( attributeValueC );
-
-        Collection<TrackedEntityInstance> entityInstances = new HashSet<TrackedEntityInstance>();
-        entityInstances.add( entityInstanceA );
-        entityInstances.add( entityInstanceB );
-
-        Map<Integer, TrackedEntityAttributeValue> attributeValueMap = attributeValueService
-            .getAttributeValueMapForAttributeValues( entityInstances, attributeA );
-
-        assertEquals( 2, attributeValueMap.keySet().size() );
-        assertEquals( attributeValueA, attributeValueMap.get( entityInstanceAId ) );
-        assertEquals( attributeValueC, attributeValueMap.get( entityInstanceBId ) );
-    }
-
+    
     @Test
     public void testSearchTrackedEntityAttributeValue()
     {

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueStoreTest.java	2014-03-19 06:44:30 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentityattributevalue/TrackedEntityAttributeValueStoreTest.java	2014-05-16 15:26:10 +0000
@@ -149,30 +149,6 @@
     }
 
     @Test
-    public void testDeleteByAttribute()
-    {
-        attributeValueStore.saveVoid( attributeValueA );
-        attributeValueStore.saveVoid( attributeValueB );
-        attributeValueStore.saveVoid( attributeValueC );
-
-        assertNotNull( attributeValueStore.get( entityInstanceA, attributeA ) );
-        assertNotNull( attributeValueStore.get( entityInstanceA, attributeB ) );
-        assertNotNull( attributeValueStore.get( entityInstanceB, attributeA ) );
-
-        attributeValueStore.deleteByAttribute( attributeA );
-
-        assertNull( attributeValueStore.get( entityInstanceA, attributeA ) );
-        assertNull( attributeValueStore.get( entityInstanceB, attributeA ) );
-        assertNotNull( attributeValueStore.get( entityInstanceA, attributeB ) );
-
-        attributeValueStore.deleteByAttribute( attributeB );
-        assertNull( attributeValueStore.get( entityInstanceA, attributeA ) );
-        assertNull( attributeValueStore.get( entityInstanceA, attributeB ) );
-        assertNull( attributeValueStore.get( entityInstanceB, attributeA ) );
-
-    }
-
-    @Test
     public void testGetTrackedEntityAttributeValue()
     {
         attributeValueStore.saveVoid( attributeValueA );
@@ -201,23 +177,6 @@
     }
 
     @Test
-    public void testGetTrackedEntityAttributeValuesbyAttribute()
-    {
-        attributeValueStore.saveVoid( attributeValueA );
-        attributeValueStore.saveVoid( attributeValueB );
-        attributeValueStore.saveVoid( attributeValueC );
-
-        Collection<TrackedEntityAttributeValue> attributeValues = attributeValueStore.get( attributeA );
-        assertEquals( 2, attributeValues.size() );
-        assertTrue( attributeValues.contains( attributeValueA ) );
-        assertTrue( attributeValues.contains( attributeValueC ) );
-
-        attributeValues = attributeValueStore.get( attributeB );
-        assertEquals( 1, attributeValues.size() );
-        assertTrue( attributeValues.contains( attributeValueB ) );
-    }
-
-    @Test
     public void testGetTrackedEntityAttributeValuesbyEntityInstanceList()
     {
         attributeValueStore.saveVoid( attributeValueA );

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitycomment/TrackedEntityCommentServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitycomment/TrackedEntityCommentServiceTest.java	2014-03-18 08:10:10 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitycomment/TrackedEntityCommentServiceTest.java	2014-05-16 15:26:10 +0000
@@ -31,7 +31,6 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
 
 import java.util.Date;
 
@@ -114,14 +113,4 @@
         assertEquals( commentB, commentService.getTrackedEntityComment( idB ) );
     }
 
-
-    @Test
-    public void testGetAllTrackedEntityComments()
-    {
-        commentService.addTrackedEntityComment( commentA );
-        commentService.addTrackedEntityComment( commentB );
-
-        assertTrue( equals( commentService.getAllTrackedEntityComments(), commentA, commentB ) );
-    }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueServiceTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueServiceTest.java	2014-04-25 11:14:08 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueServiceTest.java	2014-05-16 15:26:10 +0000
@@ -204,26 +204,6 @@
     }
 
     @Test
-    public void testDeleteTrackedEntityDataValueByStageInstance()
-    {
-        dataValueService.saveTrackedEntityDataValue( dataValueA );
-        dataValueService.saveTrackedEntityDataValue( dataValueB );
-        dataValueService.saveTrackedEntityDataValue( dataValueC );
-        dataValueService.saveTrackedEntityDataValue( dataValueD );
-
-        assertNotNull( dataValueService.getTrackedEntityDataValue( stageInstanceA, dataElementA ) );
-        assertNotNull( dataValueService.getTrackedEntityDataValue( stageInstanceA, dataElementB ) );
-        assertNotNull( dataValueService.getTrackedEntityDataValue( stageInstanceB, dataElementA ) );
-        assertNotNull( dataValueService.getTrackedEntityDataValue( stageInstanceB, dataElementB ) );
-
-        dataValueService.deleteTrackedEntityDataValue( stageInstanceA );
-        assertNull( dataValueService.getTrackedEntityDataValue( stageInstanceA, dataElementA ) );
-        assertNull( dataValueService.getTrackedEntityDataValue( stageInstanceA, dataElementB ) );
-        assertNotNull( dataValueService.getTrackedEntityDataValue( stageInstanceB, dataElementA ) );
-        assertNotNull( dataValueService.getTrackedEntityDataValue( stageInstanceB, dataElementB ) );
-    }
-
-    @Test
     public void testGetTrackedEntityDataValuesByStageInstance()
     {
         dataValueService.saveTrackedEntityDataValue( dataValueA );
@@ -334,13 +314,4 @@
         assertEquals( dataValueB, dataValue );
     }
 
-    @Test
-    public void testGetAllTrackedEntityDataValues()
-    {
-        dataValueService.saveTrackedEntityDataValue( dataValueA );
-        dataValueService.saveTrackedEntityDataValue( dataValueA );
-
-        assertTrue( equals( dataValueService.getAllTrackedEntityDataValues(), dataValueA, dataValueA ) );
-    }
-
 }

=== modified file 'dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueStoreTest.java'
--- dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueStoreTest.java	2014-05-14 14:05:57 +0000
+++ dhis-2/dhis-services/dhis-service-tracker/src/test/java/org/hisp/dhis/trackedentitydatavalue/TrackedEntityDataValueStoreTest.java	2014-05-16 15:26:10 +0000
@@ -30,7 +30,6 @@
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.util.Calendar;
@@ -175,26 +174,6 @@
     }
 
     @Test
-    public void testDeleteTrackedEntityDataValueByStageInstance()
-    {
-        dataValueStore.saveVoid( dataValueA );
-        dataValueStore.saveVoid( dataValueB );
-        dataValueStore.saveVoid( dataValueC );
-        dataValueStore.saveVoid( dataValueD );
-
-        assertNotNull( dataValueStore.get( stageInstanceA, dataElementA ) );
-        assertNotNull( dataValueStore.get( stageInstanceA, dataElementB ) );
-        assertNotNull( dataValueStore.get( stageInstanceB, dataElementA ) );
-        assertNotNull( dataValueStore.get( stageInstanceB, dataElementB ) );
-
-        dataValueStore.detele( stageInstanceA );
-        assertNull( dataValueStore.get( stageInstanceA, dataElementA ) );
-        assertNull( dataValueStore.get( stageInstanceA, dataElementB ) );
-        assertNotNull( dataValueStore.get( stageInstanceB, dataElementA ) );
-        assertNotNull( dataValueStore.get( stageInstanceB, dataElementB ) );
-    }
-
-    @Test
     public void testGetTrackedEntityDataValuesByStageInstance()
     {
         dataValueStore.saveVoid( dataValueA );