Skip to content

Commit 733fdde

Browse files
cigalyvladmihalcea
authored andcommitted
Add support for Hibernate ORM 7.3 and Jackson 3
1 parent bb6c3f6 commit 733fdde

File tree

368 files changed

+37171
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

368 files changed

+37171
-29
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@ That's it!
2020

2121
The Hypersistence Utils project gives you general-purpose utilities for both Spring and Hibernate.
2222

23-
The main advantage of this project is that it supports a broad range of Hibernate versions, spanning from Hibernate ORM **7.2**, **7.1**, **7.0**, to **6.6**, **6.5**, **6.4**, **6.3**, **6.2**, **6.1**, **6.0**, **5.6**, **5.5**, **5.4**, **5.3**, **5.2**, **5.1**, and **5.0**.
23+
The main advantage of this project is that it supports a broad range of Hibernate versions, spanning from Hibernate ORM **7.3**, **7.2**, **7.1**, **7.0**, to **6.6**, **6.5**, **6.4**, **6.3**, **6.2**, **6.1**, **6.0**, **5.6**, **5.5**, **5.4**, **5.3**, **5.2**, **5.1**, and **5.0**.
2424

2525
### Installation Guide
2626

2727
Depending on the Hibernate version you are using, you need to add the following dependency:
2828

29+
#### Hibernate 7.3
30+
31+
<dependency>
32+
<groupId>io.hypersistence</groupId>
33+
<artifactId>hypersistence-utils-hibernate-73</artifactId>
34+
<version>3.14.1</version>
35+
</dependency>
36+
2937
#### Hibernate 7.2 and 7.1
3038

3139
<dependency>

