diff --git a/jOOQ-groovy/.classpath b/jOOQ-groovy/.classpath new file mode 100644 index 0000000000..a0c98e2022 --- /dev/null +++ b/jOOQ-groovy/.classpath @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/jOOQ-groovy/.gitignore b/jOOQ-groovy/.gitignore new file mode 100644 index 0000000000..5e56e040ec --- /dev/null +++ b/jOOQ-groovy/.gitignore @@ -0,0 +1 @@ +/bin diff --git a/jOOQ-groovy/.groovy/suggestions.xdsl b/jOOQ-groovy/.groovy/suggestions.xdsl new file mode 100644 index 0000000000..1ce9852b14 --- /dev/null +++ b/jOOQ-groovy/.groovy/suggestions.xdsl @@ -0,0 +1,2 @@ + + diff --git a/jOOQ-groovy/.project b/jOOQ-groovy/.project new file mode 100644 index 0000000000..5588fc8703 --- /dev/null +++ b/jOOQ-groovy/.project @@ -0,0 +1,18 @@ + + + jOOQ-groovy + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.groovy.core.groovyNature + org.eclipse.jdt.core.javanature + + diff --git a/jOOQ-groovy/.settings/org.eclipse.jdt.core.prefs b/jOOQ-groovy/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..7341ab1683 --- /dev/null +++ b/jOOQ-groovy/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/jOOQ-groovy/.settings/org.eclipse.jdt.groovy.core.prefs b/jOOQ-groovy/.settings/org.eclipse.jdt.groovy.core.prefs new file mode 100644 index 0000000000..fa93b48f6c --- /dev/null +++ b/jOOQ-groovy/.settings/org.eclipse.jdt.groovy.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +groovy.compiler.level=21 diff --git a/jOOQ-groovy/src/org/jooq/groovy/GroovyTest.groovy b/jOOQ-groovy/src/org/jooq/groovy/GroovyTest.groovy new file mode 100644 index 0000000000..7eaaff0aa3 --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/GroovyTest.groovy @@ -0,0 +1,29 @@ +package org.jooq.groovy + +import static org.jooq.impl.DSL.* +import static org.jooq.groovy.example.h2.Tables.* + +import groovy.sql.Sql +import org.jooq.* +import org.jooq.impl.DSL + +sql = Sql.newInstance( + 'jdbc:h2:~/scala-test', 'sa', '', 'org.h2.Driver') + +a = T_AUTHOR.as("a") +b = T_BOOK.as("b") + +DSL.using(sql.connection) + .select(a.FIRST_NAME, a.LAST_NAME, b.TITLE) + .from(a) + .join(b).on(a.ID.eq(b.AUTHOR_ID)) + .fetchInto ({ + r -> println( + "${r.getValue(a.FIRST_NAME)} " + + "${r.getValue(a.LAST_NAME)} " + + "has written ${r.getValue(b.TITLE)}" + ) + } as RecordHandler) + + + \ No newline at end of file diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/Keys.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/Keys.java new file mode 100644 index 0000000000..bf76dd25f0 --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/Keys.java @@ -0,0 +1,49 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2; + +/** + * This class is generated by jOOQ. + * + * A class modelling foreign key relationships between tables of the PUBLIC + * schema + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Keys { + + // ------------------------------------------------------------------------- + // IDENTITY definitions + // ------------------------------------------------------------------------- + + + // ------------------------------------------------------------------------- + // UNIQUE and PRIMARY KEY definitions + // ------------------------------------------------------------------------- + + public static final org.jooq.UniqueKey PK_T_AUTHOR = UniqueKeys0.PK_T_AUTHOR; + public static final org.jooq.UniqueKey PK_T_BOOK = UniqueKeys0.PK_T_BOOK; + + // ------------------------------------------------------------------------- + // FOREIGN KEY definitions + // ------------------------------------------------------------------------- + + public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = ForeignKeys0.FK_T_BOOK_AUTHOR_ID; + public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = ForeignKeys0.FK_T_BOOK_CO_AUTHOR_ID; + + // ------------------------------------------------------------------------- + // [#1459] distribute members to avoid static initialisers > 64kb + // ------------------------------------------------------------------------- + + private static class UniqueKeys0 extends org.jooq.impl.AbstractKeys { + public static final org.jooq.UniqueKey PK_T_AUTHOR = createUniqueKey(org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR, org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR.ID); + public static final org.jooq.UniqueKey PK_T_BOOK = createUniqueKey(org.jooq.groovy.example.h2.tables.TBook.T_BOOK, org.jooq.groovy.example.h2.tables.TBook.T_BOOK.ID); + } + + private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { + public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.groovy.example.h2.Keys.PK_T_AUTHOR, org.jooq.groovy.example.h2.tables.TBook.T_BOOK, org.jooq.groovy.example.h2.tables.TBook.T_BOOK.AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.groovy.example.h2.Keys.PK_T_AUTHOR, org.jooq.groovy.example.h2.tables.TBook.T_BOOK, org.jooq.groovy.example.h2.tables.TBook.T_BOOK.CO_AUTHOR_ID); + } +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/Public.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/Public.java new file mode 100644 index 0000000000..98447e3419 --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/Public.java @@ -0,0 +1,52 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Public extends org.jooq.impl.SchemaImpl { + + private static final long serialVersionUID = 2038761574; + + /** + * The singleton instance of PUBLIC + */ + public static final Public PUBLIC = new Public(); + + /** + * No further instances allowed + */ + private Public() { + super("PUBLIC"); + } + + @Override + public final java.util.List> getSequences() { + java.util.List result = new java.util.ArrayList(); + result.addAll(getSequences0()); + return result; + } + + private final java.util.List> getSequences0() { + return java.util.Arrays.>asList( + org.jooq.groovy.example.h2.Sequences.S_AUTHOR_ID); + } + + @Override + public final java.util.List> getTables() { + java.util.List result = new java.util.ArrayList(); + result.addAll(getTables0()); + return result; + } + + private final java.util.List> getTables0() { + return java.util.Arrays.>asList( + org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR, + org.jooq.groovy.example.h2.tables.TBook.T_BOOK); + } +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/Sequences.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/Sequences.java new file mode 100644 index 0000000000..59f7969ccb --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/Sequences.java @@ -0,0 +1,20 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2; + +/** + * This class is generated by jOOQ. + * + * Convenience access to all sequences in PUBLIC + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Sequences { + + /** + * The sequence PUBLIC.S_AUTHOR_ID + */ + public static final org.jooq.Sequence S_AUTHOR_ID = new org.jooq.impl.SequenceImpl("S_AUTHOR_ID", org.jooq.groovy.example.h2.Public.PUBLIC, org.jooq.impl.SQLDataType.BIGINT); +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/Tables.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/Tables.java new file mode 100644 index 0000000000..0852f31e52 --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/Tables.java @@ -0,0 +1,25 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2; + +/** + * This class is generated by jOOQ. + * + * Convenience access to all tables in PUBLIC + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Tables { + + /** + * The table PUBLIC.T_AUTHOR + */ + public static final org.jooq.groovy.example.h2.tables.TAuthor T_AUTHOR = org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR; + + /** + * The table PUBLIC.T_BOOK + */ + public static final org.jooq.groovy.example.h2.tables.TBook T_BOOK = org.jooq.groovy.example.h2.tables.TBook.T_BOOK; +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/TAuthor.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/TAuthor.java new file mode 100644 index 0000000000..106e1750dc --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/TAuthor.java @@ -0,0 +1,96 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2.tables; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class TAuthor extends org.jooq.impl.TableImpl { + + private static final long serialVersionUID = 1565954972; + + /** + * The singleton instance of PUBLIC.T_AUTHOR + */ + public static final org.jooq.groovy.example.h2.tables.TAuthor T_AUTHOR = new org.jooq.groovy.example.h2.tables.TAuthor(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.groovy.example.h2.tables.records.TAuthorRecord.class; + } + + /** + * The column PUBLIC.T_AUTHOR.ID. + */ + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this); + + /** + * The column PUBLIC.T_AUTHOR.FIRST_NAME. + */ + public final org.jooq.TableField FIRST_NAME = createField("FIRST_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(50), this); + + /** + * The column PUBLIC.T_AUTHOR.LAST_NAME. + */ + public final org.jooq.TableField LAST_NAME = createField("LAST_NAME", org.jooq.impl.SQLDataType.VARCHAR.length(50).nullable(false), this); + + /** + * The column PUBLIC.T_AUTHOR.DATE_OF_BIRTH. + */ + public final org.jooq.TableField DATE_OF_BIRTH = createField("DATE_OF_BIRTH", org.jooq.impl.SQLDataType.TIMESTAMP, this); + + /** + * The column PUBLIC.T_AUTHOR.YEAR_OF_BIRTH. + */ + public final org.jooq.TableField YEAR_OF_BIRTH = createField("YEAR_OF_BIRTH", org.jooq.impl.SQLDataType.INTEGER, this); + + /** + * The column PUBLIC.T_AUTHOR.ADDRESS. + */ + public final org.jooq.TableField ADDRESS = createField("ADDRESS", org.jooq.impl.SQLDataType.VARCHAR.length(50), this); + + /** + * Create a PUBLIC.T_AUTHOR table reference + */ + public TAuthor() { + super("T_AUTHOR", org.jooq.groovy.example.h2.Public.PUBLIC); + } + + /** + * Create an aliased PUBLIC.T_AUTHOR table reference + */ + public TAuthor(java.lang.String alias) { + super(alias, org.jooq.groovy.example.h2.Public.PUBLIC, org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.UniqueKey getPrimaryKey() { + return org.jooq.groovy.example.h2.Keys.PK_T_AUTHOR; + } + + /** + * {@inheritDoc} + */ + @Override + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.groovy.example.h2.Keys.PK_T_AUTHOR); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.groovy.example.h2.tables.TAuthor as(java.lang.String alias) { + return new org.jooq.groovy.example.h2.tables.TAuthor(alias); + } +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/TBook.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/TBook.java new file mode 100644 index 0000000000..2c0c8e304a --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/TBook.java @@ -0,0 +1,129 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2.tables; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class TBook extends org.jooq.impl.TableImpl { + + private static final long serialVersionUID = 1194523510; + + /** + * The singleton instance of PUBLIC.T_BOOK + */ + public static final org.jooq.groovy.example.h2.tables.TBook T_BOOK = new org.jooq.groovy.example.h2.tables.TBook(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.groovy.example.h2.tables.records.TBookRecord.class; + } + + /** + * The column PUBLIC.T_BOOK.ID. + */ + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this); + + /** + * The column PUBLIC.T_BOOK.AUTHOR_ID. + */ + public final org.jooq.TableField AUTHOR_ID = createField("AUTHOR_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this); + + /** + * The column PUBLIC.T_BOOK.CO_AUTHOR_ID. + */ + public final org.jooq.TableField CO_AUTHOR_ID = createField("CO_AUTHOR_ID", org.jooq.impl.SQLDataType.INTEGER, this); + + /** + * The column PUBLIC.T_BOOK.DETAILS_ID. + */ + public final org.jooq.TableField DETAILS_ID = createField("DETAILS_ID", org.jooq.impl.SQLDataType.INTEGER, this); + + /** + * The column PUBLIC.T_BOOK.TITLE. + */ + public final org.jooq.TableField TITLE = createField("TITLE", org.jooq.impl.SQLDataType.VARCHAR.length(400).nullable(false), this); + + /** + * The column PUBLIC.T_BOOK.PUBLISHED_IN. + */ + public final org.jooq.TableField PUBLISHED_IN = createField("PUBLISHED_IN", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this); + + /** + * The column PUBLIC.T_BOOK.LANGUAGE_ID. + */ + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this); + + /** + * The column PUBLIC.T_BOOK.CONTENT_TEXT. + */ + public final org.jooq.TableField CONTENT_TEXT = createField("CONTENT_TEXT", org.jooq.impl.SQLDataType.CLOB.length(2147483647), this); + + /** + * The column PUBLIC.T_BOOK.CONTENT_PDF. + */ + public final org.jooq.TableField CONTENT_PDF = createField("CONTENT_PDF", org.jooq.impl.SQLDataType.BLOB.length(2147483647), this); + + /** + * The column PUBLIC.T_BOOK.REC_VERSION. + */ + public final org.jooq.TableField REC_VERSION = createField("REC_VERSION", org.jooq.impl.SQLDataType.INTEGER, this); + + /** + * The column PUBLIC.T_BOOK.REC_TIMESTAMP. + */ + public final org.jooq.TableField REC_TIMESTAMP = createField("REC_TIMESTAMP", org.jooq.impl.SQLDataType.TIMESTAMP, this); + + /** + * Create a PUBLIC.T_BOOK table reference + */ + public TBook() { + super("T_BOOK", org.jooq.groovy.example.h2.Public.PUBLIC); + } + + /** + * Create an aliased PUBLIC.T_BOOK table reference + */ + public TBook(java.lang.String alias) { + super(alias, org.jooq.groovy.example.h2.Public.PUBLIC, org.jooq.groovy.example.h2.tables.TBook.T_BOOK); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.UniqueKey getPrimaryKey() { + return org.jooq.groovy.example.h2.Keys.PK_T_BOOK; + } + + /** + * {@inheritDoc} + */ + @Override + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.groovy.example.h2.Keys.PK_T_BOOK); + } + + /** + * {@inheritDoc} + */ + @Override + public java.util.List> getReferences() { + return java.util.Arrays.>asList(org.jooq.groovy.example.h2.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.groovy.example.h2.Keys.FK_T_BOOK_CO_AUTHOR_ID); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.groovy.example.h2.tables.TBook as(java.lang.String alias) { + return new org.jooq.groovy.example.h2.tables.TBook(alias); + } +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/pojos/TAuthor.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/pojos/TAuthor.java new file mode 100644 index 0000000000..daaa467663 --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/pojos/TAuthor.java @@ -0,0 +1,88 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2.tables.pojos; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class TAuthor implements java.io.Serializable { + + private static final long serialVersionUID = 1333576897; + + private java.lang.Integer id; + private java.lang.String firstName; + private java.lang.String lastName; + private java.sql.Timestamp dateOfBirth; + private java.lang.Integer yearOfBirth; + private java.lang.String address; + + public TAuthor() {} + + public TAuthor( + java.lang.Integer id, + java.lang.String firstName, + java.lang.String lastName, + java.sql.Timestamp dateOfBirth, + java.lang.Integer yearOfBirth, + java.lang.String address + ) { + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + this.dateOfBirth = dateOfBirth; + this.yearOfBirth = yearOfBirth; + this.address = address; + } + + public java.lang.Integer getId() { + return this.id; + } + + public void setId(java.lang.Integer id) { + this.id = id; + } + + public java.lang.String getFirstName() { + return this.firstName; + } + + public void setFirstName(java.lang.String firstName) { + this.firstName = firstName; + } + + public java.lang.String getLastName() { + return this.lastName; + } + + public void setLastName(java.lang.String lastName) { + this.lastName = lastName; + } + + public java.sql.Timestamp getDateOfBirth() { + return this.dateOfBirth; + } + + public void setDateOfBirth(java.sql.Timestamp dateOfBirth) { + this.dateOfBirth = dateOfBirth; + } + + public java.lang.Integer getYearOfBirth() { + return this.yearOfBirth; + } + + public void setYearOfBirth(java.lang.Integer yearOfBirth) { + this.yearOfBirth = yearOfBirth; + } + + public java.lang.String getAddress() { + return this.address; + } + + public void setAddress(java.lang.String address) { + this.address = address; + } +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/pojos/TBook.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/pojos/TBook.java new file mode 100644 index 0000000000..1aaf01fc03 --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/pojos/TBook.java @@ -0,0 +1,143 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2.tables.pojos; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class TBook implements java.io.Serializable { + + private static final long serialVersionUID = -1404736907; + + private java.lang.Integer id; + private java.lang.Integer authorId; + private java.lang.Integer coAuthorId; + private java.lang.Integer detailsId; + private java.lang.String title; + private java.lang.Integer publishedIn; + private java.lang.Integer languageId; + private java.lang.String contentText; + private byte[] contentPdf; + private java.lang.Integer recVersion; + private java.sql.Timestamp recTimestamp; + + public TBook() {} + + public TBook( + java.lang.Integer id, + java.lang.Integer authorId, + java.lang.Integer coAuthorId, + java.lang.Integer detailsId, + java.lang.String title, + java.lang.Integer publishedIn, + java.lang.Integer languageId, + java.lang.String contentText, + byte[] contentPdf, + java.lang.Integer recVersion, + java.sql.Timestamp recTimestamp + ) { + this.id = id; + this.authorId = authorId; + this.coAuthorId = coAuthorId; + this.detailsId = detailsId; + this.title = title; + this.publishedIn = publishedIn; + this.languageId = languageId; + this.contentText = contentText; + this.contentPdf = contentPdf; + this.recVersion = recVersion; + this.recTimestamp = recTimestamp; + } + + public java.lang.Integer getId() { + return this.id; + } + + public void setId(java.lang.Integer id) { + this.id = id; + } + + public java.lang.Integer getAuthorId() { + return this.authorId; + } + + public void setAuthorId(java.lang.Integer authorId) { + this.authorId = authorId; + } + + public java.lang.Integer getCoAuthorId() { + return this.coAuthorId; + } + + public void setCoAuthorId(java.lang.Integer coAuthorId) { + this.coAuthorId = coAuthorId; + } + + public java.lang.Integer getDetailsId() { + return this.detailsId; + } + + public void setDetailsId(java.lang.Integer detailsId) { + this.detailsId = detailsId; + } + + public java.lang.String getTitle() { + return this.title; + } + + public void setTitle(java.lang.String title) { + this.title = title; + } + + public java.lang.Integer getPublishedIn() { + return this.publishedIn; + } + + public void setPublishedIn(java.lang.Integer publishedIn) { + this.publishedIn = publishedIn; + } + + public java.lang.Integer getLanguageId() { + return this.languageId; + } + + public void setLanguageId(java.lang.Integer languageId) { + this.languageId = languageId; + } + + public java.lang.String getContentText() { + return this.contentText; + } + + public void setContentText(java.lang.String contentText) { + this.contentText = contentText; + } + + public byte[] getContentPdf() { + return this.contentPdf; + } + + public void setContentPdf(byte[] contentPdf) { + this.contentPdf = contentPdf; + } + + public java.lang.Integer getRecVersion() { + return this.recVersion; + } + + public void setRecVersion(java.lang.Integer recVersion) { + this.recVersion = recVersion; + } + + public java.sql.Timestamp getRecTimestamp() { + return this.recTimestamp; + } + + public void setRecTimestamp(java.sql.Timestamp recTimestamp) { + this.recTimestamp = recTimestamp; + } +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/records/TAuthorRecord.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/records/TAuthorRecord.java new file mode 100644 index 0000000000..e914543d32 --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/records/TAuthorRecord.java @@ -0,0 +1,252 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2.tables.records; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class TAuthorRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.Record6 { + + private static final long serialVersionUID = -315637049; + + /** + * Setter for PUBLIC.T_AUTHOR.ID. + */ + public void setId(java.lang.Integer value) { + setValue(0, value); + } + + /** + * Getter for PUBLIC.T_AUTHOR.ID. + */ + public java.lang.Integer getId() { + return (java.lang.Integer) getValue(0); + } + + /** + * Setter for PUBLIC.T_AUTHOR.FIRST_NAME. + */ + public void setFirstName(java.lang.String value) { + setValue(1, value); + } + + /** + * Getter for PUBLIC.T_AUTHOR.FIRST_NAME. + */ + public java.lang.String getFirstName() { + return (java.lang.String) getValue(1); + } + + /** + * Setter for PUBLIC.T_AUTHOR.LAST_NAME. + */ + public void setLastName(java.lang.String value) { + setValue(2, value); + } + + /** + * Getter for PUBLIC.T_AUTHOR.LAST_NAME. + */ + public java.lang.String getLastName() { + return (java.lang.String) getValue(2); + } + + /** + * Setter for PUBLIC.T_AUTHOR.DATE_OF_BIRTH. + */ + public void setDateOfBirth(java.sql.Timestamp value) { + setValue(3, value); + } + + /** + * Getter for PUBLIC.T_AUTHOR.DATE_OF_BIRTH. + */ + public java.sql.Timestamp getDateOfBirth() { + return (java.sql.Timestamp) getValue(3); + } + + /** + * Setter for PUBLIC.T_AUTHOR.YEAR_OF_BIRTH. + */ + public void setYearOfBirth(java.lang.Integer value) { + setValue(4, value); + } + + /** + * Getter for PUBLIC.T_AUTHOR.YEAR_OF_BIRTH. + */ + public java.lang.Integer getYearOfBirth() { + return (java.lang.Integer) getValue(4); + } + + /** + * Setter for PUBLIC.T_AUTHOR.ADDRESS. + */ + public void setAddress(java.lang.String value) { + setValue(5, value); + } + + /** + * Getter for PUBLIC.T_AUTHOR.ADDRESS. + */ + public java.lang.String getAddress() { + return (java.lang.String) getValue(5); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Record1 key() { + return (org.jooq.Record1) super.key(); + } + + // ------------------------------------------------------------------------- + // Record6 type implementation + // ------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Row6 fieldsRow() { + return (org.jooq.Row6) super.fieldsRow(); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Row6 valuesRow() { + return (org.jooq.Row6) super.valuesRow(); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field1() { + return org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR.ID; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field2() { + return org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR.FIRST_NAME; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field3() { + return org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR.LAST_NAME; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field4() { + return org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR.DATE_OF_BIRTH; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field5() { + return org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR.YEAR_OF_BIRTH; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field6() { + return org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR.ADDRESS; + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value1() { + return getId(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.String value2() { + return getFirstName(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.String value3() { + return getLastName(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.sql.Timestamp value4() { + return getDateOfBirth(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value5() { + return getYearOfBirth(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.String value6() { + return getAddress(); + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached TAuthorRecord + */ + public TAuthorRecord() { + super(org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR); + } + + /** + * Create a detached, initialised TAuthorRecord + */ + public TAuthorRecord(java.lang.Integer id, java.lang.String firstName, java.lang.String lastName, java.sql.Timestamp dateOfBirth, java.lang.Integer yearOfBirth, java.lang.String address) { + super(org.jooq.groovy.example.h2.tables.TAuthor.T_AUTHOR); + + setValue(0, id); + setValue(1, firstName); + setValue(2, lastName); + setValue(3, dateOfBirth); + setValue(4, yearOfBirth); + setValue(5, address); + } +} diff --git a/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/records/TBookRecord.java b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/records/TBookRecord.java new file mode 100644 index 0000000000..b67ea2d449 --- /dev/null +++ b/jOOQ-groovy/src/org/jooq/groovy/example/h2/tables/records/TBookRecord.java @@ -0,0 +1,407 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.groovy.example.h2.tables.records; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = { "http://www.jooq.org", "3.2.1" }, + comments = "This class is generated by jOOQ") +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.Record11 { + + private static final long serialVersionUID = 439492631; + + /** + * Setter for PUBLIC.T_BOOK.ID. + */ + public void setId(java.lang.Integer value) { + setValue(0, value); + } + + /** + * Getter for PUBLIC.T_BOOK.ID. + */ + public java.lang.Integer getId() { + return (java.lang.Integer) getValue(0); + } + + /** + * Setter for PUBLIC.T_BOOK.AUTHOR_ID. + */ + public void setAuthorId(java.lang.Integer value) { + setValue(1, value); + } + + /** + * Getter for PUBLIC.T_BOOK.AUTHOR_ID. + */ + public java.lang.Integer getAuthorId() { + return (java.lang.Integer) getValue(1); + } + + /** + * Setter for PUBLIC.T_BOOK.CO_AUTHOR_ID. + */ + public void setCoAuthorId(java.lang.Integer value) { + setValue(2, value); + } + + /** + * Getter for PUBLIC.T_BOOK.CO_AUTHOR_ID. + */ + public java.lang.Integer getCoAuthorId() { + return (java.lang.Integer) getValue(2); + } + + /** + * Setter for PUBLIC.T_BOOK.DETAILS_ID. + */ + public void setDetailsId(java.lang.Integer value) { + setValue(3, value); + } + + /** + * Getter for PUBLIC.T_BOOK.DETAILS_ID. + */ + public java.lang.Integer getDetailsId() { + return (java.lang.Integer) getValue(3); + } + + /** + * Setter for PUBLIC.T_BOOK.TITLE. + */ + public void setTitle(java.lang.String value) { + setValue(4, value); + } + + /** + * Getter for PUBLIC.T_BOOK.TITLE. + */ + public java.lang.String getTitle() { + return (java.lang.String) getValue(4); + } + + /** + * Setter for PUBLIC.T_BOOK.PUBLISHED_IN. + */ + public void setPublishedIn(java.lang.Integer value) { + setValue(5, value); + } + + /** + * Getter for PUBLIC.T_BOOK.PUBLISHED_IN. + */ + public java.lang.Integer getPublishedIn() { + return (java.lang.Integer) getValue(5); + } + + /** + * Setter for PUBLIC.T_BOOK.LANGUAGE_ID. + */ + public void setLanguageId(java.lang.Integer value) { + setValue(6, value); + } + + /** + * Getter for PUBLIC.T_BOOK.LANGUAGE_ID. + */ + public java.lang.Integer getLanguageId() { + return (java.lang.Integer) getValue(6); + } + + /** + * Setter for PUBLIC.T_BOOK.CONTENT_TEXT. + */ + public void setContentText(java.lang.String value) { + setValue(7, value); + } + + /** + * Getter for PUBLIC.T_BOOK.CONTENT_TEXT. + */ + public java.lang.String getContentText() { + return (java.lang.String) getValue(7); + } + + /** + * Setter for PUBLIC.T_BOOK.CONTENT_PDF. + */ + public void setContentPdf(byte[] value) { + setValue(8, value); + } + + /** + * Getter for PUBLIC.T_BOOK.CONTENT_PDF. + */ + public byte[] getContentPdf() { + return (byte[]) getValue(8); + } + + /** + * Setter for PUBLIC.T_BOOK.REC_VERSION. + */ + public void setRecVersion(java.lang.Integer value) { + setValue(9, value); + } + + /** + * Getter for PUBLIC.T_BOOK.REC_VERSION. + */ + public java.lang.Integer getRecVersion() { + return (java.lang.Integer) getValue(9); + } + + /** + * Setter for PUBLIC.T_BOOK.REC_TIMESTAMP. + */ + public void setRecTimestamp(java.sql.Timestamp value) { + setValue(10, value); + } + + /** + * Getter for PUBLIC.T_BOOK.REC_TIMESTAMP. + */ + public java.sql.Timestamp getRecTimestamp() { + return (java.sql.Timestamp) getValue(10); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Record1 key() { + return (org.jooq.Record1) super.key(); + } + + // ------------------------------------------------------------------------- + // Record11 type implementation + // ------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Row11 fieldsRow() { + return (org.jooq.Row11) super.fieldsRow(); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Row11 valuesRow() { + return (org.jooq.Row11) super.valuesRow(); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field1() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.ID; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field2() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.AUTHOR_ID; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field3() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.CO_AUTHOR_ID; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field4() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.DETAILS_ID; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field5() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.TITLE; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field6() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.PUBLISHED_IN; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field7() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.LANGUAGE_ID; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field8() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.CONTENT_TEXT; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field9() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.CONTENT_PDF; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field10() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.REC_VERSION; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field11() { + return org.jooq.groovy.example.h2.tables.TBook.T_BOOK.REC_TIMESTAMP; + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value1() { + return getId(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value2() { + return getAuthorId(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value3() { + return getCoAuthorId(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value4() { + return getDetailsId(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.String value5() { + return getTitle(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value6() { + return getPublishedIn(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value7() { + return getLanguageId(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.String value8() { + return getContentText(); + } + + /** + * {@inheritDoc} + */ + @Override + public byte[] value9() { + return getContentPdf(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.lang.Integer value10() { + return getRecVersion(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.sql.Timestamp value11() { + return getRecTimestamp(); + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached TBookRecord + */ + public TBookRecord() { + super(org.jooq.groovy.example.h2.tables.TBook.T_BOOK); + } + + /** + * Create a detached, initialised TBookRecord + */ + public TBookRecord(java.lang.Integer id, java.lang.Integer authorId, java.lang.Integer coAuthorId, java.lang.Integer detailsId, java.lang.String title, java.lang.Integer publishedIn, java.lang.Integer languageId, java.lang.String contentText, byte[] contentPdf, java.lang.Integer recVersion, java.sql.Timestamp recTimestamp) { + super(org.jooq.groovy.example.h2.tables.TBook.T_BOOK); + + setValue(0, id); + setValue(1, authorId); + setValue(2, coAuthorId); + setValue(3, detailsId); + setValue(4, title); + setValue(5, publishedIn); + setValue(6, languageId); + setValue(7, contentText); + setValue(8, contentPdf); + setValue(9, recVersion); + setValue(10, recTimestamp); + } +}