Skip to content

Commit bd8ec6d

Browse files
Spring JPA JSON Relational Duality View Builder (#198)
Spring JPA JSON Relational Duality View Builder (#198) Signed-off-by: Anders Swanson <anders.swanson@oracle.com>
1 parent 0a6b29b commit bd8ec6d

Some content is hidden

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

48 files changed

+2089
-63
lines changed
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Copyright (c) 2025, Oracle and/or its affiliates. -->
3+
<!-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -->
4+
<project xmlns="http://maven.apache.org/POM/4.0.0"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
7+
<modelVersion>4.0.0</modelVersion>
8+
<parent>
9+
<artifactId>oracle-spring-boot-starters</artifactId>
10+
<groupId>com.oracle.database.spring</groupId>
11+
<version>25.2.0</version>
12+
<relativePath>../pom.xml</relativePath>
13+
</parent>
14+
15+
<artifactId>oracle-spring-boot-json-data-tools</artifactId>
16+
<version>25.2.0</version>
17+
18+
<name>Oracle Spring Boot - JSON Data Tools</name>
19+
<description>Spring Boot for Oracle Database JSON Data Tools</description>
20+
<url>https://github.com/oracle/spring-cloud-oracle/tree/main/database/starters/oracle-spring-boot-json-data-tools</url>
21+
22+
<organization>
23+
<name>Oracle America, Inc.</name>
24+
<url>https://www.oracle.com</url>
25+
</organization>
26+
27+
<developers>
28+
<developer>
29+
<name>Oracle</name>
30+
<email>obaas_ww at oracle.com</email>
31+
<organization>Oracle America, Inc.</organization>
32+
<organizationUrl>https://www.oracle.com</organizationUrl>
33+
</developer>
34+
</developers>
35+
36+
<licenses>
37+
<license>
38+
<name>The Universal Permissive License (UPL), Version 1.0</name>
39+
<url>https://oss.oracle.com/licenses/upl/</url>
40+
<distribution>repo</distribution>
41+
</license>
42+
</licenses>
43+
44+
<scm>
45+
<url>https://github.com/oracle/spring-cloud-oracle</url>
46+
<connection>scm:git:https://github.com/oracle/spring-cloud-oracle.git</connection>
47+
<developerConnection>scm:git:git@github.com:oracle/spring-cloud-oracle.git</developerConnection>
48+
</scm>
49+
50+
<dependencies>
51+
<dependency>
52+
<groupId>com.oracle.database.spring</groupId>
53+
<artifactId>oracle-spring-boot-starter-ucp</artifactId>
54+
<version>${project.version}</version>
55+
</dependency>
56+
57+
<dependency>
58+
<groupId>org.springframework.boot</groupId>
59+
<artifactId>spring-boot-starter-jdbc</artifactId>
60+
</dependency>
61+
62+
<dependency>
63+
<groupId>jakarta.json</groupId>
64+
<artifactId>jakarta.json-api</artifactId>
65+
</dependency>
66+
67+
<dependency>
68+
<groupId>org.eclipse.parsson</groupId>
69+
<artifactId>parsson</artifactId>
70+
</dependency>
71+
72+
<dependency>
73+
<groupId>jakarta.json.bind</groupId>
74+
<artifactId>jakarta.json.bind-api</artifactId>
75+
</dependency>
76+
77+
<dependency>
78+
<groupId>org.eclipse</groupId>
79+
<artifactId>yasson</artifactId>
80+
</dependency>
81+
82+
<dependency>
83+
<groupId>org.testcontainers</groupId>
84+
<artifactId>junit-jupiter</artifactId>
85+
<scope>test</scope>
86+
</dependency>
87+
88+
<dependency>
89+
<groupId>org.testcontainers</groupId>
90+
<artifactId>testcontainers</artifactId>
91+
<scope>test</scope>
92+
</dependency>
93+
94+
<dependency>
95+
<groupId>org.testcontainers</groupId>
96+
<artifactId>oracle-free</artifactId>
97+
<scope>test</scope>
98+
</dependency>
99+
100+
<dependency>
101+
<groupId>org.springframework.boot</groupId>
102+
<artifactId>spring-boot-starter-test</artifactId>
103+
<scope>test</scope>
104+
</dependency>
105+
106+
<dependency>
107+
<groupId>org.springframework.boot</groupId>
108+
<artifactId>spring-boot-testcontainers</artifactId>
109+
<scope>test</scope>
110+
</dependency>
111+
112+
<dependency>
113+
<groupId>org.springframework.boot</groupId>
114+
<artifactId>spring-boot-starter-data-jdbc</artifactId>
115+
<scope>test</scope>
116+
</dependency>
117+
118+
<dependency>
119+
<groupId>org.projectlombok</groupId>
120+
<artifactId>lombok</artifactId>
121+
<scope>test</scope>
122+
</dependency>
123+
</dependencies>
124+
</project>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
package com.oracle.spring.json;
44

5-
import javax.sql.DataSource;
65
import java.sql.PreparedStatement;
76
import java.time.Duration;
87
import java.util.List;
@@ -12,6 +11,7 @@
1211
import com.oracle.spring.json.jsonb.JSONBRowMapper;
1312
import com.oracle.spring.json.test.Student;
1413
import com.oracle.spring.json.test.StudentDetails;
14+
import javax.sql.DataSource;
1515
import oracle.jdbc.OracleTypes;
1616
import oracle.ucp.jdbc.PoolDataSource;
1717
import oracle.ucp.jdbc.PoolDataSourceFactory;
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!-- Copyright (c) 2025, Oracle and/or its affiliates. -->
3+
<!-- Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. -->
4+
<project xmlns="http://maven.apache.org/POM/4.0.0"
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
7+
<modelVersion>4.0.0</modelVersion>
8+
<parent>
9+
<artifactId>oracle-spring-boot-starters</artifactId>
10+
<groupId>com.oracle.database.spring</groupId>
11+
<version>25.2.0</version>
12+
<relativePath>../pom.xml</relativePath>
13+
</parent>
14+
15+
<artifactId>oracle-spring-boot-json-relational-duality-views</artifactId>
16+
<version>25.2.0</version>
17+
18+
<name>Oracle Spring Boot - JSON Relational Duality Views</name>
19+
<description>Spring Boot for Oracle Database JSON Relational duality Views</description>
20+
<url>https://github.com/oracle/spring-cloud-oracle/tree/main/database/starters/oracle-spring-boot-json-relational-duality-views</url>
21+
22+
<organization>
23+
<name>Oracle America, Inc.</name>
24+
<url>https://www.oracle.com</url>
25+
</organization>
26+
27+
<developers>
28+
<developer>
29+
<name>Oracle</name>
30+
<email>obaas_ww at oracle.com</email>
31+
<organization>Oracle America, Inc.</organization>
32+
<organizationUrl>https://www.oracle.com</organizationUrl>
33+
</developer>
34+
</developers>
35+
36+
<licenses>
37+
<license>
38+
<name>The Universal Permissive License (UPL), Version 1.0</name>
39+
<url>https://oss.oracle.com/licenses/upl/</url>
40+
<distribution>repo</distribution>
41+
</license>
42+
</licenses>
43+
44+
<scm>
45+
<url>https://github.com/oracle/spring-cloud-oracle</url>
46+
<connection>scm:git:https://github.com/oracle/spring-cloud-oracle.git</connection>
47+
<developerConnection>scm:git:git@github.com:oracle/spring-cloud-oracle.git</developerConnection>
48+
</scm>
49+
50+
<dependencies>
51+
<dependency>
52+
<groupId>com.oracle.database.spring</groupId>
53+
<artifactId>oracle-spring-boot-json-data-tools</artifactId>
54+
<version>${project.version}</version>
55+
</dependency>
56+
57+
<dependency>
58+
<groupId>org.springframework.boot</groupId>
59+
<artifactId>spring-boot-starter-data-jpa</artifactId>
60+
</dependency>
61+
62+
<dependency>
63+
<groupId>org.testcontainers</groupId>
64+
<artifactId>junit-jupiter</artifactId>
65+
<scope>test</scope>
66+
</dependency>
67+
68+
<dependency>
69+
<groupId>org.testcontainers</groupId>
70+
<artifactId>testcontainers</artifactId>
71+
<scope>test</scope>
72+
</dependency>
73+
74+
<dependency>
75+
<groupId>org.testcontainers</groupId>
76+
<artifactId>oracle-free</artifactId>
77+
<scope>test</scope>
78+
</dependency>
79+
80+
<dependency>
81+
<groupId>org.springframework.boot</groupId>
82+
<artifactId>spring-boot-starter-test</artifactId>
83+
<scope>test</scope>
84+
</dependency>
85+
86+
<dependency>
87+
<groupId>org.springframework.boot</groupId>
88+
<artifactId>spring-boot-testcontainers</artifactId>
89+
<scope>test</scope>
90+
</dependency>
91+
92+
<dependency>
93+
<groupId>org.projectlombok</groupId>
94+
<artifactId>lombok</artifactId>
95+
<scope>test</scope>
96+
</dependency>
97+
</dependencies>
98+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) 2025, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
package com.oracle.spring.json.duality.annotation;
5+
6+
import java.lang.annotation.Retention;
7+
import java.lang.annotation.RetentionPolicy;
8+
import java.lang.annotation.Target;
9+
10+
@Target({})
11+
@Retention(RetentionPolicy.RUNTIME)
12+
public @interface AccessMode {
13+
boolean insert() default false;
14+
boolean update() default false;
15+
boolean delete() default false;
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) 2025, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
package com.oracle.spring.json.duality.annotation;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
@Documented
13+
@Target({ElementType.TYPE, ElementType.FIELD})
14+
@Retention(RetentionPolicy.RUNTIME)
15+
public @interface JsonRelationalDualityView {
16+
String name() default "";
17+
18+
boolean selfReferential() default false;
19+
20+
AccessMode accessMode() default @AccessMode();
21+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// Copyright (c) 2025, Oracle and/or its affiliates.
2+
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
4+
package com.oracle.spring.json.duality.annotation;
5+
6+
import java.lang.annotation.Documented;
7+
import java.lang.annotation.ElementType;
8+
import java.lang.annotation.Retention;
9+
import java.lang.annotation.RetentionPolicy;
10+
import java.lang.annotation.Target;
11+
12+
13+
@Documented
14+
@Target({ElementType.TYPE})
15+
@Retention(RetentionPolicy.RUNTIME)
16+
public @interface JsonRelationalDualityViewScan {
17+
String[] basePackages() default {};
18+
19+
Class<?>[] basePackageClasses() default {};
20+
}

0 commit comments

Comments
 (0)