hypersistence-utils-hibernate-71/src/main/java/io/hypersistence/utils/hibernate/type/array/LocalDateArrayType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
@Deprecated
2424
public class LocalDateArrayType extends AbstractArrayType<java.time.LocalDate[]> {
2525

26-
public static final io.hypersistence.utils.hibernate.type.array.LocalDateArrayType INSTANCE =
27-
new io.hypersistence.utils.hibernate.type.array.LocalDateArrayType();
26+
public static final LocalDateArrayType INSTANCE =
27+
new LocalDateArrayType();
2828

2929
public LocalDateArrayType() {
3030
super(

hypersistence-utils-hibernate-71/src/test/java/io/hypersistence/utils/hibernate/type/array/PostgreSQLEnumArrayTypeTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,9 @@
55
import org.hibernate.annotations.Type;
66
import org.hibernate.query.Query;
77
import org.hibernate.query.TypedParameterValue;
8-
import org.junit.Before;
98
import org.junit.Test;
109

11-
import javax.sql.DataSource;
12-
import java.sql.Connection;
13-
import java.sql.SQLException;
14-
import java.sql.Statement;
15-
1610
import static org.junit.Assert.assertArrayEquals;
17-
import static org.junit.Assert.fail;
1811

1912
/**
2013
* @author Nikita Konev

hypersistence-utils-hibernate-71/src/test/java/io/hypersistence/utils/hibernate/type/array/PostgreSQLMultipleEnumArrayTypeTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,9 @@
33
import io.hypersistence.utils.hibernate.util.AbstractPostgreSQLIntegrationTest;
44
import jakarta.persistence.*;
55
import org.hibernate.annotations.Type;
6-
import org.junit.Before;
76
import org.junit.Test;
87

9-
import javax.sql.DataSource;
10-
import java.sql.Connection;
11-
import java.sql.SQLException;
12-
import java.sql.Statement;
13-
148
import static org.junit.Assert.assertArrayEquals;
15-
import static org.junit.Assert.fail;
169

1710
/**
1811
* @author Vlad Mihalcea

hypersistence-utils-hibernate-71/src/test/java/io/hypersistence/utils/hibernate/type/array/WrapperArrayTypeTest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@
66
import jakarta.persistence.Entity;
77
import jakarta.persistence.Table;
88
import jakarta.persistence.Tuple;
9-
import org.hibernate.annotations.Type;
109
import org.junit.Test;
1110

12-
import javax.sql.DataSource;
13-
import java.sql.Connection;
14-
import java.sql.SQLException;
15-
import java.sql.Statement;
1611
import java.util.List;
1712
import java.util.UUID;
1813

19-
import static org.junit.Assert.*;
14+
import static org.junit.Assert.assertArrayEquals;
15+
import static org.junit.Assert.assertEquals;
2016

2117
/**
2218
* @author Vlad Mihalcea

hypersistence-utils-hibernate-71/src/test/java/io/hypersistence/utils/hibernate/type/json/PostgreSQLJsonNodeBinaryTypeTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
import io.hypersistence.utils.hibernate.util.AbstractPostgreSQLIntegrationTest;
66
import io.hypersistence.utils.jdbc.validator.SQLStatementCountValidator;
77
import jakarta.persistence.*;
8-
import net.ttddyy.dsproxy.QueryCount;
9-
import net.ttddyy.dsproxy.QueryCountHolder;
108
import org.hibernate.Session;
119
import org.hibernate.annotations.NaturalId;
1210
import org.hibernate.annotations.Type;

hypersistence-utils-hibernate-71/src/test/java/io/hypersistence/utils/hibernate/type/json/SQLServerJsonStringPropertyTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@
55
import io.hypersistence.utils.hibernate.util.JsonNodeUtil;
66
import io.hypersistence.utils.jdbc.validator.SQLStatementCountValidator;
77
import jakarta.persistence.*;
8-
import net.ttddyy.dsproxy.QueryCount;
9-
import net.ttddyy.dsproxy.QueryCountHolder;
108
import org.hibernate.Session;
119
import org.hibernate.annotations.Check;
1210
import org.hibernate.annotations.NaturalId;
1311
import org.hibernate.annotations.Type;
1412
import org.hibernate.jpa.boot.spi.TypeContributorList;
1513
import org.hibernate.query.NativeQuery;
16-
import org.hibernate.type.JavaObjectType;
17-
import org.hibernate.type.descriptor.java.JavaType;
1814
import org.junit.Test;
1915

2016
import java.util.Collections;
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
3+
<parent>
4+
<groupId>io.hypersistence</groupId>
5+
<artifactId>hypersistence-utils-parent</artifactId>
6+
<version>3.14.2-SNAPSHOT</version>
7+
</parent>
8+
9+
<modelVersion>4.0.0</modelVersion>
10+
11+
<artifactId>hypersistence-utils-hibernate-73</artifactId>
12+
<version>3.14.2-SNAPSHOT</version>
13+
<packaging>jar</packaging>
14+
15+
<name>hypersistence-utils-hibernate-73</name>
16+
<description>Utilities for Spring and Hibernate ORM 7.3</description>
17+
18+
<dependencies>
19+
20+
<dependency>
21+
<groupId>net.ttddyy</groupId>
22+
<artifactId>datasource-proxy</artifactId>
23+
<version>${datasource-proxy.version}</version>
24+
<scope>provided</scope>
25+
<optional>true</optional>
26+
</dependency>
27+
28+
<dependency>
29+
<groupId>org.hibernate.orm</groupId>
30+
<artifactId>hibernate-core</artifactId>
31+
<version>${hibernate.version}</version>
32+
<scope>provided</scope>
33+
</dependency>
34+
35+
<dependency>
36+
<groupId>tools.jackson.module</groupId>
37+
<artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId>
38+
<version>${jackson-module.version}</version>
39+
<scope>provided</scope>
40+
<optional>true</optional>
41+
</dependency>
42+
43+
<dependency>
44+
<groupId>tools.jackson.module</groupId>
45+
<artifactId>jackson-module-kotlin</artifactId>
46+
<version>${jackson-module.version}</version>
47+
<scope>provided</scope>
48+
<optional>true</optional>
49+
</dependency>
50+
51+
<dependency>
52+
<groupId>com.google.guava</groupId>
53+
<artifactId>guava</artifactId>
54+
<version>${guava.version}</version>
55+
<scope>provided</scope>
56+
<optional>true</optional>
57+
</dependency>
58+
59+
<dependency>
60+
<groupId>org.javamoney</groupId>
61+
<artifactId>moneta</artifactId>
62+
<version>${moneta.version}</version>
63+
<type>pom</type>
64+
<scope>provided</scope>
65+
<optional>true</optional>
66+
</dependency>
67+
68+
<dependency>
69+
<groupId>org.hibernate.orm</groupId>
70+
<artifactId>hibernate-jcache</artifactId>
71+
<version>${hibernate.version}</version>
72+
<scope>test</scope>
73+
</dependency>
74+
75+
<dependency>
76+
<groupId>org.ehcache</groupId>
77+
<artifactId>ehcache</artifactId>
78+
<version>${ehcache.version}</version>
79+
<scope>test</scope>
80+
<exclusions>
81+
<exclusion>
82+
<groupId>org.glassfish.jaxb</groupId>
83+
<artifactId>jaxb-runtime</artifactId>
84+
</exclusion>
85+
</exclusions>
86+
</dependency>
87+
88+
<dependency>
89+
<groupId>jakarta.xml.bind</groupId>
90+
<artifactId>jakarta.xml.bind-api</artifactId>
91+
<version>${jakarta-bind.api.version}</version>
92+
</dependency>
93+
94+
<dependency>
95+
<groupId>com.zaxxer</groupId>
96+
<artifactId>HikariCP</artifactId>
97+
<version>${hikari.version}</version>
98+
<exclusions>
99+
<exclusion>
100+
<groupId>org.slf4j</groupId>
101+
<artifactId>slf4j-api</artifactId>
102+
</exclusion>
103+
</exclusions>
104+
<scope>provided</scope>
105+
<optional>true</optional>
106+
</dependency>
107+
108+
<dependency>
109+
<groupId>org.aspectj</groupId>
110+
<artifactId>aspectjrt</artifactId>
111+
<version>${aspectj.version}</version>
112+
<scope>provided</scope>
113+
<optional>true</optional>
114+
</dependency>
115+
116+
<dependency>
117+
<groupId>org.aspectj</groupId>
118+
<artifactId>aspectjweaver</artifactId>
119+
<version>${aspectj.version}</version>
120+
<scope>provided</scope>
121+
<optional>true</optional>
122+
</dependency>
123+
124+
<dependency>
125+
<groupId>org.springframework</groupId>
126+
<artifactId>spring-beans</artifactId>
127+
<version>${spring.version}</version>
128+
<scope>provided</scope>
129+
<optional>true</optional>
130+
</dependency>
131+
132+
<dependency>
133+
<groupId>org.springframework</groupId>
134+
<artifactId>spring-context</artifactId>
135+
<version>${spring.version}</version>
136+
<scope>provided</scope>
137+
<optional>true</optional>
138+
</dependency>
139+
140+
<dependency>
141+
<groupId>org.springframework</groupId>
142+
<artifactId>spring-tx</artifactId>
143+
<version>${spring.version}</version>
144+
<scope>provided</scope>
145+
<optional>true</optional>
146+
</dependency>
147+
148+
<dependency>
149+
<groupId>org.springframework</groupId>
150+
<artifactId>spring-orm</artifactId>
151+
<version>${spring.version}</version>
152+
<scope>provided</scope>
153+
<optional>true</optional>
154+
</dependency>
155+
156+
<dependency>
157+
<groupId>org.springframework.data</groupId>
158+
<artifactId>spring-data-jpa</artifactId>
159+
<version>${spring-data.version}</version>
160+
<scope>provided</scope>
161+
<optional>true</optional>
162+
</dependency>
163+
164+
<!-- Testing -->
165+
166+
<dependency>
167+
<groupId>org.hibernate.orm</groupId>
168+
<artifactId>hibernate-envers</artifactId>
169+
<version>${hibernate.version}</version>
170+
<scope>test</scope>
171+
</dependency>
172+
173+
<dependency>
174+
<groupId>org.springframework</groupId>
175+
<artifactId>spring-test</artifactId>
176+
<version>${spring.version}</version>
177+
<type>jar</type>
178+
<scope>test</scope>
179+
</dependency>
180+
181+
<dependency>
182+
<groupId>org.jspecify</groupId>
183+
<artifactId>jspecify</artifactId>
184+
<version>${jspecify.version}</version>
185+
<scope>test</scope>
186+
</dependency>
187+
188+
</dependencies>
189+
190+
<build>
191+
<plugins>
192+
<plugin>
193+
<groupId>org.apache.maven.plugins</groupId>
194+
<artifactId>maven-jar-plugin</artifactId>
195+
<version>${maven-jar-plugin.version}</version>
196+
<configuration>
197+
<archive>
198+
<manifestEntries>
199+
<Automatic-Module-Name>io.hypersistence.utils.hibernate.type</Automatic-Module-Name>
200+
</manifestEntries>
201+
</archive>
202+
</configuration>
203+
<executions>
204+
<execution>
205+
<goals>
206+
<goal>test-jar</goal>
207+
</goals>
208+
</execution>
209+
</executions>
210+
</plugin>
211+
</plugins>
212+
</build>
213+
214+
<properties>
215+
<jdk.version>17</jdk.version>
216+
<jdk-test.version>17</jdk-test.version>
217+
<maven.compiler.release>${jdk.version}</maven.compiler.release>
218+
<maven.compiler.testRelease>${jdk-test.version}</maven.compiler.testRelease>
219+
220+
<hibernate.version>7.3.0.CR1</hibernate.version>
221+
222+
<jackson-module.version>3.0.0</jackson-module.version>
223+
<guava.version>32.1.3-jre</guava.version>
224+
<moneta.version>1.4.2</moneta.version>
225+
226+
<ehcache.version>3.10.8</ehcache.version>
227+
<jakarta-bind.api.version>4.0.1</jakarta-bind.api.version>
228+
229+
<hikari.version>5.0.1</hikari.version>
230+
<aspectj.version>1.9.20.1</aspectj.version>
231+
<spring.version>7.0.2</spring.version>
232+
<spring-data.version>4.0.0</spring-data.version>
233+
<jspecify.version>1.0.0</jspecify.version>
234+
235+
</properties>
236+
237+
</project>

0 commit comments

Comments
 (0)