dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19620
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8638: order by date in outbox table
------------------------------------------------------------
revno: 8638
committer: Lai <lai.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-10-22 16:24:29 +0700
message:
order by date in outbox table
modified:
dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/HibernateOutboundSmsStore.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/HibernateOutboundSmsStore.java'
--- dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/HibernateOutboundSmsStore.java 2012-10-22 08:51:28 +0000
+++ dhis-2/dhis-services/dhis-service-sms/src/main/java/org/hisp/dhis/sms/outbound/HibernateOutboundSmsStore.java 2012-10-22 09:24:29 +0000
@@ -34,6 +34,7 @@
import org.hibernate.Session;
import org.hibernate.SessionFactory;
+import org.hibernate.criterion.Order;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.transaction.annotation.Transactional;
@@ -88,7 +89,7 @@
public List<OutboundSms> getAll()
{
Session session = sessionFactory.getCurrentSession();
- return (List<OutboundSms>) session.createCriteria( OutboundSms.class ).list();
+ return (List<OutboundSms>) session.createCriteria( OutboundSms.class ).addOrder( Order.asc( "date" ) ).list();
}
@Override