dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05959
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1883: Using annotations in service-administration
------------------------------------------------------------
revno: 1883
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Tue 2010-05-18 20:37:07 +0200
message:
Using annotations in service-administration
modified:
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/ArchivedDataValueDeletionHandler.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/jdbc/JdbcDataArchiveStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/StatementManagerDataBrowserStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/hibernate/HibernateDataSetLockStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/JdbcDataMergeStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/maintenance/jdbc/JdbcMaintenanceStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/hibernate/HibernateResourceTableStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/statistics/jdbc/JdbcStatisticsProvider.java
dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/useraudit/hibernate/HibernateUserAuditStore.java
dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml
--
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-administration/src/main/java/org/hisp/dhis/dataarchive/ArchivedDataValueDeletionHandler.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/ArchivedDataValueDeletionHandler.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/ArchivedDataValueDeletionHandler.java 2010-05-18 18:37:07 +0000
@@ -32,6 +32,7 @@
import org.hisp.dhis.period.Period;
import org.hisp.dhis.source.Source;
import org.hisp.dhis.system.deletion.DeletionHandler;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
/**
@@ -44,13 +45,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private JdbcTemplate jdbcTemplate;
- public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
- {
- this.jdbcTemplate = jdbcTemplate;
- }
-
// -------------------------------------------------------------------------
// DeletionHandler implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/jdbc/JdbcDataArchiveStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/jdbc/JdbcDataArchiveStore.java 2010-04-22 16:31:39 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/jdbc/JdbcDataArchiveStore.java 2010-05-18 18:37:07 +0000
@@ -32,6 +32,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hisp.dhis.dataarchive.DataArchiveStore;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import static org.hisp.dhis.system.util.DateUtils.*;
@@ -48,13 +49,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private JdbcTemplate jdbcTemplate;
- public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
- {
- this.jdbcTemplate = jdbcTemplate;
- }
-
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/StatementManagerDataBrowserStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/StatementManagerDataBrowserStore.java 2010-04-13 06:13:35 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/databrowser/jdbc/StatementManagerDataBrowserStore.java 2010-05-18 18:37:07 +0000
@@ -11,6 +11,7 @@
import org.hisp.dhis.databrowser.DataBrowserStore;
import org.hisp.dhis.databrowser.DataBrowserTable;
import org.hisp.dhis.system.util.TimeUtils;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author joakibj, martinwa, briane, eivinhb
@@ -25,13 +26,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private StatementManager statementManager;
- public void setStatementManager( StatementManager statementManager )
- {
- this.statementManager = statementManager;
- }
-
// -------------------------------------------------------------------------
// DataBrowserStore implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/hibernate/HibernateDataSetLockStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/hibernate/HibernateDataSetLockStore.java 2009-09-27 19:34:28 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datalock/hibernate/HibernateDataSetLockStore.java 2010-05-18 18:37:07 +0000
@@ -38,6 +38,7 @@
import org.hisp.dhis.period.Period;
import org.hisp.dhis.period.PeriodService;
import org.hisp.dhis.source.Source;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Brajesh Murari
@@ -50,13 +51,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
private PeriodService periodService;
public void setPeriodService( PeriodService periodService )
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/JdbcDataMergeStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/JdbcDataMergeStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/datamerge/jdbc/JdbcDataMergeStore.java 2010-05-18 18:37:07 +0000
@@ -34,6 +34,7 @@
import org.hisp.dhis.datamerge.DataMergeStore;
import org.hisp.dhis.jdbc.StatementBuilder;
import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
/**
@@ -48,20 +49,12 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private JdbcTemplate jdbcTemplate;
- public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
- {
- this.jdbcTemplate = jdbcTemplate;
- }
-
+ @Autowired
private StatementBuilder statementBuilder;
-
- public void setStatementBuilder( StatementBuilder statementBuilder )
- {
- this.statementBuilder = statementBuilder;
- }
-
+
// -------------------------------------------------------------------------
// DataMergeStore implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/maintenance/jdbc/JdbcMaintenanceStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/maintenance/jdbc/JdbcMaintenanceStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/maintenance/jdbc/JdbcMaintenanceStore.java 2010-05-18 18:37:07 +0000
@@ -29,6 +29,7 @@
import org.hisp.dhis.jdbc.StatementBuilder;
import org.hisp.dhis.maintenance.MaintenanceStore;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
/**
@@ -42,19 +43,11 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private JdbcTemplate jdbcTemplate;
- public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
- {
- this.jdbcTemplate = jdbcTemplate;
- }
-
+ @Autowired
private StatementBuilder statementBuilder;
-
- public void setStatementBuilder( StatementBuilder statementBuilder )
- {
- this.statementBuilder = statementBuilder;
- }
// -------------------------------------------------------------------------
// MaintenanceStore implementation
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/hibernate/HibernateResourceTableStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/hibernate/HibernateResourceTableStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/resourcetable/hibernate/HibernateResourceTableStore.java 2010-05-18 18:37:07 +0000
@@ -47,6 +47,7 @@
import org.hisp.dhis.resourcetable.statement.CreateDataElementGroupSetTableStatement;
import org.hisp.dhis.resourcetable.statement.CreateIndicatorGroupSetTableStatement;
import org.hisp.dhis.resourcetable.statement.CreateOrganisationUnitGroupSetTableStatement;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -61,20 +62,12 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
+ @Autowired
private JdbcTemplate jdbcTemplate;
- public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
- {
- this.jdbcTemplate = jdbcTemplate;
- }
-
// -------------------------------------------------------------------------
// OrganisationUnitStructure
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/statistics/jdbc/JdbcStatisticsProvider.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/statistics/jdbc/JdbcStatisticsProvider.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/statistics/jdbc/JdbcStatisticsProvider.java 2010-05-18 18:37:07 +0000
@@ -32,6 +32,7 @@
import org.hisp.dhis.common.Objects;
import org.hisp.dhis.statistics.StatisticsProvider;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -46,13 +47,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private JdbcTemplate jdbcTemplate;
- public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
- {
- this.jdbcTemplate = jdbcTemplate;
- }
-
// -------------------------------------------------------------------------
// StatisticsProvider implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/useraudit/hibernate/HibernateUserAuditStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/useraudit/hibernate/HibernateUserAuditStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/useraudit/hibernate/HibernateUserAuditStore.java 2010-05-18 18:37:07 +0000
@@ -35,6 +35,7 @@
import org.hibernate.SessionFactory;
import org.hisp.dhis.useraudit.LoginFailure;
import org.hisp.dhis.useraudit.UserAuditStore;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Lars Helge Overland
@@ -42,13 +43,9 @@
public class HibernateUserAuditStore
implements UserAuditStore
{
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
@Override
public void saveLoginFailure( LoginFailure login )
{
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2010-05-17 22:56:52 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/resources/META-INF/dhis/beans.xml 2010-05-18 18:37:07 +0000
@@ -10,7 +10,6 @@
<bean id="org.hisp.dhis.datalock.DataSetLockStore"
class="org.hisp.dhis.datalock.hibernate.HibernateDataSetLockStore">
- <property name="sessionFactory" ref="sessionFactory"/>
<property name="periodService"
ref="org.hisp.dhis.period.PeriodService"/>
</bean>
@@ -24,10 +23,7 @@
<!-- ResourceTable -->
<bean id="org.hisp.dhis.resourcetable.ResourceTableStore"
- class="org.hisp.dhis.resourcetable.hibernate.HibernateResourceTableStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- <property name="jdbcTemplate" ref="jdbcTemplate"/>
- </bean>
+ class="org.hisp.dhis.resourcetable.hibernate.HibernateResourceTableStore"/>
<bean id="org.hisp.dhis.resourcetable.ResourceTableService"
class="org.hisp.dhis.resourcetable.DefaultResourceTableService">
@@ -69,10 +65,7 @@
<!-- Maintenance -->
<bean id="org.hisp.dhis.maintenance.MaintenanceStore"
- class="org.hisp.dhis.maintenance.jdbc.JdbcMaintenanceStore">
- <property name="jdbcTemplate" ref="jdbcTemplate"/>
- <property name="statementBuilder" ref="statementBuilder"/>
- </bean>
+ class="org.hisp.dhis.maintenance.jdbc.JdbcMaintenanceStore"/>
<bean id="org.hisp.dhis.maintenance.MaintenanceService"
class="org.hisp.dhis.maintenance.DefaultMaintenanceService">
@@ -83,16 +76,12 @@
<!-- Statistics -->
<bean id="org.hisp.dhis.statistics.StatisticsProvider"
- class="org.hisp.dhis.statistics.jdbc.JdbcStatisticsProvider">
- <property name="jdbcTemplate" ref="jdbcTemplate"/>
- </bean>
+ class="org.hisp.dhis.statistics.jdbc.JdbcStatisticsProvider"/>
<!-- Databrowser -->
<bean id="org.hisp.dhis.databrowser.DataBrowserStore"
- class="org.hisp.dhis.databrowser.jdbc.StatementManagerDataBrowserStore">
- <property name="statementManager" ref="statementManager"/>
- </bean>
+ class="org.hisp.dhis.databrowser.jdbc.StatementManagerDataBrowserStore"/>
<bean id="org.hisp.dhis.databrowser.DataBrowserService"
class="org.hisp.dhis.databrowser.DefaultDataBrowserService">
@@ -105,10 +94,7 @@
<!-- Data merge -->
<bean id="org.hisp.dhis.datamerge.DataMergeStore"
- class="org.hisp.dhis.datamerge.jdbc.JdbcDataMergeStore">
- <property name="jdbcTemplate" ref="jdbcTemplate"/>
- <property name="statementBuilder" ref="statementBuilder"/>
- </bean>
+ class="org.hisp.dhis.datamerge.jdbc.JdbcDataMergeStore"/>
<bean id="org.hisp.dhis.datamerge.DataMergeService"
class="org.hisp.dhis.datamerge.DefaultDataMergeService">
@@ -133,9 +119,7 @@
<!-- Data archive -->
<bean id="org.hisp.dhis.dataarchive.DataArchiveStore"
- class="org.hisp.dhis.dataarchive.jdbc.JdbcDataArchiveStore">
- <property name="jdbcTemplate" ref="jdbcTemplate"/>
- </bean>
+ class="org.hisp.dhis.dataarchive.jdbc.JdbcDataArchiveStore"/>
<bean id="org.hisp.dhis.dataarchive.DataArchiveService"
class="org.hisp.dhis.dataarchive.DefaultDataArchiveService">
@@ -152,16 +136,12 @@
</bean>
<bean id="org.hisp.dhis.useraudit.UserAuditStore"
- class="org.hisp.dhis.useraudit.hibernate.HibernateUserAuditStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.useraudit.hibernate.HibernateUserAuditStore"/>
<!--DeletionHandler -->
<bean id="org.hisp.dhis.dataarchive.ArchivedDataValueDeletionHandler"
- class="org.hisp.dhis.dataarchive.ArchivedDataValueDeletionHandler">
- <property name="jdbcTemplate" ref="jdbcTemplate"/>
- </bean>
+ class="org.hisp.dhis.dataarchive.ArchivedDataValueDeletionHandler"/>
<bean id="org.hisp.dhis.datalock.DataSetLockDeletionHandler"
class="org.hisp.dhis.datalock.DataSetLockDeletionHandler">