-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5bf65ad
commit 86b1758
Showing
21 changed files
with
1,778 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
springboot-jooq-demo/gensrc/main/java/com/sivalabs/demo/jooq/domain/Keys.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/** | ||
* This class is generated by jOOQ | ||
*/ | ||
package com.sivalabs.demo.jooq.domain; | ||
|
||
|
||
import com.sivalabs.demo.jooq.domain.tables.Comments; | ||
import com.sivalabs.demo.jooq.domain.tables.Posts; | ||
import com.sivalabs.demo.jooq.domain.tables.records.CommentsRecord; | ||
import com.sivalabs.demo.jooq.domain.tables.records.PostsRecord; | ||
|
||
import javax.annotation.Generated; | ||
|
||
import org.jooq.ForeignKey; | ||
import org.jooq.Identity; | ||
import org.jooq.UniqueKey; | ||
import org.jooq.impl.AbstractKeys; | ||
|
||
|
||
/** | ||
* A class modelling foreign key relationships between tables of the <code>PUBLIC</code> | ||
* schema | ||
*/ | ||
@Generated( | ||
value = { | ||
"http://www.jooq.org", | ||
"jOOQ version:3.7.2" | ||
}, | ||
comments = "This class is generated by jOOQ" | ||
) | ||
@SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||
public class Keys { | ||
|
||
// ------------------------------------------------------------------------- | ||
// IDENTITY definitions | ||
// ------------------------------------------------------------------------- | ||
|
||
public static final Identity<PostsRecord, Integer> IDENTITY_POSTS = Identities0.IDENTITY_POSTS; | ||
public static final Identity<CommentsRecord, Integer> IDENTITY_COMMENTS = Identities0.IDENTITY_COMMENTS; | ||
|
||
// ------------------------------------------------------------------------- | ||
// UNIQUE and PRIMARY KEY definitions | ||
// ------------------------------------------------------------------------- | ||
|
||
public static final UniqueKey<PostsRecord> CONSTRAINT_4 = UniqueKeys0.CONSTRAINT_4; | ||
public static final UniqueKey<CommentsRecord> CONSTRAINT_A = UniqueKeys0.CONSTRAINT_A; | ||
|
||
// ------------------------------------------------------------------------- | ||
// FOREIGN KEY definitions | ||
// ------------------------------------------------------------------------- | ||
|
||
public static final ForeignKey<CommentsRecord, PostsRecord> CONSTRAINT_AB = ForeignKeys0.CONSTRAINT_AB; | ||
|
||
// ------------------------------------------------------------------------- | ||
// [#1459] distribute members to avoid static initialisers > 64kb | ||
// ------------------------------------------------------------------------- | ||
|
||
private static class Identities0 extends AbstractKeys { | ||
public static Identity<PostsRecord, Integer> IDENTITY_POSTS = createIdentity(Posts.POSTS, Posts.POSTS.ID); | ||
public static Identity<CommentsRecord, Integer> IDENTITY_COMMENTS = createIdentity(Comments.COMMENTS, Comments.COMMENTS.ID); | ||
} | ||
|
||
private static class UniqueKeys0 extends AbstractKeys { | ||
public static final UniqueKey<PostsRecord> CONSTRAINT_4 = createUniqueKey(Posts.POSTS, Posts.POSTS.ID); | ||
public static final UniqueKey<CommentsRecord> CONSTRAINT_A = createUniqueKey(Comments.COMMENTS, Comments.COMMENTS.ID); | ||
} | ||
|
||
private static class ForeignKeys0 extends AbstractKeys { | ||
public static final ForeignKey<CommentsRecord, PostsRecord> CONSTRAINT_AB = createForeignKey(com.sivalabs.demo.jooq.domain.Keys.CONSTRAINT_4, Comments.COMMENTS, Comments.COMMENTS.POST_ID); | ||
} | ||
} |
73 changes: 73 additions & 0 deletions
73
springboot-jooq-demo/gensrc/main/java/com/sivalabs/demo/jooq/domain/Public.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/** | ||
* This class is generated by jOOQ | ||
*/ | ||
package com.sivalabs.demo.jooq.domain; | ||
|
||
|
||
import com.sivalabs.demo.jooq.domain.tables.Comments; | ||
import com.sivalabs.demo.jooq.domain.tables.Posts; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import javax.annotation.Generated; | ||
|
||
import org.jooq.Sequence; | ||
import org.jooq.Table; | ||
import org.jooq.impl.SchemaImpl; | ||
|
||
|
||
/** | ||
* This class is generated by jOOQ. | ||
*/ | ||
@Generated( | ||
value = { | ||
"http://www.jooq.org", | ||
"jOOQ version:3.7.2" | ||
}, | ||
comments = "This class is generated by jOOQ" | ||
) | ||
@SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||
public class Public extends SchemaImpl { | ||
|
||
private static final long serialVersionUID = -489750451; | ||
|
||
/** | ||
* The reference instance of <code>PUBLIC</code> | ||
*/ | ||
public static final Public PUBLIC = new Public(); | ||
|
||
/** | ||
* No further instances allowed | ||
*/ | ||
private Public() { | ||
super("PUBLIC"); | ||
} | ||
|
||
@Override | ||
public final List<Sequence<?>> getSequences() { | ||
List result = new ArrayList(); | ||
result.addAll(getSequences0()); | ||
return result; | ||
} | ||
|
||
private final List<Sequence<?>> getSequences0() { | ||
return Arrays.<Sequence<?>>asList( | ||
Sequences.SYSTEM_SEQUENCE_935ADB09_A0F0_4D1F_8413_BDD341AD1A5E, | ||
Sequences.SYSTEM_SEQUENCE_96837385_8421_4A04_9912_6EAF084324ED); | ||
} | ||
|
||
@Override | ||
public final List<Table<?>> getTables() { | ||
List result = new ArrayList(); | ||
result.addAll(getTables0()); | ||
return result; | ||
} | ||
|
||
private final List<Table<?>> getTables0() { | ||
return Arrays.<Table<?>>asList( | ||
Posts.POSTS, | ||
Comments.COMMENTS); | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
springboot-jooq-demo/gensrc/main/java/com/sivalabs/demo/jooq/domain/Sequences.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* This class is generated by jOOQ | ||
*/ | ||
package com.sivalabs.demo.jooq.domain; | ||
|
||
|
||
import javax.annotation.Generated; | ||
|
||
import org.jooq.Sequence; | ||
import org.jooq.impl.SequenceImpl; | ||
|
||
|
||
/** | ||
* Convenience access to all sequences in PUBLIC | ||
*/ | ||
@Generated( | ||
value = { | ||
"http://www.jooq.org", | ||
"jOOQ version:3.7.2" | ||
}, | ||
comments = "This class is generated by jOOQ" | ||
) | ||
@SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||
public class Sequences { | ||
|
||
/** | ||
* The sequence <code>PUBLIC.SYSTEM_SEQUENCE_935ADB09_A0F0_4D1F_8413_BDD341AD1A5E</code> | ||
*/ | ||
public static final Sequence<Long> SYSTEM_SEQUENCE_935ADB09_A0F0_4D1F_8413_BDD341AD1A5E = new SequenceImpl<Long>("SYSTEM_SEQUENCE_935ADB09_A0F0_4D1F_8413_BDD341AD1A5E", Public.PUBLIC, org.jooq.impl.SQLDataType.BIGINT); | ||
|
||
/** | ||
* The sequence <code>PUBLIC.SYSTEM_SEQUENCE_96837385_8421_4A04_9912_6EAF084324ED</code> | ||
*/ | ||
public static final Sequence<Long> SYSTEM_SEQUENCE_96837385_8421_4A04_9912_6EAF084324ED = new SequenceImpl<Long>("SYSTEM_SEQUENCE_96837385_8421_4A04_9912_6EAF084324ED", Public.PUBLIC, org.jooq.impl.SQLDataType.BIGINT); | ||
} |
35 changes: 35 additions & 0 deletions
35
springboot-jooq-demo/gensrc/main/java/com/sivalabs/demo/jooq/domain/Tables.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* This class is generated by jOOQ | ||
*/ | ||
package com.sivalabs.demo.jooq.domain; | ||
|
||
|
||
import com.sivalabs.demo.jooq.domain.tables.Comments; | ||
import com.sivalabs.demo.jooq.domain.tables.Posts; | ||
|
||
import javax.annotation.Generated; | ||
|
||
|
||
/** | ||
* Convenience access to all tables in PUBLIC | ||
*/ | ||
@Generated( | ||
value = { | ||
"http://www.jooq.org", | ||
"jOOQ version:3.7.2" | ||
}, | ||
comments = "This class is generated by jOOQ" | ||
) | ||
@SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||
public class Tables { | ||
|
||
/** | ||
* The table PUBLIC.POSTS | ||
*/ | ||
public static final Posts POSTS = com.sivalabs.demo.jooq.domain.tables.Posts.POSTS; | ||
|
||
/** | ||
* The table PUBLIC.COMMENTS | ||
*/ | ||
public static final Comments COMMENTS = com.sivalabs.demo.jooq.domain.tables.Comments.COMMENTS; | ||
} |
152 changes: 152 additions & 0 deletions
152
springboot-jooq-demo/gensrc/main/java/com/sivalabs/demo/jooq/domain/tables/Comments.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
/** | ||
* This class is generated by jOOQ | ||
*/ | ||
package com.sivalabs.demo.jooq.domain.tables; | ||
|
||
|
||
import com.sivalabs.demo.jooq.domain.Keys; | ||
import com.sivalabs.demo.jooq.domain.Public; | ||
import com.sivalabs.demo.jooq.domain.tables.records.CommentsRecord; | ||
|
||
import java.sql.Timestamp; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
import javax.annotation.Generated; | ||
|
||
import org.jooq.Field; | ||
import org.jooq.ForeignKey; | ||
import org.jooq.Identity; | ||
import org.jooq.Table; | ||
import org.jooq.TableField; | ||
import org.jooq.UniqueKey; | ||
import org.jooq.impl.TableImpl; | ||
|
||
|
||
/** | ||
* This class is generated by jOOQ. | ||
*/ | ||
@Generated( | ||
value = { | ||
"http://www.jooq.org", | ||
"jOOQ version:3.7.2" | ||
}, | ||
comments = "This class is generated by jOOQ" | ||
) | ||
@SuppressWarnings({ "all", "unchecked", "rawtypes" }) | ||
public class Comments extends TableImpl<CommentsRecord> { | ||
|
||
private static final long serialVersionUID = -293773447; | ||
|
||
/** | ||
* The reference instance of <code>PUBLIC.COMMENTS</code> | ||
*/ | ||
public static final Comments COMMENTS = new Comments(); | ||
|
||
/** | ||
* The class holding records for this type | ||
*/ | ||
@Override | ||
public Class<CommentsRecord> getRecordType() { | ||
return CommentsRecord.class; | ||
} | ||
|
||
/** | ||
* The column <code>PUBLIC.COMMENTS.ID</code>. | ||
*/ | ||
public final TableField<CommentsRecord, Integer> ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false).defaulted(true), this, ""); | ||
|
||
/** | ||
* The column <code>PUBLIC.COMMENTS.POST_ID</code>. | ||
*/ | ||
public final TableField<CommentsRecord, Integer> POST_ID = createField("POST_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); | ||
|
||
/** | ||
* The column <code>PUBLIC.COMMENTS.NAME</code>. | ||
*/ | ||
public final TableField<CommentsRecord, String> NAME = createField("NAME", org.jooq.impl.SQLDataType.VARCHAR.length(200).nullable(false), this, ""); | ||
|
||
/** | ||
* The column <code>PUBLIC.COMMENTS.EMAIL</code>. | ||
*/ | ||
public final TableField<CommentsRecord, String> EMAIL = createField("EMAIL", org.jooq.impl.SQLDataType.VARCHAR.length(200).nullable(false), this, ""); | ||
|
||
/** | ||
* The column <code>PUBLIC.COMMENTS.CONTENT</code>. | ||
*/ | ||
public final TableField<CommentsRecord, String> CONTENT = createField("CONTENT", org.jooq.impl.SQLDataType.CLOB.defaulted(true), this, ""); | ||
|
||
/** | ||
* The column <code>PUBLIC.COMMENTS.CREATED_ON</code>. | ||
*/ | ||
public final TableField<CommentsRecord, Timestamp> CREATED_ON = createField("CREATED_ON", org.jooq.impl.SQLDataType.TIMESTAMP.defaulted(true), this, ""); | ||
|
||
/** | ||
* Create a <code>PUBLIC.COMMENTS</code> table reference | ||
*/ | ||
public Comments() { | ||
this("COMMENTS", null); | ||
} | ||
|
||
/** | ||
* Create an aliased <code>PUBLIC.COMMENTS</code> table reference | ||
*/ | ||
public Comments(String alias) { | ||
this(alias, COMMENTS); | ||
} | ||
|
||
private Comments(String alias, Table<CommentsRecord> aliased) { | ||
this(alias, aliased, null); | ||
} | ||
|
||
private Comments(String alias, Table<CommentsRecord> aliased, Field<?>[] parameters) { | ||
super(alias, Public.PUBLIC, aliased, parameters, ""); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public Identity<CommentsRecord, Integer> getIdentity() { | ||
return Keys.IDENTITY_COMMENTS; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public UniqueKey<CommentsRecord> getPrimaryKey() { | ||
return Keys.CONSTRAINT_A; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public List<UniqueKey<CommentsRecord>> getKeys() { | ||
return Arrays.<UniqueKey<CommentsRecord>>asList(Keys.CONSTRAINT_A); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public List<ForeignKey<CommentsRecord, ?>> getReferences() { | ||
return Arrays.<ForeignKey<CommentsRecord, ?>>asList(Keys.CONSTRAINT_AB); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public Comments as(String alias) { | ||
return new Comments(alias, this); | ||
} | ||
|
||
/** | ||
* Rename this table | ||
*/ | ||
public Comments rename(String name) { | ||
return new Comments(name, null); | ||
} | ||
} |
Oops, something went wrong.