Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to OpenMRS 2.x #3

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading