Skip to content

Commit

Permalink
Merge pull request #3 from samuelmale/migrate-platform-2_x
Browse files Browse the repository at this point in the history
Migrate to OpenMRS 2.x
  • Loading branch information
samuelmale authored Jan 24, 2024
2 parents 91285c1 + 61dbf74 commit f0890ee
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.Criteria;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.openmrs.api.db.hibernate.DbSessionFactory;
import org.openmrs.module.hivscreening.HivScreening;
import org.openmrs.module.hivscreening.ScreeningRegisterInfo;
import org.openmrs.module.hivscreening.TestingKit;
Expand All @@ -32,19 +32,19 @@
public class HibernateHivScreeningRegisterDAO implements HivScreeningRegisterDAO {
protected final Log log = LogFactory.getLog(this.getClass());

private SessionFactory sessionFactory;
private DbSessionFactory sessionFactory;

/**
* @param sessionFactory the sessionFactory to set
*/
public void setSessionFactory(SessionFactory sessionFactory) {
public void setSessionFactory(DbSessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}

/**
* @return the sessionFactory
*/
public SessionFactory getSessionFactory() {
public DbSessionFactory getSessionFactory() {
return sessionFactory;
}

Expand Down
2 changes: 1 addition & 1 deletion api/src/main/resources/moduleApplicationContext.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<property name="dao">
<bean class="${project.parent.groupId}.${project.parent.artifactId}.api.db.hibernate.HibernateHivScreeningRegisterDAO">
<property name="sessionFactory">
<ref bean="sessionFactory" />
<ref bean="dbSessionFactory" />
</property>
</bean>
</property>
Expand Down
6 changes: 6 additions & 0 deletions omod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@

<!-- End OpenMRS core -->

<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>legacyui-omod</artifactId>
<version>1.15.4-sigdep-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>

<build>
Expand Down
17 changes: 14 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</modules>

<properties>
<openMRSVersion>1.11.9</openMRSVersion>
<openMRSVersion>2.1.1</openMRSVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand Down Expand Up @@ -85,6 +85,12 @@

<!-- End OpenMRS core -->

<dependency>
<groupId>org.openmrs.module</groupId>
<artifactId>legacyui-omod</artifactId>
<version>1.15.4-sigdep-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand All @@ -95,8 +101,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<target>1.6</target>
<source>1.6</source>
<target>1.8</target>
<source>1.8</source>
</configuration>
</plugin>
<plugin>
Expand All @@ -114,6 +120,11 @@
</build>

<repositories>
<repository>
<id>uwdigi-repo-central</id>
<name>DIGI Public Repository</name>
<url>https://packages.uwdigi.org/artifactory/public</url>
</repository>
<repository>
<id>openmrs-repo</id>
<name>OpenMRS Nexus Repository</name>
Expand Down

0 comments on commit f0890ee

Please sign in to comment.