Skip to content

Commit 04c942f

Browse files
nguyennamthaipivovarit
authored andcommitted
Spring Boot Support for jOOQ (eugenp#438)
* initial commit * revision of spring boot support for jooq * initial commit for spring boot support for jooq
1 parent aadaba0 commit 04c942f

74 files changed

Lines changed: 17396 additions & 1 deletion

Some content is hidden

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

‎jooq-spring/pom.xml‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,19 @@
1414
<junit.version>4.12</junit.version>
1515
</properties>
1616

17+
<dependencyManagement>
18+
<dependencies>
19+
<dependency>
20+
<!-- Import dependency management from Spring Boot -->
21+
<groupId>org.springframework.boot</groupId>
22+
<artifactId>spring-boot-dependencies</artifactId>
23+
<version>1.3.3.RELEASE</version>
24+
<type>pom</type>
25+
<scope>import</scope>
26+
</dependency>
27+
</dependencies>
28+
</dependencyManagement>
29+
1730
<dependencies>
1831
<!-- jOOQ -->
1932
<dependency>
@@ -40,6 +53,11 @@
4053
<artifactId>spring-jdbc</artifactId>
4154
<version>${org.springframework.version}</version>
4255
</dependency>
56+
<dependency>
57+
<groupId>org.springframework.boot</groupId>
58+
<artifactId>spring-boot-starter-jooq</artifactId>
59+
<version>1.3.3.RELEASE</version>
60+
</dependency>
4361

4462
<!-- Logging -->
4563
<dependency>
@@ -67,7 +85,7 @@
6785
<artifactId>spring-test</artifactId>
6886
<version>${org.springframework.version}</version>
6987
<scope>test</scope>
70-
</dependency>
88+
</dependency>
7189
</dependencies>
7290

7391
<build>
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/**
2+
* This class is generated by jOOQ
3+
*/
4+
package com.baeldung.jooq.introduction.db.information_schema;
5+
6+
7+
import com.baeldung.jooq.introduction.db.information_schema.tables.Catalogs;
8+
import com.baeldung.jooq.introduction.db.information_schema.tables.Collations;
9+
import com.baeldung.jooq.introduction.db.information_schema.tables.ColumnPrivileges;
10+
import com.baeldung.jooq.introduction.db.information_schema.tables.Columns;
11+
import com.baeldung.jooq.introduction.db.information_schema.tables.Constants;
12+
import com.baeldung.jooq.introduction.db.information_schema.tables.Constraints;
13+
import com.baeldung.jooq.introduction.db.information_schema.tables.CrossReferences;
14+
import com.baeldung.jooq.introduction.db.information_schema.tables.Domains;
15+
import com.baeldung.jooq.introduction.db.information_schema.tables.FunctionAliases;
16+
import com.baeldung.jooq.introduction.db.information_schema.tables.FunctionColumns;
17+
import com.baeldung.jooq.introduction.db.information_schema.tables.Help;
18+
import com.baeldung.jooq.introduction.db.information_schema.tables.InDoubt;
19+
import com.baeldung.jooq.introduction.db.information_schema.tables.Indexes;
20+
import com.baeldung.jooq.introduction.db.information_schema.tables.Locks;
21+
import com.baeldung.jooq.introduction.db.information_schema.tables.QueryStatistics;
22+
import com.baeldung.jooq.introduction.db.information_schema.tables.Rights;
23+
import com.baeldung.jooq.introduction.db.information_schema.tables.Roles;
24+
import com.baeldung.jooq.introduction.db.information_schema.tables.Schemata;
25+
import com.baeldung.jooq.introduction.db.information_schema.tables.Sequences;
26+
import com.baeldung.jooq.introduction.db.information_schema.tables.SessionState;
27+
import com.baeldung.jooq.introduction.db.information_schema.tables.Sessions;
28+
import com.baeldung.jooq.introduction.db.information_schema.tables.Settings;
29+
import com.baeldung.jooq.introduction.db.information_schema.tables.TablePrivileges;
30+
import com.baeldung.jooq.introduction.db.information_schema.tables.TableTypes;
31+
import com.baeldung.jooq.introduction.db.information_schema.tables.Tables;
32+
import com.baeldung.jooq.introduction.db.information_schema.tables.Triggers;
33+
import com.baeldung.jooq.introduction.db.information_schema.tables.TypeInfo;
34+
import com.baeldung.jooq.introduction.db.information_schema.tables.Users;
35+
import com.baeldung.jooq.introduction.db.information_schema.tables.Views;
36+
37+
import java.util.ArrayList;
38+
import java.util.Arrays;
39+
import java.util.List;
40+
41+
import javax.annotation.Generated;
42+
43+
import org.jooq.Table;
44+
import org.jooq.impl.SchemaImpl;
45+
46+
47+
/**
48+
* This class is generated by jOOQ.
49+
*/
50+
@Generated(
51+
value = {
52+
"http://www.jooq.org",
53+
"jOOQ version:3.7.3"
54+
},
55+
comments = "This class is generated by jOOQ"
56+
)
57+
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
58+
public class InformationSchema extends SchemaImpl {
59+
60+
private static final long serialVersionUID = 436617961;
61+
62+
/**
63+
* The reference instance of <code>INFORMATION_SCHEMA</code>
64+
*/
65+
public static final InformationSchema INFORMATION_SCHEMA = new InformationSchema();
66+
67+
/**
68+
* No further instances allowed
69+
*/
70+
private InformationSchema() {
71+
super("INFORMATION_SCHEMA");
72+
}
73+
74+
@Override
75+
public final List<Table<?>> getTables() {
76+
List result = new ArrayList();
77+
result.addAll(getTables0());
78+
return result;
79+
}
80+
81+
private final List<Table<?>> getTables0() {
82+
return Arrays.<Table<?>>asList(
83+
QueryStatistics.QUERY_STATISTICS,
84+
SessionState.SESSION_STATE,
85+
Locks.LOCKS,
86+
Sessions.SESSIONS,
87+
Triggers.TRIGGERS,
88+
Domains.DOMAINS,
89+
Constants.CONSTANTS,
90+
FunctionColumns.FUNCTION_COLUMNS,
91+
Constraints.CONSTRAINTS,
92+
CrossReferences.CROSS_REFERENCES,
93+
InDoubt.IN_DOUBT,
94+
Views.VIEWS,
95+
Collations.COLLATIONS,
96+
ColumnPrivileges.COLUMN_PRIVILEGES,
97+
TablePrivileges.TABLE_PRIVILEGES,
98+
Schemata.SCHEMATA,
99+
FunctionAliases.FUNCTION_ALIASES,
100+
Rights.RIGHTS,
101+
Roles.ROLES,
102+
Users.USERS,
103+
Sequences.SEQUENCES,
104+
Help.HELP,
105+
Settings.SETTINGS,
106+
Catalogs.CATALOGS,
107+
TypeInfo.TYPE_INFO,
108+
TableTypes.TABLE_TYPES,
109+
Indexes.INDEXES,
110+
Columns.COLUMNS,
111+
Tables.TABLES);
112+
}
113+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/**
2+
* This class is generated by jOOQ
3+
*/
4+
package com.baeldung.jooq.introduction.db.information_schema;
5+
6+
7+
import javax.annotation.Generated;
8+
9+
10+
/**
11+
* A class modelling foreign key relationships between tables of the <code>INFORMATION_SCHEMA</code>
12+
* schema
13+
*/
14+
@Generated(
15+
value = {
16+
"http://www.jooq.org",
17+
"jOOQ version:3.7.3"
18+
},
19+
comments = "This class is generated by jOOQ"
20+
)
21+
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
22+
public class Keys {
23+
24+
// -------------------------------------------------------------------------
25+
// IDENTITY definitions
26+
// -------------------------------------------------------------------------
27+
28+
29+
// -------------------------------------------------------------------------
30+
// UNIQUE and PRIMARY KEY definitions
31+
// -------------------------------------------------------------------------
32+
33+
34+
// -------------------------------------------------------------------------
35+
// FOREIGN KEY definitions
36+
// -------------------------------------------------------------------------
37+
38+
39+
// -------------------------------------------------------------------------
40+
// [#1459] distribute members to avoid static initialisers > 64kb
41+
// -------------------------------------------------------------------------
42+
}
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
/**
2+
* This class is generated by jOOQ
3+
*/
4+
package com.baeldung.jooq.introduction.db.information_schema;
5+
6+
7+
import com.baeldung.jooq.introduction.db.information_schema.tables.Catalogs;
8+
import com.baeldung.jooq.introduction.db.information_schema.tables.Collations;
9+
import com.baeldung.jooq.introduction.db.information_schema.tables.ColumnPrivileges;
10+
import com.baeldung.jooq.introduction.db.information_schema.tables.Columns;
11+
import com.baeldung.jooq.introduction.db.information_schema.tables.Constants;
12+
import com.baeldung.jooq.introduction.db.information_schema.tables.Constraints;
13+
import com.baeldung.jooq.introduction.db.information_schema.tables.CrossReferences;
14+
import com.baeldung.jooq.introduction.db.information_schema.tables.Domains;
15+
import com.baeldung.jooq.introduction.db.information_schema.tables.FunctionAliases;
16+
import com.baeldung.jooq.introduction.db.information_schema.tables.FunctionColumns;
17+
import com.baeldung.jooq.introduction.db.information_schema.tables.Help;
18+
import com.baeldung.jooq.introduction.db.information_schema.tables.InDoubt;
19+
import com.baeldung.jooq.introduction.db.information_schema.tables.Indexes;
20+
import com.baeldung.jooq.introduction.db.information_schema.tables.Locks;
21+
import com.baeldung.jooq.introduction.db.information_schema.tables.QueryStatistics;
22+
import com.baeldung.jooq.introduction.db.information_schema.tables.Rights;
23+
import com.baeldung.jooq.introduction.db.information_schema.tables.Roles;
24+
import com.baeldung.jooq.introduction.db.information_schema.tables.Schemata;
25+
import com.baeldung.jooq.introduction.db.information_schema.tables.Sequences;
26+
import com.baeldung.jooq.introduction.db.information_schema.tables.SessionState;
27+
import com.baeldung.jooq.introduction.db.information_schema.tables.Sessions;
28+
import com.baeldung.jooq.introduction.db.information_schema.tables.Settings;
29+
import com.baeldung.jooq.introduction.db.information_schema.tables.TablePrivileges;
30+
import com.baeldung.jooq.introduction.db.information_schema.tables.TableTypes;
31+
import com.baeldung.jooq.introduction.db.information_schema.tables.Triggers;
32+
import com.baeldung.jooq.introduction.db.information_schema.tables.TypeInfo;
33+
import com.baeldung.jooq.introduction.db.information_schema.tables.Users;
34+
import com.baeldung.jooq.introduction.db.information_schema.tables.Views;
35+
36+
import javax.annotation.Generated;
37+
38+
39+
/**
40+
* Convenience access to all tables in INFORMATION_SCHEMA
41+
*/
42+
@Generated(
43+
value = {
44+
"http://www.jooq.org",
45+
"jOOQ version:3.7.3"
46+
},
47+
comments = "This class is generated by jOOQ"
48+
)
49+
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
50+
public class Tables {
51+
52+
/**
53+
* The table INFORMATION_SCHEMA.QUERY_STATISTICS
54+
*/
55+
public static final QueryStatistics QUERY_STATISTICS = com.baeldung.jooq.introduction.db.information_schema.tables.QueryStatistics.QUERY_STATISTICS;
56+
57+
/**
58+
* The table INFORMATION_SCHEMA.SESSION_STATE
59+
*/
60+
public static final SessionState SESSION_STATE = com.baeldung.jooq.introduction.db.information_schema.tables.SessionState.SESSION_STATE;
61+
62+
/**
63+
* The table INFORMATION_SCHEMA.LOCKS
64+
*/
65+
public static final Locks LOCKS = com.baeldung.jooq.introduction.db.information_schema.tables.Locks.LOCKS;
66+
67+
/**
68+
* The table INFORMATION_SCHEMA.SESSIONS
69+
*/
70+
public static final Sessions SESSIONS = com.baeldung.jooq.introduction.db.information_schema.tables.Sessions.SESSIONS;
71+
72+
/**
73+
* The table INFORMATION_SCHEMA.TRIGGERS
74+
*/
75+
public static final Triggers TRIGGERS = com.baeldung.jooq.introduction.db.information_schema.tables.Triggers.TRIGGERS;
76+
77+
/**
78+
* The table INFORMATION_SCHEMA.DOMAINS
79+
*/
80+
public static final Domains DOMAINS = com.baeldung.jooq.introduction.db.information_schema.tables.Domains.DOMAINS;
81+
82+
/**
83+
* The table INFORMATION_SCHEMA.CONSTANTS
84+
*/
85+
public static final Constants CONSTANTS = com.baeldung.jooq.introduction.db.information_schema.tables.Constants.CONSTANTS;
86+
87+
/**
88+
* The table INFORMATION_SCHEMA.FUNCTION_COLUMNS
89+
*/
90+
public static final FunctionColumns FUNCTION_COLUMNS = com.baeldung.jooq.introduction.db.information_schema.tables.FunctionColumns.FUNCTION_COLUMNS;
91+
92+
/**
93+
* The table INFORMATION_SCHEMA.CONSTRAINTS
94+
*/
95+
public static final Constraints CONSTRAINTS = com.baeldung.jooq.introduction.db.information_schema.tables.Constraints.CONSTRAINTS;
96+
97+
/**
98+
* The table INFORMATION_SCHEMA.CROSS_REFERENCES
99+
*/
100+
public static final CrossReferences CROSS_REFERENCES = com.baeldung.jooq.introduction.db.information_schema.tables.CrossReferences.CROSS_REFERENCES;
101+
102+
/**
103+
* The table INFORMATION_SCHEMA.IN_DOUBT
104+
*/
105+
public static final InDoubt IN_DOUBT = com.baeldung.jooq.introduction.db.information_schema.tables.InDoubt.IN_DOUBT;
106+
107+
/**
108+
* The table INFORMATION_SCHEMA.VIEWS
109+
*/
110+
public static final Views VIEWS = com.baeldung.jooq.introduction.db.information_schema.tables.Views.VIEWS;
111+
112+
/**
113+
* The table INFORMATION_SCHEMA.COLLATIONS
114+
*/
115+
public static final Collations COLLATIONS = com.baeldung.jooq.introduction.db.information_schema.tables.Collations.COLLATIONS;
116+
117+
/**
118+
* The table INFORMATION_SCHEMA.COLUMN_PRIVILEGES
119+
*/
120+
public static final ColumnPrivileges COLUMN_PRIVILEGES = com.baeldung.jooq.introduction.db.information_schema.tables.ColumnPrivileges.COLUMN_PRIVILEGES;
121+
122+
/**
123+
* The table INFORMATION_SCHEMA.TABLE_PRIVILEGES
124+
*/
125+
public static final TablePrivileges TABLE_PRIVILEGES = com.baeldung.jooq.introduction.db.information_schema.tables.TablePrivileges.TABLE_PRIVILEGES;
126+
127+
/**
128+
* The table INFORMATION_SCHEMA.SCHEMATA
129+
*/
130+
public static final Schemata SCHEMATA = com.baeldung.jooq.introduction.db.information_schema.tables.Schemata.SCHEMATA;
131+
132+
/**
133+
* The table INFORMATION_SCHEMA.FUNCTION_ALIASES
134+
*/
135+
public static final FunctionAliases FUNCTION_ALIASES = com.baeldung.jooq.introduction.db.information_schema.tables.FunctionAliases.FUNCTION_ALIASES;
136+
137+
/**
138+
* The table INFORMATION_SCHEMA.RIGHTS
139+
*/
140+
public static final Rights RIGHTS = com.baeldung.jooq.introduction.db.information_schema.tables.Rights.RIGHTS;
141+
142+
/**
143+
* The table INFORMATION_SCHEMA.ROLES
144+
*/
145+
public static final Roles ROLES = com.baeldung.jooq.introduction.db.information_schema.tables.Roles.ROLES;
146+
147+
/**
148+
* The table INFORMATION_SCHEMA.USERS
149+
*/
150+
public static final Users USERS = com.baeldung.jooq.introduction.db.information_schema.tables.Users.USERS;
151+
152+
/**
153+
* The table INFORMATION_SCHEMA.SEQUENCES
154+
*/
155+
public static final Sequences SEQUENCES = com.baeldung.jooq.introduction.db.information_schema.tables.Sequences.SEQUENCES;
156+
157+
/**
158+
* The table INFORMATION_SCHEMA.HELP
159+
*/
160+
public static final Help HELP = com.baeldung.jooq.introduction.db.information_schema.tables.Help.HELP;
161+
162+
/**
163+
* The table INFORMATION_SCHEMA.SETTINGS
164+
*/
165+
public static final Settings SETTINGS = com.baeldung.jooq.introduction.db.information_schema.tables.Settings.SETTINGS;
166+
167+
/**
168+
* The table INFORMATION_SCHEMA.CATALOGS
169+
*/
170+
public static final Catalogs CATALOGS = com.baeldung.jooq.introduction.db.information_schema.tables.Catalogs.CATALOGS;
171+
172+
/**
173+
* The table INFORMATION_SCHEMA.TYPE_INFO
174+
*/
175+
public static final TypeInfo TYPE_INFO = com.baeldung.jooq.introduction.db.information_schema.tables.TypeInfo.TYPE_INFO;
176+
177+
/**
178+
* The table INFORMATION_SCHEMA.TABLE_TYPES
179+
*/
180+
public static final TableTypes TABLE_TYPES = com.baeldung.jooq.introduction.db.information_schema.tables.TableTypes.TABLE_TYPES;
181+
182+
/**
183+
* The table INFORMATION_SCHEMA.INDEXES
184+
*/
185+
public static final Indexes INDEXES = com.baeldung.jooq.introduction.db.information_schema.tables.Indexes.INDEXES;
186+
187+
/**
188+
* The table INFORMATION_SCHEMA.COLUMNS
189+
*/
190+
public static final Columns COLUMNS = com.baeldung.jooq.introduction.db.information_schema.tables.Columns.COLUMNS;
191+
192+
/**
193+
* The table INFORMATION_SCHEMA.TABLES
194+
*/
195+
public static final com.baeldung.jooq.introduction.db.information_schema.tables.Tables TABLES = com.baeldung.jooq.introduction.db.information_schema.tables.Tables.TABLES;
196+
}

0 commit comments

Comments
 (0)