diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Author.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Author.java new file mode 100644 index 0000000000..bad6cbd805 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Author.java @@ -0,0 +1,140 @@ +/** + * This class is generated by jOOQ + */ +package sample.jooq.domain; + + +import java.sql.Date; +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Generated; + +import org.jooq.Field; +import org.jooq.Record; +import org.jooq.Schema; +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.8.2" + }, + comments = "This class is generated by jOOQ" +) +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Author extends TableImpl { + + private static final long serialVersionUID = 1187406915; + + /** + * The reference instance of PUBLIC.AUTHOR + */ + public static final Author AUTHOR = new Author(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return Record.class; + } + + /** + * The column PUBLIC.AUTHOR.ID. + */ + public final TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * The column PUBLIC.AUTHOR.FIRST_NAME. + */ + public final TableField FIRST_NAME = createField("FIRST_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(50), this, ""); + + /** + * The column PUBLIC.AUTHOR.LAST_NAME. + */ + public final TableField LAST_NAME = createField("LAST_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), this, ""); + + /** + * The column PUBLIC.AUTHOR.DATE_OF_BIRTH. + */ + public final TableField DATE_OF_BIRTH = createField("DATE_OF_BIRTH", org.jooq.impl.SQLDataType.DATE, this, ""); + + /** + * The column PUBLIC.AUTHOR.YEAR_OF_BIRTH. + */ + public final TableField YEAR_OF_BIRTH = createField("YEAR_OF_BIRTH", org.jooq.impl.SQLDataType.INTEGER, this, ""); + + /** + * The column PUBLIC.AUTHOR.DISTINGUISHED. + */ + public final TableField DISTINGUISHED = createField("DISTINGUISHED", org.jooq.impl.SQLDataType.TINYINT, this, ""); + + /** + * Create a PUBLIC.AUTHOR table reference + */ + public Author() { + this("AUTHOR", null); + } + + /** + * Create an aliased PUBLIC.AUTHOR table reference + */ + public Author(String alias) { + this(alias, AUTHOR); + } + + private Author(String alias, Table aliased) { + this(alias, aliased, null); + } + + private Author(String alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, ""); + } + + /** + * {@inheritDoc} + */ + @Override + public Schema getSchema() { + return Public.PUBLIC; + } + + /** + * {@inheritDoc} + */ + @Override + public UniqueKey getPrimaryKey() { + return Keys.CONSTRAINT_7; + } + + /** + * {@inheritDoc} + */ + @Override + public List> getKeys() { + return Arrays.>asList(Keys.CONSTRAINT_7); + } + + /** + * {@inheritDoc} + */ + @Override + public Author as(String alias) { + return new Author(alias, this); + } + + /** + * Rename this table + */ + public Author rename(String name) { + return new Author(name, null); + } +} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Book.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Book.java new file mode 100644 index 0000000000..c1956abc04 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Book.java @@ -0,0 +1,143 @@ +/** + * This class is generated by jOOQ + */ +package sample.jooq.domain; + + +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Generated; + +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Record; +import org.jooq.Schema; +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.8.2" + }, + comments = "This class is generated by jOOQ" +) +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Book extends TableImpl { + + private static final long serialVersionUID = 1176189796; + + /** + * The reference instance of PUBLIC.BOOK + */ + public static final Book BOOK = new Book(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return Record.class; + } + + /** + * The column PUBLIC.BOOK.ID. + */ + public final TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * The column PUBLIC.BOOK.AUTHOR_ID. + */ + public final TableField AUTHOR_ID = createField("AUTHOR_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * The column PUBLIC.BOOK.TITLE. + */ + public final TableField TITLE = createField("TITLE", org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, ""); + + /** + * The column PUBLIC.BOOK.PUBLISHED_IN. + */ + public final TableField PUBLISHED_IN = createField("PUBLISHED_IN", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * The column PUBLIC.BOOK.LANGUAGE_ID. + */ + public final TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * Create a PUBLIC.BOOK table reference + */ + public Book() { + this("BOOK", null); + } + + /** + * Create an aliased PUBLIC.BOOK table reference + */ + public Book(String alias) { + this(alias, BOOK); + } + + private Book(String alias, Table aliased) { + this(alias, aliased, null); + } + + private Book(String alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, ""); + } + + /** + * {@inheritDoc} + */ + @Override + public Schema getSchema() { + return Public.PUBLIC; + } + + /** + * {@inheritDoc} + */ + @Override + public UniqueKey getPrimaryKey() { + return Keys.CONSTRAINT_1; + } + + /** + * {@inheritDoc} + */ + @Override + public List> getKeys() { + return Arrays.>asList(Keys.CONSTRAINT_1); + } + + /** + * {@inheritDoc} + */ + @Override + public List> getReferences() { + return Arrays.>asList(Keys.FK_BOOK_AUTHOR, Keys.FK_BOOK_LANGUAGE); + } + + /** + * {@inheritDoc} + */ + @Override + public Book as(String alias) { + return new Book(alias, this); + } + + /** + * Rename this table + */ + public Book rename(String name) { + return new Book(name, null); + } +} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/BookStore.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/BookStore.java new file mode 100644 index 0000000000..2a9ec44f91 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/BookStore.java @@ -0,0 +1,106 @@ +/** + * This class is generated by jOOQ + */ +package sample.jooq.domain; + + +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Generated; + +import org.jooq.Field; +import org.jooq.Record; +import org.jooq.Schema; +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.8.2" + }, + comments = "This class is generated by jOOQ" +) +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class BookStore extends TableImpl { + + private static final long serialVersionUID = -2132596210; + + /** + * The reference instance of PUBLIC.BOOK_STORE + */ + public static final BookStore BOOK_STORE = new BookStore(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return Record.class; + } + + /** + * The column PUBLIC.BOOK_STORE.NAME. + */ + public final TableField NAME = createField("NAME", org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, ""); + + /** + * Create a PUBLIC.BOOK_STORE table reference + */ + public BookStore() { + this("BOOK_STORE", null); + } + + /** + * Create an aliased PUBLIC.BOOK_STORE table reference + */ + public BookStore(String alias) { + this(alias, BOOK_STORE); + } + + private BookStore(String alias, Table aliased) { + this(alias, aliased, null); + } + + private BookStore(String alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, ""); + } + + /** + * {@inheritDoc} + */ + @Override + public Schema getSchema() { + return Public.PUBLIC; + } + + /** + * {@inheritDoc} + */ + @Override + public List> getKeys() { + return Arrays.>asList(Keys.CONSTRAINT_F); + } + + /** + * {@inheritDoc} + */ + @Override + public BookStore as(String alias) { + return new BookStore(alias, this); + } + + /** + * Rename this table + */ + public BookStore rename(String name) { + return new BookStore(name, null); + } +} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/BookToBookStore.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/BookToBookStore.java new file mode 100644 index 0000000000..14d7670efa --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/BookToBookStore.java @@ -0,0 +1,133 @@ +/** + * This class is generated by jOOQ + */ +package sample.jooq.domain; + + +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Generated; + +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Record; +import org.jooq.Schema; +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.8.2" + }, + comments = "This class is generated by jOOQ" +) +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class BookToBookStore extends TableImpl { + + private static final long serialVersionUID = -1360744633; + + /** + * The reference instance of PUBLIC.BOOK_TO_BOOK_STORE + */ + public static final BookToBookStore BOOK_TO_BOOK_STORE = new BookToBookStore(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return Record.class; + } + + /** + * The column PUBLIC.BOOK_TO_BOOK_STORE.NAME. + */ + public final TableField NAME = createField("NAME", org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, ""); + + /** + * The column PUBLIC.BOOK_TO_BOOK_STORE.BOOK_ID. + */ + public final TableField BOOK_ID = createField("BOOK_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * The column PUBLIC.BOOK_TO_BOOK_STORE.STOCK. + */ + public final TableField STOCK = createField("STOCK", org.jooq.impl.SQLDataType.INTEGER, this, ""); + + /** + * Create a PUBLIC.BOOK_TO_BOOK_STORE table reference + */ + public BookToBookStore() { + this("BOOK_TO_BOOK_STORE", null); + } + + /** + * Create an aliased PUBLIC.BOOK_TO_BOOK_STORE table reference + */ + public BookToBookStore(String alias) { + this(alias, BOOK_TO_BOOK_STORE); + } + + private BookToBookStore(String alias, Table aliased) { + this(alias, aliased, null); + } + + private BookToBookStore(String alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, ""); + } + + /** + * {@inheritDoc} + */ + @Override + public Schema getSchema() { + return Public.PUBLIC; + } + + /** + * {@inheritDoc} + */ + @Override + public UniqueKey getPrimaryKey() { + return Keys.CONSTRAINT_2; + } + + /** + * {@inheritDoc} + */ + @Override + public List> getKeys() { + return Arrays.>asList(Keys.CONSTRAINT_2); + } + + /** + * {@inheritDoc} + */ + @Override + public List> getReferences() { + return Arrays.>asList(Keys.FK_B2BS_BOOK_STORE, Keys.FK_B2BS_BOOK); + } + + /** + * {@inheritDoc} + */ + @Override + public BookToBookStore as(String alias) { + return new BookToBookStore(alias, this); + } + + /** + * Rename this table + */ + public BookToBookStore rename(String name) { + return new BookToBookStore(name, null); + } +} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/DefaultCatalog.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/DefaultCatalog.java new file mode 100644 index 0000000000..ad694671be --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/DefaultCatalog.java @@ -0,0 +1,60 @@ +/** + * This class is generated by jOOQ + */ +package sample.jooq.domain; + + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Generated; + +import org.jooq.Schema; +import org.jooq.impl.CatalogImpl; + + +/** + * This class is generated by jOOQ. + */ +@Generated( + value = { + "http://www.jooq.org", + "jOOQ version:3.8.2" + }, + comments = "This class is generated by jOOQ" +) +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class DefaultCatalog extends CatalogImpl { + + private static final long serialVersionUID = -1557925562; + + /** + * The reference instance of + */ + public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog(); + + /** + * The schema PUBLIC. + */ + public final Public PUBLIC = sample.jooq.domain.Public.PUBLIC; + + /** + * No further instances allowed + */ + private DefaultCatalog() { + super(""); + } + + @Override + public final List getSchemas() { + List result = new ArrayList(); + result.addAll(getSchemas0()); + return result; + } + + private final List getSchemas0() { + return Arrays.asList( + Public.PUBLIC); + } +} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Keys.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Keys.java index e37d28919f..40c31d9b1b 100644 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Keys.java +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Keys.java @@ -3,83 +3,69 @@ */ package sample.jooq.domain; + import javax.annotation.Generated; import org.jooq.ForeignKey; +import org.jooq.Record; import org.jooq.UniqueKey; import org.jooq.impl.AbstractKeys; -import sample.jooq.domain.tables.Author; -import sample.jooq.domain.tables.Book; -import sample.jooq.domain.tables.BookStore; -import sample.jooq.domain.tables.BookToBookStore; -import sample.jooq.domain.tables.Language; -import sample.jooq.domain.tables.records.AuthorRecord; -import sample.jooq.domain.tables.records.BookRecord; -import sample.jooq.domain.tables.records.BookStoreRecord; -import sample.jooq.domain.tables.records.BookToBookStoreRecord; -import sample.jooq.domain.tables.records.LanguageRecord; + /** - * A class modelling foreign key relationships between tables of the PUBLIC + * A class modelling foreign key relationships between tables of the PUBLIC * schema */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") +@Generated( + value = { + "http://www.jooq.org", + "jOOQ version:3.8.2" + }, + comments = "This class is generated by jOOQ" +) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Keys { - // ------------------------------------------------------------------------- - // IDENTITY definitions - // ------------------------------------------------------------------------- + // ------------------------------------------------------------------------- + // IDENTITY definitions + // ------------------------------------------------------------------------- + - // ------------------------------------------------------------------------- - // UNIQUE and PRIMARY KEY definitions - // ------------------------------------------------------------------------- + // ------------------------------------------------------------------------- + // UNIQUE and PRIMARY KEY definitions + // ------------------------------------------------------------------------- - public static final UniqueKey CONSTRAINT_C = UniqueKeys0.CONSTRAINT_C; - public static final UniqueKey CONSTRAINT_7 = UniqueKeys0.CONSTRAINT_7; - public static final UniqueKey CONSTRAINT_1 = UniqueKeys0.CONSTRAINT_1; - public static final UniqueKey CONSTRAINT_F = UniqueKeys0.CONSTRAINT_F; - public static final UniqueKey CONSTRAINT_2 = UniqueKeys0.CONSTRAINT_2; + public static final UniqueKey CONSTRAINT_C = UniqueKeys0.CONSTRAINT_C; + public static final UniqueKey CONSTRAINT_7 = UniqueKeys0.CONSTRAINT_7; + public static final UniqueKey CONSTRAINT_1 = UniqueKeys0.CONSTRAINT_1; + public static final UniqueKey CONSTRAINT_F = UniqueKeys0.CONSTRAINT_F; + public static final UniqueKey CONSTRAINT_2 = UniqueKeys0.CONSTRAINT_2; - // ------------------------------------------------------------------------- - // FOREIGN KEY definitions - // ------------------------------------------------------------------------- + // ------------------------------------------------------------------------- + // FOREIGN KEY definitions + // ------------------------------------------------------------------------- - public static final ForeignKey FK_BOOK_AUTHOR = ForeignKeys0.FK_BOOK_AUTHOR; - public static final ForeignKey FK_BOOK_LANGUAGE = ForeignKeys0.FK_BOOK_LANGUAGE; - public static final ForeignKey FK_B2BS_BOOK_STORE = ForeignKeys0.FK_B2BS_BOOK_STORE; - public static final ForeignKey FK_B2BS_BOOK = ForeignKeys0.FK_B2BS_BOOK; + public static final ForeignKey FK_BOOK_AUTHOR = ForeignKeys0.FK_BOOK_AUTHOR; + public static final ForeignKey FK_BOOK_LANGUAGE = ForeignKeys0.FK_BOOK_LANGUAGE; + public static final ForeignKey FK_B2BS_BOOK_STORE = ForeignKeys0.FK_B2BS_BOOK_STORE; + public static final ForeignKey FK_B2BS_BOOK = ForeignKeys0.FK_B2BS_BOOK; - // ------------------------------------------------------------------------- - // [#1459] distribute members to avoid static initialisers > 64kb - // ------------------------------------------------------------------------- + // ------------------------------------------------------------------------- + // [#1459] distribute members to avoid static initialisers > 64kb + // ------------------------------------------------------------------------- - private static class UniqueKeys0 extends AbstractKeys { - public static final UniqueKey CONSTRAINT_C = createUniqueKey( - Language.LANGUAGE, Language.LANGUAGE.ID); - public static final UniqueKey CONSTRAINT_7 = createUniqueKey( - Author.AUTHOR, Author.AUTHOR.ID); - public static final UniqueKey CONSTRAINT_1 = createUniqueKey( - Book.BOOK, Book.BOOK.ID); - public static final UniqueKey CONSTRAINT_F = createUniqueKey( - BookStore.BOOK_STORE, BookStore.BOOK_STORE.NAME); - public static final UniqueKey CONSTRAINT_2 = createUniqueKey( - BookToBookStore.BOOK_TO_BOOK_STORE, - BookToBookStore.BOOK_TO_BOOK_STORE.NAME, - BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID); - } + private static class UniqueKeys0 extends AbstractKeys { + public static final UniqueKey CONSTRAINT_C = createUniqueKey(Language.LANGUAGE, "CONSTRAINT_C", Language.LANGUAGE.ID); + public static final UniqueKey CONSTRAINT_7 = createUniqueKey(Author.AUTHOR, "CONSTRAINT_7", Author.AUTHOR.ID); + public static final UniqueKey CONSTRAINT_1 = createUniqueKey(Book.BOOK, "CONSTRAINT_1", Book.BOOK.ID); + public static final UniqueKey CONSTRAINT_F = createUniqueKey(BookStore.BOOK_STORE, "CONSTRAINT_F", BookStore.BOOK_STORE.NAME); + public static final UniqueKey CONSTRAINT_2 = createUniqueKey(BookToBookStore.BOOK_TO_BOOK_STORE, "CONSTRAINT_2", BookToBookStore.BOOK_TO_BOOK_STORE.NAME, BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID); + } - private static class ForeignKeys0 extends AbstractKeys { - public static final ForeignKey FK_BOOK_AUTHOR = createForeignKey( - sample.jooq.domain.Keys.CONSTRAINT_7, Book.BOOK, Book.BOOK.AUTHOR_ID); - public static final ForeignKey FK_BOOK_LANGUAGE = createForeignKey( - sample.jooq.domain.Keys.CONSTRAINT_C, Book.BOOK, Book.BOOK.LANGUAGE_ID); - public static final ForeignKey FK_B2BS_BOOK_STORE = createForeignKey( - sample.jooq.domain.Keys.CONSTRAINT_F, BookToBookStore.BOOK_TO_BOOK_STORE, - BookToBookStore.BOOK_TO_BOOK_STORE.NAME); - public static final ForeignKey FK_B2BS_BOOK = createForeignKey( - sample.jooq.domain.Keys.CONSTRAINT_1, BookToBookStore.BOOK_TO_BOOK_STORE, - BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID); - } + private static class ForeignKeys0 extends AbstractKeys { + public static final ForeignKey FK_BOOK_AUTHOR = createForeignKey(sample.jooq.domain.Keys.CONSTRAINT_7, Book.BOOK, "FK_BOOK_AUTHOR", Book.BOOK.AUTHOR_ID); + public static final ForeignKey FK_BOOK_LANGUAGE = createForeignKey(sample.jooq.domain.Keys.CONSTRAINT_C, Book.BOOK, "FK_BOOK_LANGUAGE", Book.BOOK.LANGUAGE_ID); + public static final ForeignKey FK_B2BS_BOOK_STORE = createForeignKey(sample.jooq.domain.Keys.CONSTRAINT_F, BookToBookStore.BOOK_TO_BOOK_STORE, "FK_B2BS_BOOK_STORE", BookToBookStore.BOOK_TO_BOOK_STORE.NAME); + public static final ForeignKey FK_B2BS_BOOK = createForeignKey(sample.jooq.domain.Keys.CONSTRAINT_1, BookToBookStore.BOOK_TO_BOOK_STORE, "FK_B2BS_BOOK", BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID); + } } diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Language.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Language.java new file mode 100644 index 0000000000..d428bab66e --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Language.java @@ -0,0 +1,124 @@ +/** + * This class is generated by jOOQ + */ +package sample.jooq.domain; + + +import java.util.Arrays; +import java.util.List; + +import javax.annotation.Generated; + +import org.jooq.Field; +import org.jooq.Record; +import org.jooq.Schema; +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.8.2" + }, + comments = "This class is generated by jOOQ" +) +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Language extends TableImpl { + + private static final long serialVersionUID = -1890716744; + + /** + * The reference instance of PUBLIC.LANGUAGE + */ + public static final Language LANGUAGE = new Language(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return Record.class; + } + + /** + * The column PUBLIC.LANGUAGE.ID. + */ + public final TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * The column PUBLIC.LANGUAGE.CD. + */ + public final TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR.length(2).nullable(false), this, ""); + + /** + * The column PUBLIC.LANGUAGE.DESCRIPTION. + */ + public final TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR.length(50), this, ""); + + /** + * Create a PUBLIC.LANGUAGE table reference + */ + public Language() { + this("LANGUAGE", null); + } + + /** + * Create an aliased PUBLIC.LANGUAGE table reference + */ + public Language(String alias) { + this(alias, LANGUAGE); + } + + private Language(String alias, Table aliased) { + this(alias, aliased, null); + } + + private Language(String alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, ""); + } + + /** + * {@inheritDoc} + */ + @Override + public Schema getSchema() { + return Public.PUBLIC; + } + + /** + * {@inheritDoc} + */ + @Override + public UniqueKey getPrimaryKey() { + return Keys.CONSTRAINT_C; + } + + /** + * {@inheritDoc} + */ + @Override + public List> getKeys() { + return Arrays.>asList(Keys.CONSTRAINT_C); + } + + /** + * {@inheritDoc} + */ + @Override + public Language as(String alias) { + return new Language(alias, this); + } + + /** + * Rename this table + */ + public Language rename(String name) { + return new Language(name, null); + } +} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Public.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Public.java index 73ae45eddc..2a62940b2c 100644 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Public.java +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Public.java @@ -3,51 +3,92 @@ */ package sample.jooq.domain; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; import javax.annotation.Generated; +import org.jooq.Catalog; import org.jooq.Table; import org.jooq.impl.SchemaImpl; -import sample.jooq.domain.tables.Author; -import sample.jooq.domain.tables.Book; -import sample.jooq.domain.tables.BookStore; -import sample.jooq.domain.tables.BookToBookStore; -import sample.jooq.domain.tables.Language; + /** * This class is generated by jOOQ. */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") +@Generated( + value = { + "http://www.jooq.org", + "jOOQ version:3.8.2" + }, + comments = "This class is generated by jOOQ" +) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Public extends SchemaImpl { - private static final long serialVersionUID = 1051839433; - - /** - * The reference instance of PUBLIC - */ - public static final Public PUBLIC = new Public(); - - /** - * No further instances allowed - */ - private Public() { - super("PUBLIC"); - } - - @Override - public final List> getTables() { - List result = new ArrayList(); - result.addAll(getTables0()); - return result; - } - - private final List> getTables0() { - return Arrays.>asList(Language.LANGUAGE, Author.AUTHOR, Book.BOOK, - BookStore.BOOK_STORE, BookToBookStore.BOOK_TO_BOOK_STORE); - } + private static final long serialVersionUID = 217498103; + + /** + * The reference instance of PUBLIC + */ + public static final Public PUBLIC = new Public(); + + /** + * The table PUBLIC.LANGUAGE. + */ + public final Language LANGUAGE = sample.jooq.domain.Language.LANGUAGE; + + /** + * The table PUBLIC.AUTHOR. + */ + public final Author AUTHOR = sample.jooq.domain.Author.AUTHOR; + + /** + * The table PUBLIC.BOOK. + */ + public final Book BOOK = sample.jooq.domain.Book.BOOK; + + /** + * The table PUBLIC.BOOK_STORE. + */ + public final BookStore BOOK_STORE = sample.jooq.domain.BookStore.BOOK_STORE; + + /** + * The table PUBLIC.BOOK_TO_BOOK_STORE. + */ + public final BookToBookStore BOOK_TO_BOOK_STORE = sample.jooq.domain.BookToBookStore.BOOK_TO_BOOK_STORE; + + /** + * No further instances allowed + */ + private Public() { + super("PUBLIC", null); + } + + + /** + * {@inheritDoc} + */ + @Override + public Catalog getCatalog() { + return DefaultCatalog.DEFAULT_CATALOG; + } + + @Override + public final List> getTables() { + List result = new ArrayList(); + result.addAll(getTables0()); + return result; + } + + private final List> getTables0() { + return Arrays.>asList( + Language.LANGUAGE, + Author.AUTHOR, + Book.BOOK, + BookStore.BOOK_STORE, + BookToBookStore.BOOK_TO_BOOK_STORE); + } } diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Tables.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Tables.java index f3e77b0ce6..cda1ec3a6f 100644 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Tables.java +++ b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/Tables.java @@ -3,44 +3,45 @@ */ package sample.jooq.domain; + import javax.annotation.Generated; -import sample.jooq.domain.tables.Author; -import sample.jooq.domain.tables.Book; -import sample.jooq.domain.tables.BookStore; -import sample.jooq.domain.tables.BookToBookStore; -import sample.jooq.domain.tables.Language; /** * Convenience access to all tables in PUBLIC */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") +@Generated( + value = { + "http://www.jooq.org", + "jOOQ version:3.8.2" + }, + comments = "This class is generated by jOOQ" +) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Tables { - /** - * The table PUBLIC.LANGUAGE - */ - public static final Language LANGUAGE = sample.jooq.domain.tables.Language.LANGUAGE; - - /** - * The table PUBLIC.AUTHOR - */ - public static final Author AUTHOR = sample.jooq.domain.tables.Author.AUTHOR; - - /** - * The table PUBLIC.BOOK - */ - public static final Book BOOK = sample.jooq.domain.tables.Book.BOOK; - - /** - * The table PUBLIC.BOOK_STORE - */ - public static final BookStore BOOK_STORE = sample.jooq.domain.tables.BookStore.BOOK_STORE; - - /** - * The table PUBLIC.BOOK_TO_BOOK_STORE - */ - public static final BookToBookStore BOOK_TO_BOOK_STORE = sample.jooq.domain.tables.BookToBookStore.BOOK_TO_BOOK_STORE; + /** + * The table PUBLIC.LANGUAGE. + */ + public static final Language LANGUAGE = sample.jooq.domain.Language.LANGUAGE; + + /** + * The table PUBLIC.AUTHOR. + */ + public static final Author AUTHOR = sample.jooq.domain.Author.AUTHOR; + + /** + * The table PUBLIC.BOOK. + */ + public static final Book BOOK = sample.jooq.domain.Book.BOOK; + + /** + * The table PUBLIC.BOOK_STORE. + */ + public static final BookStore BOOK_STORE = sample.jooq.domain.BookStore.BOOK_STORE; + + /** + * The table PUBLIC.BOOK_TO_BOOK_STORE. + */ + public static final BookToBookStore BOOK_TO_BOOK_STORE = sample.jooq.domain.BookToBookStore.BOOK_TO_BOOK_STORE; } diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Author.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Author.java deleted file mode 100644 index eaa0cb4ae1..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Author.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables; - -import java.sql.Date; -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.UniqueKey; -import org.jooq.impl.TableImpl; -import sample.jooq.domain.Keys; -import sample.jooq.domain.Public; -import sample.jooq.domain.tables.records.AuthorRecord; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Author extends TableImpl { - - private static final long serialVersionUID = -1989221607; - - /** - * The reference instance of PUBLIC.AUTHOR - */ - public static final Author AUTHOR = new Author(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return AuthorRecord.class; - } - - /** - * The column PUBLIC.AUTHOR.ID. - */ - public final TableField ID = createField("ID", - org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); - - /** - * The column PUBLIC.AUTHOR.FIRST_NAME. - */ - public final TableField FIRST_NAME = createField("FIRST_NAME", - org.jooq.impl.SQLDataType.VARCHAR.length(50), this, ""); - - /** - * The column PUBLIC.AUTHOR.LAST_NAME. - */ - public final TableField LAST_NAME = createField("LAST_NAME", - org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), this, ""); - - /** - * The column PUBLIC.AUTHOR.DATE_OF_BIRTH. - */ - public final TableField DATE_OF_BIRTH = createField( - "DATE_OF_BIRTH", org.jooq.impl.SQLDataType.DATE, this, ""); - - /** - * The column PUBLIC.AUTHOR.YEAR_OF_BIRTH. - */ - public final TableField YEAR_OF_BIRTH = createField( - "YEAR_OF_BIRTH", org.jooq.impl.SQLDataType.INTEGER, this, ""); - - /** - * The column PUBLIC.AUTHOR.DISTINGUISHED. - */ - public final TableField DISTINGUISHED = createField( - "DISTINGUISHED", org.jooq.impl.SQLDataType.TINYINT, this, ""); - - /** - * Create a PUBLIC.AUTHOR table reference - */ - public Author() { - this("AUTHOR", null); - } - - /** - * Create an aliased PUBLIC.AUTHOR table reference - */ - public Author(String alias) { - this(alias, AUTHOR); - } - - private Author(String alias, Table aliased) { - this(alias, aliased, null); - } - - private Author(String alias, Table aliased, Field[] parameters) { - super(alias, Public.PUBLIC, aliased, parameters, ""); - } - - /** - * {@inheritDoc} - */ - @Override - public UniqueKey getPrimaryKey() { - return Keys.CONSTRAINT_7; - } - - /** - * {@inheritDoc} - */ - @Override - public List> getKeys() { - return Arrays.>asList(Keys.CONSTRAINT_7); - } - - /** - * {@inheritDoc} - */ - @Override - public Author as(String alias) { - return new Author(alias, this); - } - - /** - * Rename this table - */ - public Author rename(String name) { - return new Author(name, null); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Book.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Book.java deleted file mode 100644 index 97d31d77b1..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Book.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables; - -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.ForeignKey; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.UniqueKey; -import org.jooq.impl.TableImpl; -import sample.jooq.domain.Keys; -import sample.jooq.domain.Public; -import sample.jooq.domain.tables.records.BookRecord; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Book extends TableImpl { - - private static final long serialVersionUID = 1858247563; - - /** - * The reference instance of PUBLIC.BOOK - */ - public static final Book BOOK = new Book(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return BookRecord.class; - } - - /** - * The column PUBLIC.BOOK.ID. - */ - public final TableField ID = createField("ID", - org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); - - /** - * The column PUBLIC.BOOK.AUTHOR_ID. - */ - public final TableField AUTHOR_ID = createField("AUTHOR_ID", - org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); - - /** - * The column PUBLIC.BOOK.TITLE. - */ - public final TableField TITLE = createField("TITLE", - org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, ""); - - /** - * The column PUBLIC.BOOK.PUBLISHED_IN. - */ - public final TableField PUBLISHED_IN = createField( - "PUBLISHED_IN", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); - - /** - * The column PUBLIC.BOOK.LANGUAGE_ID. - */ - public final TableField LANGUAGE_ID = createField("LANGUAGE_ID", - org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); - - /** - * Create a PUBLIC.BOOK table reference - */ - public Book() { - this("BOOK", null); - } - - /** - * Create an aliased PUBLIC.BOOK table reference - */ - public Book(String alias) { - this(alias, BOOK); - } - - private Book(String alias, Table aliased) { - this(alias, aliased, null); - } - - private Book(String alias, Table aliased, Field[] parameters) { - super(alias, Public.PUBLIC, aliased, parameters, ""); - } - - /** - * {@inheritDoc} - */ - @Override - public UniqueKey getPrimaryKey() { - return Keys.CONSTRAINT_1; - } - - /** - * {@inheritDoc} - */ - @Override - public List> getKeys() { - return Arrays.>asList(Keys.CONSTRAINT_1); - } - - /** - * {@inheritDoc} - */ - @Override - public List> getReferences() { - return Arrays.>asList(Keys.FK_BOOK_AUTHOR, - Keys.FK_BOOK_LANGUAGE); - } - - /** - * {@inheritDoc} - */ - @Override - public Book as(String alias) { - return new Book(alias, this); - } - - /** - * Rename this table - */ - public Book rename(String name) { - return new Book(name, null); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/BookStore.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/BookStore.java deleted file mode 100644 index a8b2cb64e3..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/BookStore.java +++ /dev/null @@ -1,94 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables; - -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.UniqueKey; -import org.jooq.impl.TableImpl; -import sample.jooq.domain.Keys; -import sample.jooq.domain.Public; -import sample.jooq.domain.tables.records.BookStoreRecord; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class BookStore extends TableImpl { - - private static final long serialVersionUID = 1437758195; - - /** - * The reference instance of PUBLIC.BOOK_STORE - */ - public static final BookStore BOOK_STORE = new BookStore(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return BookStoreRecord.class; - } - - /** - * The column PUBLIC.BOOK_STORE.NAME. - */ - public final TableField NAME = createField("NAME", - org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, ""); - - /** - * Create a PUBLIC.BOOK_STORE table reference - */ - public BookStore() { - this("BOOK_STORE", null); - } - - /** - * Create an aliased PUBLIC.BOOK_STORE table reference - */ - public BookStore(String alias) { - this(alias, BOOK_STORE); - } - - private BookStore(String alias, Table aliased) { - this(alias, aliased, null); - } - - private BookStore(String alias, Table aliased, - Field[] parameters) { - super(alias, Public.PUBLIC, aliased, parameters, ""); - } - - /** - * {@inheritDoc} - */ - @Override - public List> getKeys() { - return Arrays.>asList(Keys.CONSTRAINT_F); - } - - /** - * {@inheritDoc} - */ - @Override - public BookStore as(String alias) { - return new BookStore(alias, this); - } - - /** - * Rename this table - */ - public BookStore rename(String name) { - return new BookStore(name, null); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/BookToBookStore.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/BookToBookStore.java deleted file mode 100644 index d246681e7f..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/BookToBookStore.java +++ /dev/null @@ -1,124 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables; - -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.ForeignKey; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.UniqueKey; -import org.jooq.impl.TableImpl; -import sample.jooq.domain.Keys; -import sample.jooq.domain.Public; -import sample.jooq.domain.tables.records.BookToBookStoreRecord; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class BookToBookStore extends TableImpl { - - private static final long serialVersionUID = -557222072; - - /** - * The reference instance of PUBLIC.BOOK_TO_BOOK_STORE - */ - public static final BookToBookStore BOOK_TO_BOOK_STORE = new BookToBookStore(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return BookToBookStoreRecord.class; - } - - /** - * The column PUBLIC.BOOK_TO_BOOK_STORE.NAME. - */ - public final TableField NAME = createField("NAME", - org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this, ""); - - /** - * The column PUBLIC.BOOK_TO_BOOK_STORE.BOOK_ID. - */ - public final TableField BOOK_ID = createField( - "BOOK_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); - - /** - * The column PUBLIC.BOOK_TO_BOOK_STORE.STOCK. - */ - public final TableField STOCK = createField("STOCK", - org.jooq.impl.SQLDataType.INTEGER, this, ""); - - /** - * Create a PUBLIC.BOOK_TO_BOOK_STORE table reference - */ - public BookToBookStore() { - this("BOOK_TO_BOOK_STORE", null); - } - - /** - * Create an aliased PUBLIC.BOOK_TO_BOOK_STORE table reference - */ - public BookToBookStore(String alias) { - this(alias, BOOK_TO_BOOK_STORE); - } - - private BookToBookStore(String alias, Table aliased) { - this(alias, aliased, null); - } - - private BookToBookStore(String alias, Table aliased, - Field[] parameters) { - super(alias, Public.PUBLIC, aliased, parameters, ""); - } - - /** - * {@inheritDoc} - */ - @Override - public UniqueKey getPrimaryKey() { - return Keys.CONSTRAINT_2; - } - - /** - * {@inheritDoc} - */ - @Override - public List> getKeys() { - return Arrays.>asList(Keys.CONSTRAINT_2); - } - - /** - * {@inheritDoc} - */ - @Override - public List> getReferences() { - return Arrays.>asList( - Keys.FK_B2BS_BOOK_STORE, Keys.FK_B2BS_BOOK); - } - - /** - * {@inheritDoc} - */ - @Override - public BookToBookStore as(String alias) { - return new BookToBookStore(alias, this); - } - - /** - * Rename this table - */ - public BookToBookStore rename(String name) { - return new BookToBookStore(name, null); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Language.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Language.java deleted file mode 100644 index 65e95cd207..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/Language.java +++ /dev/null @@ -1,113 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables; - -import java.util.Arrays; -import java.util.List; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.Table; -import org.jooq.TableField; -import org.jooq.UniqueKey; -import org.jooq.impl.TableImpl; -import sample.jooq.domain.Keys; -import sample.jooq.domain.Public; -import sample.jooq.domain.tables.records.LanguageRecord; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Language extends TableImpl { - - private static final long serialVersionUID = -192479483; - - /** - * The reference instance of PUBLIC.LANGUAGE - */ - public static final Language LANGUAGE = new Language(); - - /** - * The class holding records for this type - */ - @Override - public Class getRecordType() { - return LanguageRecord.class; - } - - /** - * The column PUBLIC.LANGUAGE.ID. - */ - public final TableField ID = createField("ID", - org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); - - /** - * The column PUBLIC.LANGUAGE.CD. - */ - public final TableField CD = createField("CD", - org.jooq.impl.SQLDataType.CHAR.length(2).nullable(false), this, ""); - - /** - * The column PUBLIC.LANGUAGE.DESCRIPTION. - */ - public final TableField DESCRIPTION = createField( - "DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR.length(50), this, ""); - - /** - * Create a PUBLIC.LANGUAGE table reference - */ - public Language() { - this("LANGUAGE", null); - } - - /** - * Create an aliased PUBLIC.LANGUAGE table reference - */ - public Language(String alias) { - this(alias, LANGUAGE); - } - - private Language(String alias, Table aliased) { - this(alias, aliased, null); - } - - private Language(String alias, Table aliased, Field[] parameters) { - super(alias, Public.PUBLIC, aliased, parameters, ""); - } - - /** - * {@inheritDoc} - */ - @Override - public UniqueKey getPrimaryKey() { - return Keys.CONSTRAINT_C; - } - - /** - * {@inheritDoc} - */ - @Override - public List> getKeys() { - return Arrays.>asList(Keys.CONSTRAINT_C); - } - - /** - * {@inheritDoc} - */ - @Override - public Language as(String alias) { - return new Language(alias, this); - } - - /** - * Rename this table - */ - public Language rename(String name) { - return new Language(name, null); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/AuthorRecord.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/AuthorRecord.java deleted file mode 100644 index eecd11929b..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/AuthorRecord.java +++ /dev/null @@ -1,334 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables.records; - -import java.sql.Date; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.Record1; -import org.jooq.Record6; -import org.jooq.Row6; -import org.jooq.impl.UpdatableRecordImpl; -import sample.jooq.domain.tables.Author; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class AuthorRecord extends UpdatableRecordImpl - implements Record6 { - - private static final long serialVersionUID = -983051550; - - /** - * Setter for PUBLIC.AUTHOR.ID. - */ - public void setId(Integer value) { - setValue(0, value); - } - - /** - * Getter for PUBLIC.AUTHOR.ID. - */ - public Integer getId() { - return (Integer) getValue(0); - } - - /** - * Setter for PUBLIC.AUTHOR.FIRST_NAME. - */ - public void setFirstName(String value) { - setValue(1, value); - } - - /** - * Getter for PUBLIC.AUTHOR.FIRST_NAME. - */ - public String getFirstName() { - return (String) getValue(1); - } - - /** - * Setter for PUBLIC.AUTHOR.LAST_NAME. - */ - public void setLastName(String value) { - setValue(2, value); - } - - /** - * Getter for PUBLIC.AUTHOR.LAST_NAME. - */ - public String getLastName() { - return (String) getValue(2); - } - - /** - * Setter for PUBLIC.AUTHOR.DATE_OF_BIRTH. - */ - public void setDateOfBirth(Date value) { - setValue(3, value); - } - - /** - * Getter for PUBLIC.AUTHOR.DATE_OF_BIRTH. - */ - public Date getDateOfBirth() { - return (Date) getValue(3); - } - - /** - * Setter for PUBLIC.AUTHOR.YEAR_OF_BIRTH. - */ - public void setYearOfBirth(Integer value) { - setValue(4, value); - } - - /** - * Getter for PUBLIC.AUTHOR.YEAR_OF_BIRTH. - */ - public Integer getYearOfBirth() { - return (Integer) getValue(4); - } - - /** - * Setter for PUBLIC.AUTHOR.DISTINGUISHED. - */ - public void setDistinguished(Byte value) { - setValue(5, value); - } - - /** - * Getter for PUBLIC.AUTHOR.DISTINGUISHED. - */ - public Byte getDistinguished() { - return (Byte) getValue(5); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Record1 key() { - return (Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Record6 type implementation - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Row6 fieldsRow() { - return (Row6) super.fieldsRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Row6 valuesRow() { - return (Row6) super.valuesRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Field field1() { - return Author.AUTHOR.ID; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field2() { - return Author.AUTHOR.FIRST_NAME; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field3() { - return Author.AUTHOR.LAST_NAME; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field4() { - return Author.AUTHOR.DATE_OF_BIRTH; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field5() { - return Author.AUTHOR.YEAR_OF_BIRTH; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field6() { - return Author.AUTHOR.DISTINGUISHED; - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value1() { - return getId(); - } - - /** - * {@inheritDoc} - */ - @Override - public String value2() { - return getFirstName(); - } - - /** - * {@inheritDoc} - */ - @Override - public String value3() { - return getLastName(); - } - - /** - * {@inheritDoc} - */ - @Override - public Date value4() { - return getDateOfBirth(); - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value5() { - return getYearOfBirth(); - } - - /** - * {@inheritDoc} - */ - @Override - public Byte value6() { - return getDistinguished(); - } - - /** - * {@inheritDoc} - */ - @Override - public AuthorRecord value1(Integer value) { - setId(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AuthorRecord value2(String value) { - setFirstName(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AuthorRecord value3(String value) { - setLastName(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AuthorRecord value4(Date value) { - setDateOfBirth(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AuthorRecord value5(Integer value) { - setYearOfBirth(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AuthorRecord value6(Byte value) { - setDistinguished(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public AuthorRecord values(Integer value1, String value2, String value3, Date value4, - Integer value5, Byte value6) { - value1(value1); - value2(value2); - value3(value3); - value4(value4); - value5(value5); - value6(value6); - return this; - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached AuthorRecord - */ - public AuthorRecord() { - super(Author.AUTHOR); - } - - /** - * Create a detached, initialised AuthorRecord - */ - public AuthorRecord(Integer id, String firstName, String lastName, Date dateOfBirth, - Integer yearOfBirth, Byte distinguished) { - super(Author.AUTHOR); - - setValue(0, id); - setValue(1, firstName); - setValue(2, lastName); - setValue(3, dateOfBirth); - setValue(4, yearOfBirth); - setValue(5, distinguished); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookRecord.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookRecord.java deleted file mode 100644 index a2dab1b9f5..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookRecord.java +++ /dev/null @@ -1,291 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables.records; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.Record1; -import org.jooq.Record5; -import org.jooq.Row5; -import org.jooq.impl.UpdatableRecordImpl; -import sample.jooq.domain.tables.Book; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class BookRecord extends UpdatableRecordImpl - implements Record5 { - - private static final long serialVersionUID = 220424682; - - /** - * Setter for PUBLIC.BOOK.ID. - */ - public void setId(Integer value) { - setValue(0, value); - } - - /** - * Getter for PUBLIC.BOOK.ID. - */ - public Integer getId() { - return (Integer) getValue(0); - } - - /** - * Setter for PUBLIC.BOOK.AUTHOR_ID. - */ - public void setAuthorId(Integer value) { - setValue(1, value); - } - - /** - * Getter for PUBLIC.BOOK.AUTHOR_ID. - */ - public Integer getAuthorId() { - return (Integer) getValue(1); - } - - /** - * Setter for PUBLIC.BOOK.TITLE. - */ - public void setTitle(String value) { - setValue(2, value); - } - - /** - * Getter for PUBLIC.BOOK.TITLE. - */ - public String getTitle() { - return (String) getValue(2); - } - - /** - * Setter for PUBLIC.BOOK.PUBLISHED_IN. - */ - public void setPublishedIn(Integer value) { - setValue(3, value); - } - - /** - * Getter for PUBLIC.BOOK.PUBLISHED_IN. - */ - public Integer getPublishedIn() { - return (Integer) getValue(3); - } - - /** - * Setter for PUBLIC.BOOK.LANGUAGE_ID. - */ - public void setLanguageId(Integer value) { - setValue(4, value); - } - - /** - * Getter for PUBLIC.BOOK.LANGUAGE_ID. - */ - public Integer getLanguageId() { - return (Integer) getValue(4); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Record1 key() { - return (Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Record5 type implementation - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Row5 fieldsRow() { - return (Row5) super.fieldsRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Row5 valuesRow() { - return (Row5) super.valuesRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Field field1() { - return Book.BOOK.ID; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field2() { - return Book.BOOK.AUTHOR_ID; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field3() { - return Book.BOOK.TITLE; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field4() { - return Book.BOOK.PUBLISHED_IN; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field5() { - return Book.BOOK.LANGUAGE_ID; - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value1() { - return getId(); - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value2() { - return getAuthorId(); - } - - /** - * {@inheritDoc} - */ - @Override - public String value3() { - return getTitle(); - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value4() { - return getPublishedIn(); - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value5() { - return getLanguageId(); - } - - /** - * {@inheritDoc} - */ - @Override - public BookRecord value1(Integer value) { - setId(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookRecord value2(Integer value) { - setAuthorId(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookRecord value3(String value) { - setTitle(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookRecord value4(Integer value) { - setPublishedIn(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookRecord value5(Integer value) { - setLanguageId(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookRecord values(Integer value1, Integer value2, String value3, - Integer value4, Integer value5) { - value1(value1); - value2(value2); - value3(value3); - value4(value4); - value5(value5); - return this; - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached BookRecord - */ - public BookRecord() { - super(Book.BOOK); - } - - /** - * Create a detached, initialised BookRecord - */ - public BookRecord(Integer id, Integer authorId, String title, Integer publishedIn, - Integer languageId) { - super(Book.BOOK); - - setValue(0, id); - setValue(1, authorId); - setValue(2, title); - setValue(3, publishedIn); - setValue(4, languageId); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookStoreRecord.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookStoreRecord.java deleted file mode 100644 index ecea59da09..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookStoreRecord.java +++ /dev/null @@ -1,112 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables.records; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.Record1; -import org.jooq.Row1; -import org.jooq.impl.TableRecordImpl; -import sample.jooq.domain.tables.BookStore; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class BookStoreRecord extends TableRecordImpl - implements Record1 { - - private static final long serialVersionUID = -1969224219; - - /** - * Setter for PUBLIC.BOOK_STORE.NAME. - */ - public void setName(String value) { - setValue(0, value); - } - - /** - * Getter for PUBLIC.BOOK_STORE.NAME. - */ - public String getName() { - return (String) getValue(0); - } - - // ------------------------------------------------------------------------- - // Record1 type implementation - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Row1 fieldsRow() { - return (Row1) super.fieldsRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Row1 valuesRow() { - return (Row1) super.valuesRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Field field1() { - return BookStore.BOOK_STORE.NAME; - } - - /** - * {@inheritDoc} - */ - @Override - public String value1() { - return getName(); - } - - /** - * {@inheritDoc} - */ - @Override - public BookStoreRecord value1(String value) { - setName(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookStoreRecord values(String value1) { - value1(value1); - return this; - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached BookStoreRecord - */ - public BookStoreRecord() { - super(BookStore.BOOK_STORE); - } - - /** - * Create a detached, initialised BookStoreRecord - */ - public BookStoreRecord(String name) { - super(BookStore.BOOK_STORE); - - setValue(0, name); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookToBookStoreRecord.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookToBookStoreRecord.java deleted file mode 100644 index 8ae6ae9428..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/BookToBookStoreRecord.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables.records; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.Record2; -import org.jooq.Record3; -import org.jooq.Row3; -import org.jooq.impl.UpdatableRecordImpl; -import sample.jooq.domain.tables.BookToBookStore; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class BookToBookStoreRecord extends UpdatableRecordImpl - implements Record3 { - - private static final long serialVersionUID = 1124329527; - - /** - * Setter for PUBLIC.BOOK_TO_BOOK_STORE.NAME. - */ - public void setName(String value) { - setValue(0, value); - } - - /** - * Getter for PUBLIC.BOOK_TO_BOOK_STORE.NAME. - */ - public String getName() { - return (String) getValue(0); - } - - /** - * Setter for PUBLIC.BOOK_TO_BOOK_STORE.BOOK_ID. - */ - public void setBookId(Integer value) { - setValue(1, value); - } - - /** - * Getter for PUBLIC.BOOK_TO_BOOK_STORE.BOOK_ID. - */ - public Integer getBookId() { - return (Integer) getValue(1); - } - - /** - * Setter for PUBLIC.BOOK_TO_BOOK_STORE.STOCK. - */ - public void setStock(Integer value) { - setValue(2, value); - } - - /** - * Getter for PUBLIC.BOOK_TO_BOOK_STORE.STOCK. - */ - public Integer getStock() { - return (Integer) getValue(2); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Record2 key() { - return (Record2) super.key(); - } - - // ------------------------------------------------------------------------- - // Record3 type implementation - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Row3 fieldsRow() { - return (Row3) super.fieldsRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Row3 valuesRow() { - return (Row3) super.valuesRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Field field1() { - return BookToBookStore.BOOK_TO_BOOK_STORE.NAME; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field2() { - return BookToBookStore.BOOK_TO_BOOK_STORE.BOOK_ID; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field3() { - return BookToBookStore.BOOK_TO_BOOK_STORE.STOCK; - } - - /** - * {@inheritDoc} - */ - @Override - public String value1() { - return getName(); - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value2() { - return getBookId(); - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value3() { - return getStock(); - } - - /** - * {@inheritDoc} - */ - @Override - public BookToBookStoreRecord value1(String value) { - setName(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookToBookStoreRecord value2(Integer value) { - setBookId(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookToBookStoreRecord value3(Integer value) { - setStock(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BookToBookStoreRecord values(String value1, Integer value2, Integer value3) { - value1(value1); - value2(value2); - value3(value3); - return this; - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached BookToBookStoreRecord - */ - public BookToBookStoreRecord() { - super(BookToBookStore.BOOK_TO_BOOK_STORE); - } - - /** - * Create a detached, initialised BookToBookStoreRecord - */ - public BookToBookStoreRecord(String name, Integer bookId, Integer stock) { - super(BookToBookStore.BOOK_TO_BOOK_STORE); - - setValue(0, name); - setValue(1, bookId); - setValue(2, stock); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/LanguageRecord.java b/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/LanguageRecord.java deleted file mode 100644 index 90cd6449af..0000000000 --- a/spring-boot-samples/spring-boot-sample-jooq/gensrc/main/java/sample/jooq/domain/tables/records/LanguageRecord.java +++ /dev/null @@ -1,207 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package sample.jooq.domain.tables.records; - -import javax.annotation.Generated; - -import org.jooq.Field; -import org.jooq.Record1; -import org.jooq.Record3; -import org.jooq.Row3; -import org.jooq.impl.UpdatableRecordImpl; -import sample.jooq.domain.tables.Language; - -/** - * This class is generated by jOOQ. - */ -@Generated(value = { "http://www.jooq.org", - "jOOQ version:3.6.2" }, comments = "This class is generated by jOOQ") -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class LanguageRecord extends UpdatableRecordImpl - implements Record3 { - - private static final long serialVersionUID = -1003202585; - - /** - * Setter for PUBLIC.LANGUAGE.ID. - */ - public void setId(Integer value) { - setValue(0, value); - } - - /** - * Getter for PUBLIC.LANGUAGE.ID. - */ - public Integer getId() { - return (Integer) getValue(0); - } - - /** - * Setter for PUBLIC.LANGUAGE.CD. - */ - public void setCd(String value) { - setValue(1, value); - } - - /** - * Getter for PUBLIC.LANGUAGE.CD. - */ - public String getCd() { - return (String) getValue(1); - } - - /** - * Setter for PUBLIC.LANGUAGE.DESCRIPTION. - */ - public void setDescription(String value) { - setValue(2, value); - } - - /** - * Getter for PUBLIC.LANGUAGE.DESCRIPTION. - */ - public String getDescription() { - return (String) getValue(2); - } - - // ------------------------------------------------------------------------- - // Primary key information - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Record1 key() { - return (Record1) super.key(); - } - - // ------------------------------------------------------------------------- - // Record3 type implementation - // ------------------------------------------------------------------------- - - /** - * {@inheritDoc} - */ - @Override - public Row3 fieldsRow() { - return (Row3) super.fieldsRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Row3 valuesRow() { - return (Row3) super.valuesRow(); - } - - /** - * {@inheritDoc} - */ - @Override - public Field field1() { - return Language.LANGUAGE.ID; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field2() { - return Language.LANGUAGE.CD; - } - - /** - * {@inheritDoc} - */ - @Override - public Field field3() { - return Language.LANGUAGE.DESCRIPTION; - } - - /** - * {@inheritDoc} - */ - @Override - public Integer value1() { - return getId(); - } - - /** - * {@inheritDoc} - */ - @Override - public String value2() { - return getCd(); - } - - /** - * {@inheritDoc} - */ - @Override - public String value3() { - return getDescription(); - } - - /** - * {@inheritDoc} - */ - @Override - public LanguageRecord value1(Integer value) { - setId(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public LanguageRecord value2(String value) { - setCd(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public LanguageRecord value3(String value) { - setDescription(value); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public LanguageRecord values(Integer value1, String value2, String value3) { - value1(value1); - value2(value2); - value3(value3); - return this; - } - - // ------------------------------------------------------------------------- - // Constructors - // ------------------------------------------------------------------------- - - /** - * Create a detached LanguageRecord - */ - public LanguageRecord() { - super(Language.LANGUAGE); - } - - /** - * Create a detached, initialised LanguageRecord - */ - public LanguageRecord(Integer id, String cd, String description) { - super(Language.LANGUAGE); - - setValue(0, id); - setValue(1, cd); - setValue(2, description); - } -} diff --git a/spring-boot-samples/spring-boot-sample-jooq/pom.xml b/spring-boot-samples/spring-boot-sample-jooq/pom.xml index 35eca0648c..690a437005 100644 --- a/spring-boot-samples/spring-boot-sample-jooq/pom.xml +++ b/spring-boot-samples/spring-boot-sample-jooq/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -33,6 +34,11 @@ spring-boot-starter-test test + + org.jooq + jooq-codegen + provided + @@ -98,6 +104,24 @@ generate + + maven-compiler-plugin + + + generate-jooq-utils + generate-sources + + compile + + false + + + sample/jooq/util/** + + + + + org.codehaus.mojo sql-maven-plugin @@ -156,10 +180,16 @@ PUBLIC + + sample.jooq.util.TangleFreeGeneratorStrategy + sample.jooq.domain ${basedir}/gensrc/main/java + + false + diff --git a/spring-boot-samples/spring-boot-sample-jooq/src/main/java/sample/jooq/JooqExamples.java b/spring-boot-samples/spring-boot-sample-jooq/src/main/java/sample/jooq/JooqExamples.java index 69ae6f6b11..3eae4b887d 100644 --- a/spring-boot-samples/spring-boot-sample-jooq/src/main/java/sample/jooq/JooqExamples.java +++ b/spring-boot-samples/spring-boot-sample-jooq/src/main/java/sample/jooq/JooqExamples.java @@ -30,8 +30,8 @@ import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.RowMapper; import org.springframework.stereotype.Component; -import static sample.jooq.domain.tables.Author.AUTHOR; -import static sample.jooq.domain.tables.Book.BOOK; +import static sample.jooq.domain.Author.AUTHOR; +import static sample.jooq.domain.Book.BOOK; @Component public class JooqExamples implements CommandLineRunner { diff --git a/spring-boot-samples/spring-boot-sample-jooq/src/main/java/sample/jooq/util/TangleFreeGeneratorStrategy.java b/spring-boot-samples/spring-boot-sample-jooq/src/main/java/sample/jooq/util/TangleFreeGeneratorStrategy.java new file mode 100644 index 0000000000..0dcbb03151 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-jooq/src/main/java/sample/jooq/util/TangleFreeGeneratorStrategy.java @@ -0,0 +1,33 @@ +/* + * Copyright 2012-2016 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package sample.jooq.util; + +import org.jooq.util.DefaultGeneratorStrategy; +import org.jooq.util.Definition; + +/** + * Custom {@link DefaultGeneratorStrategy} that doesn't produce tangled packages. Too + * simple for general use but solves false flags for our build. + */ +public class TangleFreeGeneratorStrategy extends DefaultGeneratorStrategy { + + @Override + public String getJavaPackageName(Definition definition, Mode mode) { + return getTargetPackage(); + } + +}