dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05962
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1885: Finishing work on annotations for now. Most beans in the support projects are now annotated and i...
------------------------------------------------------------
revno: 1885
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Tue 2010-05-18 22:05:58 +0200
message:
Finishing work on annotations for now. Most beans in the support projects are now annotated and injected in other beans through auto-wiring. This will hopefully enable more rapid development. As xml configuration for DI has its advantages (clearer what beans are in the system and their relation to other beans, easier to re-wire beans, allows for more advanced wiring) I will leave it here and let the business beans live with xml config.
modified:
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java
dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java
dhis-2/dhis-services/dhis-service-reporting/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-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/completeness/jdbc/JDBCDataSetCompletenessStore.java 2010-05-18 20:05:58 +0000
@@ -40,6 +40,7 @@
import org.hisp.dhis.system.util.ConversionUtils;
import org.hisp.dhis.system.util.DateUtils;
import org.hisp.dhis.system.util.TextUtils;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Lars Helge Overland
@@ -52,12 +53,8 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private StatementManager statementManager;
-
- public void setStatementManager( StatementManager statementManager )
- {
- this.statementManager = statementManager;
- }
// -------------------------------------------------------------------------
// DataSetCompletenessStore
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/reporttable/jdbc/JDBCReportTableManager.java 2010-05-18 20:05:58 +0000
@@ -54,6 +54,7 @@
import org.hisp.dhis.reporttable.statement.GetReportTableStatement;
import org.hisp.dhis.reporttable.statement.RemoveReportTableStatement;
import org.hisp.dhis.reporttable.statement.ReportTableStatement;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Lars Helge Overland
@@ -68,20 +69,16 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private StatementManager statementManager;
- public void setStatementManager( StatementManager statementManager )
- {
- this.statementManager = statementManager;
- }
-
private StatementBuilder statementBuilder;
public void setStatementBuilder( StatementBuilder statementBuilder )
{
this.statementBuilder = statementBuilder;
}
-
+
// -------------------------------------------------------------------------
// ReportTableManager implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-05-18 15:18:53 +0000
+++ dhis-2/dhis-services/dhis-service-reporting/src/main/resources/META-INF/dhis/beans.xml 2010-05-18 20:05:58 +0000
@@ -32,8 +32,7 @@
<bean id="org.hisp.dhis.reporttable.jdbc.ReportTableManager"
class="org.hisp.dhis.reporttable.jdbc.JDBCReportTableManager">
- <property name="statementManager" ref="statementManager"/>
- <property name="statementBuilder" ref="statementBuilder"/>
+ <property name="statementBuilder" ref="statementBuilder"/>
</bean>
<bean id="org.hisp.dhis.reporttable.ReportTableStore"
@@ -160,9 +159,7 @@
</bean>
<bean id="org.hisp.dhis.completeness.DataSetCompletenessStore"
- class="org.hisp.dhis.completeness.jdbc.JDBCDataSetCompletenessStore">
- <property name="statementManager" ref="statementManager"/>
- </bean>
+ class="org.hisp.dhis.completeness.jdbc.JDBCDataSetCompletenessStore"/>
<bean id="internal-process-DataSetCompleteness"
class="org.hisp.dhis.completeness.DataSetCompletenessInternalProcess"