diff --git a/build.gradle b/build.gradle index a11d9493..88c59050 100644 --- a/build.gradle +++ b/build.gradle @@ -62,7 +62,6 @@ dependencies { implementation 'org.springdoc:springdoc-openapi:2.4.0' implementation 'org.postgresql:postgresql:42.7.3' implementation 'org.liquibase:liquibase-core:4.27.0' - //implementation 'com.vladmihalcea:hibernate-types-60:2.21.1' implementation 'io.hypersistence:hypersistence-utils-hibernate-63:3.7.3' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.0' implementation 'org.openapitools:jackson-databind-nullable:0.2.6' diff --git a/src/main/java/net/hostsharing/hsadminng/mapper/PostgresArray.java b/src/main/java/net/hostsharing/hsadminng/mapper/PostgresArray.java deleted file mode 100644 index e1e1d056..00000000 --- a/src/main/java/net/hostsharing/hsadminng/mapper/PostgresArray.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.hostsharing.hsadminng.mapper; - -import lombok.experimental.UtilityClass; -import org.postgresql.util.PGtokenizer; - -import java.lang.reflect.Array; -import java.nio.charset.StandardCharsets; -import java.util.function.Function; - -@UtilityClass -public class PostgresArray { - - /** - * Converts a byte[], as returned for a Postgres-array by native queries, to a Java array. - * - *
This example code worked with Hibernate 5 (Spring Boot 3.0.x): - *
- * return (UUID[]) em.createNativeQuery("select currentSubjectsUuids() as uuids", UUID[].class).getSingleResult();
- *
- *
- *
- * With Hibernate 6 (Spring Boot 3.1.x), this utility method can be used like such: - *
- * final byte[] result = (byte[]) em.createNativeQuery("select * from currentSubjectsUuids() as uuids", UUID[].class)
- * .getSingleResult();
- * return fromPostgresArray(result, UUID.class, UUID::fromString);
- *
- *
- *
- * @param pgArray the byte[] returned by a native query containing as rendered for a Postgres array
- * @param elementClass the class of a single element of the Java array to be returned
- * @param itemParser converts a string element to the specified elementClass
- * @return a Java array containing the data from pgArray
- * @param