dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05957
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1881: Replaced references to sessionFactory with annotations
------------------------------------------------------------
revno: 1881
committer: Lars <larshelg@larshelg-laptop>
branch nick: trunk
timestamp: Tue 2010-05-18 17:42:54 +0200
message:
Replaced references to sessionFactory with annotations
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java
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/dataentryform/hibernate/HibernateDataEntryFormAssociationStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/hibernate/HibernateDataEntryFormStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateCompleteDataSetRegistrationStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateDataSetStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateSectionStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueAuditStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java
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/organisationunit/hibernate/HibernateOrganisationUnitStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/hibernate/HibernatePeriodStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/hibernate/HibernateUserDetailsService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/source/hibernate/HibernateSourceStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/hibernate/HibernateTranslationStore.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.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/dataanalysis/jdbc/JdbcDataAnalysisStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2010-03-08 13:01:03 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataanalysis/jdbc/JdbcDataAnalysisStore.java 2010-05-18 15:42:54 +0000
@@ -44,6 +44,7 @@
import org.hisp.dhis.system.objectmapper.DeflatedDataValueNameMinMaxRowMapper;
import org.hisp.dhis.system.util.ConversionUtils;
import org.hisp.dhis.system.util.TextUtils;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Lars Helge Overland
@@ -55,20 +56,12 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private StatementManager statementManager;
- public void setStatementManager( StatementManager statementManager )
- {
- this.statementManager = statementManager;
- }
-
+ @Autowired
private StatementBuilder statementBuilder;
-
- public void setStatementBuilder( StatementBuilder statementBuilder )
- {
- this.statementBuilder = statementBuilder;
- }
-
+
// -------------------------------------------------------------------------
// OutlierAnalysisStore implementation
// -------------------------------------------------------------------------
=== 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 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/hibernate/HibernateDataElementStore.java 2010-05-18 15:42:54 +0000
@@ -50,6 +50,7 @@
import org.hisp.dhis.system.objectmapper.DataElementOperandMapper;
import org.hisp.dhis.system.util.ConversionUtils;
import org.hisp.dhis.system.util.TextUtils;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Torgeir Lorange Ostby
@@ -63,20 +64,12 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
+ @Autowired
private StatementManager statementManager;
- public void setStatementManager( StatementManager statementManager )
- {
- this.statementManager = statementManager;
- }
-
// -------------------------------------------------------------------------
// DataElement
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/hibernate/HibernateDataEntryFormAssociationStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/hibernate/HibernateDataEntryFormAssociationStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/hibernate/HibernateDataEntryFormAssociationStore.java 2010-05-18 15:42:54 +0000
@@ -38,6 +38,7 @@
import org.hisp.dhis.dataentryform.DataEntryForm;
import org.hisp.dhis.dataentryform.DataEntryFormAssociation;
import org.hisp.dhis.dataentryform.DataEntryFormAssociationStore;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Viet
@@ -49,13 +50,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
// -------------------------------------------------------------------------
// DataEntryFormAssociationStore implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/hibernate/HibernateDataEntryFormStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/hibernate/HibernateDataEntryFormStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataentryform/hibernate/HibernateDataEntryFormStore.java 2010-05-18 15:42:54 +0000
@@ -36,6 +36,7 @@
import org.hisp.dhis.dataentryform.DataEntryForm;
import org.hisp.dhis.dataentryform.DataEntryFormStore;
import org.hisp.dhis.dataset.DataSet;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Bharath Kumar
@@ -48,12 +49,8 @@
// Dependencies
// ------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
-
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
// ------------------------------------------------------------------------
// DataEntryFormStore implementation
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateCompleteDataSetRegistrationStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateCompleteDataSetRegistrationStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateCompleteDataSetRegistrationStore.java 2010-05-18 15:42:54 +0000
@@ -36,6 +36,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 Lars Helge Overland
@@ -48,12 +49,8 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
-
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
private PeriodService periodService;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateDataSetStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateDataSetStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateDataSetStore.java 2010-05-18 15:42:54 +0000
@@ -39,6 +39,7 @@
import org.hisp.dhis.period.PeriodStore;
import org.hisp.dhis.period.PeriodType;
import org.hisp.dhis.source.Source;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Kristian Nordal
@@ -51,12 +52,8 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
-
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
private PeriodStore periodStore;
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateSectionStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateSectionStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/hibernate/HibernateSectionStore.java 2010-05-18 15:42:54 +0000
@@ -32,6 +32,7 @@
import org.hisp.dhis.dataset.DataSet;
import org.hisp.dhis.dataset.Section;
import org.hisp.dhis.dataset.SectionStore;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Tri
@@ -44,13 +45,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
// -------------------------------------------------------------------------
// SectionStore implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueAuditStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueAuditStore.java 2010-04-21 14:32:54 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueAuditStore.java 2010-05-18 15:42:54 +0000
@@ -39,6 +39,7 @@
import org.hisp.dhis.datavalue.DataValueAudit;
import org.hisp.dhis.datavalue.DataValueAuditStore;
import org.hisp.dhis.source.Source;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Quang Nguyen
@@ -51,12 +52,12 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
+ // -------------------------------------------------------------------------
+ // DataValueAuditStore implementation
+ // -------------------------------------------------------------------------
public void addDataValueAudit( DataValueAudit dataValueAudit )
{
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java 2010-05-06 16:05:43 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datavalue/hibernate/HibernateDataValueStore.java 2010-05-18 15:42:54 +0000
@@ -47,6 +47,7 @@
import org.hisp.dhis.period.PeriodStore;
import org.hisp.dhis.period.PeriodType;
import org.hisp.dhis.source.Source;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Torgeir Lorange Ostby
@@ -60,20 +61,12 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
+ @Autowired
private StatementManager statementManager;
- public void setStatementManager( StatementManager statementManager )
- {
- this.statementManager = statementManager;
- }
-
private PeriodStore periodStore;
public void setPeriodStore( PeriodStore periodStore )
=== 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 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/indicator/hibernate/HibernateIndicatorStore.java 2010-05-18 15:42:54 +0000
@@ -37,6 +37,7 @@
import org.hisp.dhis.hibernate.HibernateGenericStore;
import org.hisp.dhis.indicator.Indicator;
import org.hisp.dhis.indicator.IndicatorStore;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Lars Helge Overland
@@ -49,13 +50,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
// -------------------------------------------------------------------------
// Indicator
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java 2010-05-18 14:03:08 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java 2010-05-18 15:42:54 +0000
@@ -48,6 +48,7 @@
import org.hisp.dhis.organisationunit.OrganisationUnitLevel;
import org.hisp.dhis.organisationunit.OrganisationUnitStore;
import org.hisp.dhis.system.objectmapper.OrganisationUnitHierarchyRowMapper;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
/**
@@ -61,27 +62,15 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
+ @Autowired
private StatementManager statementManager;
- public void setStatementManager( StatementManager statementManager )
- {
- this.statementManager = statementManager;
- }
-
+ @Autowired
private JdbcTemplate jdbcTemplate;
- public void setJdbcTemplate( JdbcTemplate jdbcTemplate )
- {
- this.jdbcTemplate = jdbcTemplate;
- }
-
// -------------------------------------------------------------------------
// OrganisationUnit
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/hibernate/HibernatePeriodStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/hibernate/HibernatePeriodStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/period/hibernate/HibernatePeriodStore.java 2010-05-18 15:42:54 +0000
@@ -42,6 +42,7 @@
import org.hisp.dhis.period.PeriodStore;
import org.hisp.dhis.period.PeriodType;
import org.hisp.dhis.source.Source;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* Implements the PeriodStore interface.
@@ -56,13 +57,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
// -------------------------------------------------------------------------
// Period
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/hibernate/HibernateUserDetailsService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/hibernate/HibernateUserDetailsService.java 2010-05-03 13:44:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/hibernate/HibernateUserDetailsService.java 2010-05-18 15:42:54 +0000
@@ -36,6 +36,7 @@
import org.hibernate.criterion.Restrictions;
import org.hisp.dhis.user.UserAuthorityGroup;
import org.hisp.dhis.user.UserCredentials;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.GrantedAuthorityImpl;
@@ -62,12 +63,8 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
-
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
// -------------------------------------------------------------------------
// UserDetailsService implementation
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/source/hibernate/HibernateSourceStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/source/hibernate/HibernateSourceStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/source/hibernate/HibernateSourceStore.java 2010-05-18 15:42:54 +0000
@@ -33,6 +33,7 @@
import org.hibernate.SessionFactory;
import org.hisp.dhis.source.Source;
import org.hisp.dhis.source.SourceStore;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Torgeir Lorange Ostby
@@ -45,13 +46,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
// -------------------------------------------------------------------------
// SourceStore implementation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/hibernate/HibernateTranslationStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/hibernate/HibernateTranslationStore.java 2010-05-11 14:20:51 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/translation/hibernate/HibernateTranslationStore.java 2010-05-18 15:42:54 +0000
@@ -40,6 +40,7 @@
import org.hisp.dhis.system.util.LocaleUtils;
import org.hisp.dhis.translation.Translation;
import org.hisp.dhis.translation.TranslationStore;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Oyvind Brucker
@@ -51,13 +52,9 @@
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
-
// -------------------------------------------------------------------------
// Translation
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java 2010-04-21 19:45:12 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/hibernate/HibernateUserStore.java 2010-05-18 15:42:54 +0000
@@ -45,6 +45,7 @@
import org.hisp.dhis.user.UserCredentials;
import org.hisp.dhis.user.UserSetting;
import org.hisp.dhis.user.UserStore;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
/**
@@ -56,16 +57,13 @@
implements UserStore
{
private Logger logger = Logger.getLogger( getClass() );
+
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
+ @Autowired
private SessionFactory sessionFactory;
-
- public void setSessionFactory( SessionFactory sessionFactory )
- {
- this.sessionFactory = sessionFactory;
- }
private CurrentUserService currentUserService;
@@ -74,7 +72,6 @@
this.currentUserService = currentUserService;
}
-
// -------------------------------------------------------------------------
// User
// -------------------------------------------------------------------------
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2010-05-17 22:56:52 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2010-05-18 15:42:54 +0000
@@ -9,195 +9,148 @@
<!-- Store definitions -->
<bean id="org.hisp.dhis.dataentryform.DataEntryFormAssociationStore"
- class="org.hisp.dhis.dataentryform.hibernate.HibernateDataEntryFormAssociationStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.dataentryform.hibernate.HibernateDataEntryFormAssociationStore"/>
<bean id="org.hisp.dhis.dataentryform.DataEntryFormStore"
- class="org.hisp.dhis.dataentryform.hibernate.HibernateDataEntryFormStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.dataentryform.hibernate.HibernateDataEntryFormStore"/>
<bean id="org.hisp.dhis.customvalue.CustomValueStore"
class="org.hisp.dhis.customvalue.hibernate.HibernateCustomValueStore">
<property name="clazz" value="org.hisp.dhis.customvalue.CustomValue"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.dataelement.DataElementStore"
- class="org.hisp.dhis.dataelement.hibernate.HibernateDataElementStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- <property name="statementManager" ref="statementManager"/>
- </bean>
+ class="org.hisp.dhis.dataelement.hibernate.HibernateDataElementStore"/>
<bean id="org.hisp.dhis.dataelement.DataElementGroupStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.dataelement.DataElementGroup"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.dataelement.DataElementGroupSetStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.dataelement.DataElementGroupSet"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.datadictionary.DataDictionaryStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.datadictionary.DataDictionary"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.datavalue.DataValueStore"
class="org.hisp.dhis.datavalue.hibernate.HibernateDataValueStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- <property name="statementManager" ref="statementManager"/>
<property name="periodStore" ref="org.hisp.dhis.period.PeriodStore"/>
</bean>
<bean id="org.hisp.dhis.indicator.IndicatorStore"
- class="org.hisp.dhis.indicator.hibernate.HibernateIndicatorStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.indicator.hibernate.HibernateIndicatorStore"/>
<bean id="org.hisp.dhis.indicator.IndicatorTypeStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.indicator.IndicatorType"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.indicator.IndicatorGroupStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.indicator.IndicatorGroup"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.indicator.IndicatorGroupSetStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.indicator.IndicatorGroupSet"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.period.PeriodStore"
- class="org.hisp.dhis.period.hibernate.HibernatePeriodStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.period.hibernate.HibernatePeriodStore"/>
<bean id="org.hisp.dhis.source.SourceStore"
- class="org.hisp.dhis.source.hibernate.HibernateSourceStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.source.hibernate.HibernateSourceStore"/>
<bean id="org.hisp.dhis.dataset.DataSetStore"
class="org.hisp.dhis.dataset.hibernate.HibernateDataSetStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- <property name="periodStore"
- ref="org.hisp.dhis.period.PeriodStore"/>
+ <property name="periodStore" ref="org.hisp.dhis.period.PeriodStore"/>
</bean>
<bean id="org.hisp.dhis.dataset.CompleteDataSetRegistrationStore"
- class="org.hisp.dhis.dataset.hibernate.HibernateCompleteDataSetRegistrationStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- <property name="periodService"
- ref="org.hisp.dhis.period.PeriodService"/>
+ class="org.hisp.dhis.dataset.hibernate.HibernateCompleteDataSetRegistrationStore">
+ <property name="periodService" ref="org.hisp.dhis.period.PeriodService"/>
</bean>
<bean id="org.hisp.dhis.minmax.MinMaxDataElementStore"
class="org.hisp.dhis.minmax.hibernate.HibernateMinMaxDataElementStore">
<property name="clazz" value="org.hisp.dhis.minmax.MinMaxDataElement"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.expression.ExpressionStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.expression.Expression"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.validation.ValidationRuleStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.validation.ValidationRule"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.validation.ValidationRuleGroupStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.validation.ValidationRuleGroup"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.dataelement.DataElementCategoryStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.dataelement.DataElementCategory"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.dataelement.DataElementCategoryOptionStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.dataelement.DataElementCategoryOption"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.dataelement.DataElementCategoryComboStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.dataelement.DataElementCategoryCombo"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.dataelement.DataElementCategoryOptionComboStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.dataelement.DataElementCategoryOptionCombo"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.dataset.SectionStore"
- class="org.hisp.dhis.dataset.hibernate.HibernateSectionStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.dataset.hibernate.HibernateSectionStore"/>
<bean id="org.hisp.dhis.organisationunit.OrganisationUnitStore"
- class="org.hisp.dhis.organisationunit.hibernate.HibernateOrganisationUnitStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- <property name="statementManager" ref="statementManager"/>
- <property name="jdbcTemplate" ref="jdbcTemplate"/>
- </bean>
+ class="org.hisp.dhis.organisationunit.hibernate.HibernateOrganisationUnitStore"/>
<bean id="org.hisp.dhis.organisationunit.OrganisationUnitGroupStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.organisationunit.OrganisationUnitGroup"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.organisationunit.OrganisationUnitGroupSetStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.organisationunit.OrganisationUnitGroupSet"/>
- <property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean id="org.hisp.dhis.dataanalysis.jdbc.DataAnalysisStore"
- class="org.hisp.dhis.dataanalysis.jdbc.JdbcDataAnalysisStore">
- <property name="statementManager" ref="statementManager"/>
- <property name="statementBuilder" ref="statementBuilder"/>
- </bean>
+ class="org.hisp.dhis.dataanalysis.jdbc.JdbcDataAnalysisStore"/>
<bean id="org.hisp.dhis.datavalue.DataValueAuditStore"
- class="org.hisp.dhis.datavalue.hibernate.HibernateDataValueAuditStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.datavalue.hibernate.HibernateDataValueAuditStore"/>
<bean id="org.hisp.dhis.user.UserStore"
class="org.hisp.dhis.user.hibernate.HibernateUserStore">
- <property name="sessionFactory" ref="sessionFactory"/>
- <property name="currentUserService"
- ref="org.hisp.dhis.user.CurrentUserService"/>
+ <property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService"/>
</bean>
<bean id="org.hisp.dhis.validation.ValidationCriteriaStore"
class="org.hisp.dhis.hibernate.HibernateGenericStore">
<property name="clazz" value="org.hisp.dhis.validation.ValidationCriteria" />
- <property name="sessionFactory" ref="sessionFactory" />
</bean>
+ <bean id="org.hisp.dhis.translation.TranslationStore"
+ class="org.hisp.dhis.translation.hibernate.HibernateTranslationStore"/>
+
<!-- Service definitions -->
<bean id="org.hisp.dhis.customvalue.CustomValueService"
@@ -439,6 +392,11 @@
<property name="userStore" ref="org.hisp.dhis.user.UserStore"/>
</bean>
+ <bean id="org.hisp.dhis.translation.TranslationService"
+ class="org.hisp.dhis.translation.DefaultTranslationService">
+ <property name="translationStore" ref="org.hisp.dhis.translation.TranslationStore" />
+ </bean>
+
<bean id="org.hisp.dhis.validation.ValidationCriteriaService"
class="org.hisp.dhis.validation.DefaultValidationCriteriaService">
<property name="validationCriteriaStore"
@@ -481,18 +439,6 @@
</property>
</bean>
- <!-- Translation -->
-
- <bean id="org.hisp.dhis.translation.TranslationStore"
- class="org.hisp.dhis.translation.hibernate.HibernateTranslationStore">
- <property name="sessionFactory" ref="sessionFactory" />
- </bean>
-
- <bean id="org.hisp.dhis.translation.TranslationService"
- class="org.hisp.dhis.translation.DefaultTranslationService">
- <property name="translationStore" ref="org.hisp.dhis.translation.TranslationStore" />
- </bean>
-
<!-- I18n object definitions -->
<bean id="I18nDataElement" class="org.hisp.dhis.i18n.I18nObject">
@@ -971,9 +917,7 @@
</bean>
<bean id="userDetailsService"
- class="org.hisp.dhis.security.hibernate.HibernateUserDetailsService">
- <property name="sessionFactory" ref="sessionFactory"/>
- </bean>
+ class="org.hisp.dhis.security.hibernate.HibernateUserDetailsService"/>
<bean id="passwordEncoder"
class="org.springframework.security.authentication.encoding.Md5PasswordEncoder"/>
=== modified file 'dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java'
--- dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java 2010-04-12 21:23:33 +0000
+++ dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/hibernate/HibernateGenericStore.java 2010-05-18 15:42:54 +0000
@@ -36,6 +36,7 @@
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;
import org.hisp.dhis.common.GenericIdentifiableObjectStore;
+import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Lars Helge Overland
@@ -44,6 +45,7 @@
public class HibernateGenericStore<T>
implements GenericIdentifiableObjectStore<T>
{
+ @Autowired
protected SessionFactory sessionFactory;
public void setSessionFactory( SessionFactory sessionFactory )