dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14746
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5096: coerced dataelement and indicator stores to add/update through identifiable object store.
------------------------------------------------------------
revno: 5096
committer: Bob Jolliffe bobjolliffe@xxxxxxxxx
branch nick: dhis2
timestamp: Thu 2011-11-03 11:57:16 +0000
message:
coerced dataelement and indicator stores to add/update through identifiable object store.
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/hibernate/HibernateIndicatorStore.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-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2011-11-03 01:02:13 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2011-11-03 11:57:16 +0000
@@ -76,16 +76,12 @@
public int addDataElement( DataElement dataElement )
{
- Session session = sessionFactory.getCurrentSession();
-
- return (Integer) session.save( dataElement );
+ return this.save( dataElement );
}
public void updateDataElement( DataElement dataElement )
{
- Session session = sessionFactory.getCurrentSession();
-
- session.update( dataElement );
+ this.updateDataElement( dataElement );
}
public void deleteDataElement( DataElement dataElement )
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/hibernate/HibernateIndicatorStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/hibernate/HibernateIndicatorStore.java 2011-07-22 20:43:53 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/hibernate/HibernateIndicatorStore.java 2011-11-03 11:57:16 +0000
@@ -49,18 +49,16 @@
// Indicator
// -------------------------------------------------------------------------
+ @Override
public int addIndicator( Indicator indicator )
{
- Session session = sessionFactory.getCurrentSession();
-
- return (Integer) session.save( indicator );
+ return this.save(indicator);
}
+ @Override
public void updateIndicator( Indicator indicator )
{
- Session session = sessionFactory.getCurrentSession();
-
- session.update( indicator );
+ this.update( indicator );
}
public void deleteIndicator( Indicator indicator )