Skip to content

Commit c4160e5

Browse files
committed
Update all sub modules
1 parent ddedf74 commit c4160e5

File tree

7 files changed

+51
-48
lines changed

7 files changed

+51
-48
lines changed

api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/MappedDefinitionType.java

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,10 @@
99
*/
1010
package org.openmrs.module.reporting.report.service.db;
1111

12-
import java.io.Serializable;
13-
import java.sql.PreparedStatement;
14-
import java.sql.ResultSet;
15-
import java.sql.SQLException;
16-
import java.util.HashMap;
17-
import java.util.Map;
18-
import java.util.Properties;
19-
2012
import org.apache.commons.lang.StringUtils;
2113
import org.hibernate.HibernateException;
2214
import org.hibernate.engine.spi.SessionImplementor;
15+
import org.hibernate.engine.spi.SharedSessionContractImplementor;
2316
import org.hibernate.type.Type;
2417
import org.hibernate.usertype.CompositeUserType;
2518
import org.hibernate.usertype.ParameterizedType;
@@ -32,6 +25,14 @@
3225
import org.openmrs.module.reporting.evaluation.parameter.Parameterizable;
3326
import org.openmrs.module.reporting.serializer.ReportingSerializer;
3427

28+
import java.io.Serializable;
29+
import java.sql.PreparedStatement;
30+
import java.sql.ResultSet;
31+
import java.sql.SQLException;
32+
import java.util.HashMap;
33+
import java.util.Map;
34+
import java.util.Properties;
35+
3536
/**
3637
* Custom User-Type for storing Mapped objects in a single table within 2 columns
3738
* This type takes in 2 properties and 1 parameter in the form:
@@ -82,15 +83,15 @@ public boolean isMutable() {
8283
}
8384

8485
/**
85-
* @see CompositeUserType#getPropertyValue(java.lang.Object, int)
86+
* @see CompositeUserType#getPropertyValue(Object, int)
8687
*/
8788
public Object getPropertyValue(Object component, int property) throws HibernateException {
8889
Mapped m = (Mapped) component;
8990
return (property == 0 ? m.getParameterizable() : m.getParameterMappings());
9091
}
9192

9293
/**
93-
* @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object)
94+
* @see CompositeUserType#setPropertyValue(Object, int, Object)
9495
*/
9596
public void setPropertyValue(Object component, int property, Object value) throws HibernateException {
9697
Mapped m = (Mapped) component;
@@ -103,7 +104,7 @@ public void setPropertyValue(Object component, int property, Object value) throw
103104
}
104105

