← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19362: Collection to List in sms service

 

------------------------------------------------------------
revno: 19362
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-06-11 13:48:28 +0200
message:
  Collection to List in sms service
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewService.java
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/DefaultSMSCommandService.java
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/SMSCommandService.java
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/hibernate/HibernateSMSCommandStore.java
  dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/hibernate/SMSCommandStore.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/sqlview/SqlViewService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewService.java	2015-06-11 11:46:36 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewService.java	2015-06-11 11:48:28 +0000
@@ -28,7 +28,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;

=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/DefaultSMSCommandService.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/DefaultSMSCommandService.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/DefaultSMSCommandService.java	2015-06-11 11:48:28 +0000
@@ -28,7 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
+import java.util.List;
 import java.util.Set;
 
 import org.hisp.dhis.dataset.DataSet;
@@ -48,7 +48,7 @@
     }
 
     @Override
-    public Collection<SMSCommand> getSMSCommands()
+    public List<SMSCommand> getSMSCommands()
     {
         return smsCommandStore.getSMSCommands();
     }
@@ -89,7 +89,7 @@
     }
 
     @Override
-    public Collection<SMSCommand> getJ2MESMSCommands()
+    public List<SMSCommand> getJ2MESMSCommands()
     {
         return smsCommandStore.getJ2MESMSCommands();
     }

=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/SMSCommandService.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/SMSCommandService.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/SMSCommandService.java	2015-06-11 11:48:28 +0000
@@ -28,7 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
+import java.util.List;
 import java.util.Set;
 
 import org.hisp.dhis.dataset.DataSet;
@@ -39,7 +39,7 @@
 {
     void updateSMSCommand( SMSCommand cmd );
 
-    Collection<SMSCommand> getSMSCommands();
+    List<SMSCommand> getSMSCommands();
 
     SMSCommand getSMSCommand( int id );
 
@@ -49,7 +49,7 @@
 
     void delete( SMSCommand cmd );
     
-    Collection<SMSCommand> getJ2MESMSCommands();
+    List<SMSCommand> getJ2MESMSCommands();
     
     SMSCommand getSMSCommand( String commandName, ParserType parserType );
     

=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/hibernate/HibernateSMSCommandStore.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/hibernate/HibernateSMSCommandStore.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/hibernate/HibernateSMSCommandStore.java	2015-06-11 11:48:28 +0000
@@ -28,6 +28,9 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+import java.util.List;
+import java.util.Set;
+
 import org.hibernate.Criteria;
 import org.hibernate.Query;
 import org.hibernate.Session;
@@ -42,9 +45,6 @@
 import org.springframework.beans.factory.annotation.Required;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.Collection;
-import java.util.Set;
-
 public class HibernateSMSCommandStore
     implements SMSCommandStore
 {
@@ -58,7 +58,7 @@
 
     @SuppressWarnings("unchecked")
     @Override
-    public Collection<SMSCommand> getSMSCommands()
+    public List<SMSCommand> getSMSCommands()
     {
         Criteria criteria = sessionFactory.getCurrentSession().createCriteria( SMSCommand.class );
         criteria.addOrder( Order.asc( "name" ) );
@@ -135,7 +135,7 @@
 
     @SuppressWarnings("unchecked")
     @Override
-    public Collection<SMSCommand> getJ2MESMSCommands()
+    public List<SMSCommand> getJ2MESMSCommands()
     {
         Criteria criteria = sessionFactory.getCurrentSession().createCriteria( SMSCommand.class );
         criteria.add( Restrictions.eq( "parserType", ParserType.J2ME_PARSER ) );

=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/hibernate/SMSCommandStore.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/hibernate/SMSCommandStore.java	2015-01-17 07:41:26 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/command/hibernate/SMSCommandStore.java	2015-06-11 11:48:28 +0000
@@ -28,7 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-import java.util.Collection;
+import java.util.List;
 import java.util.Set;
 
 import org.hisp.dhis.dataset.DataSet;
@@ -39,7 +39,7 @@
 
 public interface SMSCommandStore
 {
-    Collection<SMSCommand> getSMSCommands();
+    List<SMSCommand> getSMSCommands();
 
     SMSCommand getSMSCommand( int id );
 
@@ -49,7 +49,7 @@
 
     void save( Set<SMSCode> codes );
     
-    Collection<SMSCommand> getJ2MESMSCommands();
+    List<SMSCommand> getJ2MESMSCommands();
     
     SMSCommand getSMSCommand( String commandName, ParserType parserType );