105106
/**
106-
* @see CompositeUserType#deepCopy(java.lang.Object)
107+
* @see CompositeUserType#deepCopy(Object)
107108
*/
108109
public Object deepCopy(Object value) throws HibernateException {
109110
if (value == null) return null;
@@ -117,7 +118,7 @@ public Object deepCopy(Object value) throws HibernateException {
117118
/**
118119
* @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object)
119120
*/
120-
public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException {
121+
public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException {
121122
String parameterizableUuid = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[0], session, owner);
122123
if (StringUtils.isEmpty(parameterizableUuid)) { return null; }
123124
String serializedMappings = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner);
@@ -137,7 +138,7 @@ public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor sessi
137138
/**
138139
* @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor)
139140
*/
140-
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException {
141+
public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
141142
String definitionUuid = null;
142143
String serializedMappings = null;
143144
if (value != null) {
@@ -161,7 +162,7 @@ public void nullSafeSet(PreparedStatement st, Object value, int index, SessionIm
161162
/**
162163
* @see CompositeUserType#replace(Object, Object, SessionImplementor, Object)
163164
*/
164-
public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException {
165+
public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException {
165166
return original;
166167
}
167168

@@ -182,14 +183,14 @@ public int hashCode(Object x) throws HibernateException {
182183
/**
183184
* @see CompositeUserType#disassemble(Object, SessionImplementor)
184185
*/
185-
public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException {
186+
public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException {
186187
return (Serializable) deepCopy(value);
187188
}
188189

189190
/**
190191
* @see CompositeUserType#assemble(Serializable, SessionImplementor, Object)
191192
*/
192-
public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException {
193+
public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException {
193194
return deepCopy(cached);
194195
}
195196

api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/PropertiesType.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
*/
1010
package org.openmrs.module.reporting.report.service.db;
1111

12-
import static java.sql.Types.VARCHAR;
12+
import org.hibernate.HibernateException;
13+
import org.hibernate.engine.spi.SharedSessionContractImplementor;
14+
import org.hibernate.usertype.UserType;
1315

1416
import java.io.IOException;
1517
import java.io.Serializable;
@@ -21,9 +23,7 @@
2123
import java.util.Map;
2224
import java.util.Properties;
2325

24-
import org.hibernate.HibernateException;
25-
import org.hibernate.engine.spi.SessionImplementor;
26-
import org.hibernate.usertype.UserType;
26+
import static java.sql.Types.VARCHAR;
2727

2828
/**
2929
* A report definition type
@@ -106,15 +106,15 @@ public boolean isMutable() {
106106
/**
107107
* @see UserType#nullSafeGet(ResultSet, String[], Object)
108108
*/
109-
public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException {
109+
public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException {
110110
String s = rs.getString(names[0]);
111111
return assemble(s, null);
112112
}
113113

114114
/**
115115
* @see UserType#nullSafeSet(PreparedStatement, Object, int)
116116
*/
117-
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException {
117+
public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
118118
String val = (String) disassemble(value);
119119
st.setString(index, val);
120120
}

api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/RenderingModeType.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,21 @@
99
*/
1010
package org.openmrs.module.reporting.report.service.db;
1111

12-
import java.io.Serializable;
13-
import java.sql.PreparedStatement;
14-
import java.sql.ResultSet;
15-
import java.sql.SQLException;
16-
1712
import org.hibernate.HibernateException;
1813
import org.hibernate.engine.spi.SessionImplementor;
14+
import org.hibernate.engine.spi.SharedSessionContractImplementor;
1915
import org.hibernate.type.Type;
2016
import org.hibernate.usertype.CompositeUserType;
2117
import org.hibernate.usertype.UserType;
2218
import org.openmrs.module.reporting.common.HibernateUtil;
2319
import org.openmrs.module.reporting.report.renderer.RenderingMode;
2420
import org.openmrs.module.reporting.report.renderer.ReportRenderer;
2521

22+
import java.io.Serializable;
23+
import java.sql.PreparedStatement;
24+
import java.sql.ResultSet;
25+
import java.sql.SQLException;
26+
2627
/**
2728
* Custom User-Type for storing RenderingModes in a single table within 2 columns
2829
* This type takes in 2 properties in the form:
@@ -65,15 +66,15 @@ public boolean isMutable() {
6566
}
6667

6768
/**
68-
* @see CompositeUserType#getPropertyValue(java.lang.Object, int)
69+
* @see CompositeUserType#getPropertyValue(Object, int)
6970
*/
7071
public Object getPropertyValue(Object component, int property) throws HibernateException {
7172
RenderingMode m = (RenderingMode) component;
7273
return (property == 0 ? m.getRenderer().getClass() : m.getArgument());
7374
}
7475

7576
/**
76-
* @see CompositeUserType#setPropertyValue(java.lang.Object, int, java.lang.Object)
77+
* @see CompositeUserType#setPropertyValue(Object, int, Object)
7778
*/
7879
public void setPropertyValue(Object component, int property, Object value) throws HibernateException {
7980
RenderingMode m = (RenderingMode) component;
@@ -95,7 +96,7 @@ public void setPropertyValue(Object component, int property, Object value) throw
9596
}
9697

9798
/**
98-
* @see CompositeUserType#deepCopy(java.lang.Object)
99+
* @see CompositeUserType#deepCopy(Object)
99100
*/
100101
public Object deepCopy(Object value) throws HibernateException {
101102
if (value == null) return null;
@@ -106,7 +107,7 @@ public Object deepCopy(Object value) throws HibernateException {
106107
/**
107108
* @see CompositeUserType#nullSafeGet(ResultSet, String[], SessionImplementor, Object)
108109
*/
109-
public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException {
110+
public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException {
110111
Class rendererClass = (Class) HibernateUtil.standardType("CLASS").nullSafeGet(rs, names[0], session, owner);
111112
if (rendererClass == null) { return null; }
112113
String argument = (String) HibernateUtil.standardType("STRING").nullSafeGet(rs, names[1], session, owner);
@@ -123,16 +124,16 @@ public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor sessi
123124
/**
124125
* @see CompositeUserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor)
125126
*/
126-
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException {
127+
public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
127128
RenderingMode mode = (RenderingMode) value;
128129
HibernateUtil.standardType("CLASS").nullSafeSet(st, mode == null ? null : mode.getRenderer().getClass(), index, session);
129130
HibernateUtil.standardType("STRING").nullSafeSet(st, mode == null ? null : mode.getArgument(), index+1, session);
130131
}
131132

132133
/**
133-
* @see CompositeUserType#replace(java.lang.Object, java.lang.Object, org.hibernate.engine.SessionImplementor, java.lang.Object)
134+
* @see CompositeUserType#replace(Object, Object, org.hibernate.engine.SessionImplementor, Object)
134135
*/
135-
public Object replace(Object original, Object target, SessionImplementor session, Object owner) throws HibernateException {
136+
public Object replace(Object original, Object target, SharedSessionContractImplementor session, Object owner) throws HibernateException {
136137
return original;
137138
}
138139

@@ -153,14 +154,14 @@ public int hashCode(Object x) throws HibernateException {
153154
/**
154155
* @see CompositeUserType#disassemble(Object, SessionImplementor)
155156
*/
156-
public Serializable disassemble(Object value, SessionImplementor session) throws HibernateException {
157+
public Serializable disassemble(Object value, SharedSessionContractImplementor session) throws HibernateException {
157158
return (Serializable) deepCopy(value);
158159
}
159160

160161
/**
161162
* @see CompositeUserType#assemble(Serializable, SessionImplementor, Object)
162163
*/
163-
public Object assemble(Serializable cached, SessionImplementor session, Object owner) throws HibernateException {
164+
public Object assemble(Serializable cached, SharedSessionContractImplementor session, Object owner) throws HibernateException {
164165
return deepCopy(cached);
165166
}
166167
}

api-2.0/src/main/java/org/openmrs/module/reporting/report/service/db/ReportDefinitionType.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@
99
*/
1010
package org.openmrs.module.reporting.report.service.db;
1111

12-
import java.io.Serializable;
13-
import java.sql.PreparedStatement;
14-
import java.sql.ResultSet;
15-
import java.sql.SQLException;
16-
import java.sql.Types;
17-
1812
import org.hibernate.HibernateException;
1913
import org.hibernate.engine.spi.SessionImplementor;
14+
import org.hibernate.engine.spi.SharedSessionContractImplementor;
2015
import org.hibernate.usertype.UserType;
2116
import org.openmrs.api.context.Context;
2217
import org.openmrs.module.reporting.report.definition.ReportDefinition;
2318
import org.openmrs.module.reporting.report.definition.service.ReportDefinitionService;
2419

20+
import java.io.Serializable;
21+
import java.sql.PreparedStatement;
22+
import java.sql.ResultSet;
23+
import java.sql.SQLException;
24+
import java.sql.Types;
25+
2526
/**
2627
* A report definition type
2728
*/
@@ -78,7 +79,7 @@ public boolean isMutable() {
7879
/**
7980
* @see UserType#nullSafeGet(ResultSet, String[], Object)
8081
*/
81-
public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor session, Object owner) throws HibernateException, SQLException {
82+
public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws HibernateException, SQLException {
8283
String uuid = rs.getString(names[0]);
8384
if (uuid == null) {
8485
return null;
@@ -89,7 +90,7 @@ public Object nullSafeGet(ResultSet rs, String[] names, SessionImplementor sessi
8990
/**
9091
* @see UserType#nullSafeSet(PreparedStatement, Object, int, SessionImplementor)
9192
*/
92-
public void nullSafeSet(PreparedStatement st, Object value, int index, SessionImplementor session) throws HibernateException, SQLException {
93+
public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException {
9394
ReportDefinition d = (ReportDefinition) value;
9495
String val = (d == null ? null : d.getUuid());
9596
st.setString(index, val);

api-2.2/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<description>2.2 api project for reporting</description>
1414

1515
<properties>
16-
<openMRSVersion>2.2.0</openMRSVersion>
16+
<openMRSVersion>2.7.0</openMRSVersion>
1717
</properties>
1818

1919
<dependencies>

api-2.4/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<description>2.4 api project for reporting</description>
1414

1515
<properties>
16-
<openMRSVersion>2.4.0</openMRSVersion>
16+
<openMRSVersion>2.7.0</openMRSVersion>
1717
</properties>
1818

1919
<dependencies>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
<module>api-1.9</module>
3737
<module>api-1.10</module>
3838
<module>api-2.0</module>
39-
<!-- <module>api-2.2</module>-->
40-
<!-- <module>api-2.4</module>-->
39+
<module>api-2.2</module>
40+
<module>api-2.4</module>
4141
<module>api-tests</module>
4242
<module>omod</module>
4343
</modules>

0 commit comments

Comments
 (0)