From 261745b88cd4c7cbb83c79404b36b0e146e19e95 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Tue, 29 Jul 2014 16:32:38 +0200 Subject: [PATCH] [#2486] Allow to specify precision, scale, length for type-rewrites in - Regenerated test database --- .../jooq/test/h2/generatedclasses/Public.java | 3 +- .../jooq/test/h2/generatedclasses/Tables.java | 5 + .../h2/generatedclasses/tables/T_2486.java | 103 +++++ .../tables/interfaces/IT_2486.java | 105 +++++ .../generatedclasses/tables/pojos/T_2486.java | 162 +++++++ .../tables/records/T_2486Record.java | 432 ++++++++++++++++++ 6 files changed, 809 insertions(+), 1 deletion(-) create mode 100644 jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/T_2486.java create mode 100644 jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/interfaces/IT_2486.java create mode 100644 jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/pojos/T_2486.java create mode 100644 jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/records/T_2486Record.java diff --git a/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/Public.java b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/Public.java index 7a05bfa055..ea02102a3c 100644 --- a/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/Public.java +++ b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/Public.java @@ -9,7 +9,7 @@ package org.jooq.test.h2.generatedclasses; @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Public extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = 149547916; + private static final long serialVersionUID = -616927962; /** * The singleton instance of PUBLIC @@ -56,6 +56,7 @@ public class Public extends org.jooq.impl.SchemaImpl { org.jooq.test.h2.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.h2.generatedclasses.tables.T_785.T_785, org.jooq.test.h2.generatedclasses.tables.T_877.T_877, + org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486, org.jooq.test.h2.generatedclasses.tables.T_2698.T_2698, org.jooq.test.h2.generatedclasses.tables.T_2718.T_2718, org.jooq.test.h2.generatedclasses.tables.TAuthor.T_AUTHOR, diff --git a/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/Tables.java b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/Tables.java index 8cc19e29a7..2963bcffff 100644 --- a/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/Tables.java +++ b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/Tables.java @@ -66,6 +66,11 @@ public class Tables { */ public static final org.jooq.test.h2.generatedclasses.tables.T_877 T_877 = org.jooq.test.h2.generatedclasses.tables.T_877.T_877; + /** + * The table PUBLIC.T_2486 + */ + public static final org.jooq.test.h2.generatedclasses.tables.T_2486 T_2486 = org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486; + /** * The table PUBLIC.T_2698 */ diff --git a/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/T_2486.java b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/T_2486.java new file mode 100644 index 0000000000..037b513458 --- /dev/null +++ b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/T_2486.java @@ -0,0 +1,103 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class T_2486 extends org.jooq.impl.TableImpl { + + private static final long serialVersionUID = -2058148667; + + /** + * The singleton instance of PUBLIC.T_2486 + */ + public static final org.jooq.test.h2.generatedclasses.tables.T_2486 T_2486 = new org.jooq.test.h2.generatedclasses.tables.T_2486(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.h2.generatedclasses.tables.records.T_2486Record.class; + } + + /** + * The column PUBLIC.T_2486.VAL1. + */ + public final org.jooq.TableField VAL1 = createField("VAL1", org.jooq.impl.SQLDataType.DECIMAL, this, ""); + + /** + * The column PUBLIC.T_2486.VAL2. + */ + public final org.jooq.TableField VAL2 = createField("VAL2", org.jooq.impl.SQLDataType.DECIMAL.precision(21, 4), this, ""); + + /** + * The column PUBLIC.T_2486.VAL3. + */ + public final org.jooq.TableField VAL3 = createField("VAL3", org.jooq.impl.SQLDataType.DECIMAL, this, ""); + + /** + * The column PUBLIC.T_2486.VAL4. + */ + public final org.jooq.TableField VAL4 = createField("VAL4", org.jooq.impl.SQLDataType.DECIMAL.precision(21, 4), this, ""); + + /** + * The column PUBLIC.T_2486.VAL5. + */ + public final org.jooq.TableField VAL5 = createField("VAL5", org.jooq.impl.SQLDataType.DECIMAL, this, ""); + + /** + * The column PUBLIC.T_2486.VAL6. + */ + public final org.jooq.TableField VAL6 = createField("VAL6", org.jooq.impl.SQLDataType.DECIMAL.precision(21, 4), this, ""); + + /** + * The column PUBLIC.T_2486.VAL7. + */ + public final org.jooq.TableField VAL7 = createField("VAL7", org.jooq.impl.SQLDataType.DECIMAL_INTEGER.precision(20), this, ""); + + /** + * The column PUBLIC.T_2486.VAL8. + */ + public final org.jooq.TableField VAL8 = createField("VAL8", org.jooq.impl.SQLDataType.DECIMAL_INTEGER.precision(20), this, ""); + + /** + * Create a PUBLIC.T_2486 table reference + */ + public T_2486() { + this("T_2486", null); + } + + /** + * Create an aliased PUBLIC.T_2486 table reference + */ + public T_2486(java.lang.String alias) { + this(alias, org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486); + } + + private T_2486(java.lang.String alias, org.jooq.Table aliased) { + this(alias, aliased, null); + } + + private T_2486(java.lang.String alias, org.jooq.Table aliased, org.jooq.Field[] parameters) { + super(alias, org.jooq.test.h2.generatedclasses.Public.PUBLIC, aliased, parameters, ""); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.test.h2.generatedclasses.tables.T_2486 as(java.lang.String alias) { + return new org.jooq.test.h2.generatedclasses.tables.T_2486(alias, this); + } + + /** + * Rename this table + */ + public org.jooq.test.h2.generatedclasses.tables.T_2486 rename(java.lang.String name) { + return new org.jooq.test.h2.generatedclasses.tables.T_2486(name, null); + } +} diff --git a/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/interfaces/IT_2486.java b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/interfaces/IT_2486.java new file mode 100644 index 0000000000..b44b90d817 --- /dev/null +++ b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/interfaces/IT_2486.java @@ -0,0 +1,105 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables.interfaces; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public interface IT_2486 extends java.io.Serializable { + + /** + * Setter for PUBLIC.T_2486.VAL1. + */ + public IT_2486 setVal1(java.math.BigDecimal value); + + /** + * Getter for PUBLIC.T_2486.VAL1. + */ + public java.math.BigDecimal getVal1(); + + /** + * Setter for PUBLIC.T_2486.VAL2. + */ + public IT_2486 setVal2(java.math.BigDecimal value); + + /** + * Getter for PUBLIC.T_2486.VAL2. + */ + public java.math.BigDecimal getVal2(); + + /** + * Setter for PUBLIC.T_2486.VAL3. + */ + public IT_2486 setVal3(java.math.BigDecimal value); + + /** + * Getter for PUBLIC.T_2486.VAL3. + */ + public java.math.BigDecimal getVal3(); + + /** + * Setter for PUBLIC.T_2486.VAL4. + */ + public IT_2486 setVal4(java.math.BigDecimal value); + + /** + * Getter for PUBLIC.T_2486.VAL4. + */ + public java.math.BigDecimal getVal4(); + + /** + * Setter for PUBLIC.T_2486.VAL5. + */ + public IT_2486 setVal5(java.math.BigDecimal value); + + /** + * Getter for PUBLIC.T_2486.VAL5. + */ + public java.math.BigDecimal getVal5(); + + /** + * Setter for PUBLIC.T_2486.VAL6. + */ + public IT_2486 setVal6(java.math.BigDecimal value); + + /** + * Getter for PUBLIC.T_2486.VAL6. + */ + public java.math.BigDecimal getVal6(); + + /** + * Setter for PUBLIC.T_2486.VAL7. + */ + public IT_2486 setVal7(java.math.BigInteger value); + + /** + * Getter for PUBLIC.T_2486.VAL7. + */ + public java.math.BigInteger getVal7(); + + /** + * Setter for PUBLIC.T_2486.VAL8. + */ + public IT_2486 setVal8(java.math.BigInteger value); + + /** + * Getter for PUBLIC.T_2486.VAL8. + */ + public java.math.BigInteger getVal8(); + + // ------------------------------------------------------------------------- + // FROM and INTO + // ------------------------------------------------------------------------- + + /** + * Load data from another generated Record/POJO implementing the common interface IT_2486 + */ + public void from(org.jooq.test.h2.generatedclasses.tables.interfaces.IT_2486 from); + + /** + * Copy data into another generated Record/POJO implementing the common interface IT_2486 + */ + public E into(E into); +} diff --git a/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/pojos/T_2486.java b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/pojos/T_2486.java new file mode 100644 index 0000000000..b685de9d55 --- /dev/null +++ b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/pojos/T_2486.java @@ -0,0 +1,162 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables.pojos; + +/** + * This is a POJO for table T_2486. + */ +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class T_2486 implements org.jooq.test.h2.generatedclasses.tables.interfaces.IT_2486 { + + private static final long serialVersionUID = 2055802023; + + private java.math.BigDecimal val1; + private java.math.BigDecimal val2; + private java.math.BigDecimal val3; + private java.math.BigDecimal val4; + private java.math.BigDecimal val5; + private java.math.BigDecimal val6; + private java.math.BigInteger val7; + private java.math.BigInteger val8; + + public T_2486() {} + + public T_2486( + java.math.BigDecimal val1, + java.math.BigDecimal val2, + java.math.BigDecimal val3, + java.math.BigDecimal val4, + java.math.BigDecimal val5, + java.math.BigDecimal val6, + java.math.BigInteger val7, + java.math.BigInteger val8 + ) { + this.val1 = val1; + this.val2 = val2; + this.val3 = val3; + this.val4 = val4; + this.val5 = val5; + this.val6 = val6; + this.val7 = val7; + this.val8 = val8; + } + + @Override + public java.math.BigDecimal getVal1() { + return this.val1; + } + + @Override + public T_2486 setVal1(java.math.BigDecimal val1) { + this.val1 = val1; + return this; + } + + @Override + public java.math.BigDecimal getVal2() { + return this.val2; + } + + @Override + public T_2486 setVal2(java.math.BigDecimal val2) { + this.val2 = val2; + return this; + } + + @Override + public java.math.BigDecimal getVal3() { + return this.val3; + } + + @Override + public T_2486 setVal3(java.math.BigDecimal val3) { + this.val3 = val3; + return this; + } + + @Override + public java.math.BigDecimal getVal4() { + return this.val4; + } + + @Override + public T_2486 setVal4(java.math.BigDecimal val4) { + this.val4 = val4; + return this; + } + + @Override + public java.math.BigDecimal getVal5() { + return this.val5; + } + + @Override + public T_2486 setVal5(java.math.BigDecimal val5) { + this.val5 = val5; + return this; + } + + @Override + public java.math.BigDecimal getVal6() { + return this.val6; + } + + @Override + public T_2486 setVal6(java.math.BigDecimal val6) { + this.val6 = val6; + return this; + } + + @Override + public java.math.BigInteger getVal7() { + return this.val7; + } + + @Override + public T_2486 setVal7(java.math.BigInteger val7) { + this.val7 = val7; + return this; + } + + @Override + public java.math.BigInteger getVal8() { + return this.val8; + } + + @Override + public T_2486 setVal8(java.math.BigInteger val8) { + this.val8 = val8; + return this; + } + + // ------------------------------------------------------------------------- + // FROM and INTO + // ------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public void from(org.jooq.test.h2.generatedclasses.tables.interfaces.IT_2486 from) { + setVal1(from.getVal1()); + setVal2(from.getVal2()); + setVal3(from.getVal3()); + setVal4(from.getVal4()); + setVal5(from.getVal5()); + setVal6(from.getVal6()); + setVal7(from.getVal7()); + setVal8(from.getVal8()); + } + + /** + * {@inheritDoc} + */ + @Override + public E into(E into) { + into.from(this); + return into; + } + + // Here, a toString() method could be generated +} diff --git a/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/records/T_2486Record.java b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/records/T_2486Record.java new file mode 100644 index 0000000000..6f0527dcf9 --- /dev/null +++ b/jOOQ-test/src/test/java/org/jooq/test/h2/generatedclasses/tables/records/T_2486Record.java @@ -0,0 +1,432 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class T_2486Record extends org.jooq.impl.TableRecordImpl implements org.jooq.Record8, org.jooq.test.h2.generatedclasses.tables.interfaces.IT_2486 { + + private static final long serialVersionUID = -608718121; + + /** + * Setter for PUBLIC.T_2486.VAL1. + */ + @Override + public T_2486Record setVal1(java.math.BigDecimal value) { + setValue(0, value); + return this; + } + + /** + * Getter for PUBLIC.T_2486.VAL1. + */ + @Override + public java.math.BigDecimal getVal1() { + return (java.math.BigDecimal) getValue(0); + } + + /** + * Setter for PUBLIC.T_2486.VAL2. + */ + @Override + public T_2486Record setVal2(java.math.BigDecimal value) { + setValue(1, value); + return this; + } + + /** + * Getter for PUBLIC.T_2486.VAL2. + */ + @Override + public java.math.BigDecimal getVal2() { + return (java.math.BigDecimal) getValue(1); + } + + /** + * Setter for PUBLIC.T_2486.VAL3. + */ + @Override + public T_2486Record setVal3(java.math.BigDecimal value) { + setValue(2, value); + return this; + } + + /** + * Getter for PUBLIC.T_2486.VAL3. + */ + @Override + public java.math.BigDecimal getVal3() { + return (java.math.BigDecimal) getValue(2); + } + + /** + * Setter for PUBLIC.T_2486.VAL4. + */ + @Override + public T_2486Record setVal4(java.math.BigDecimal value) { + setValue(3, value); + return this; + } + + /** + * Getter for PUBLIC.T_2486.VAL4. + */ + @Override + public java.math.BigDecimal getVal4() { + return (java.math.BigDecimal) getValue(3); + } + + /** + * Setter for PUBLIC.T_2486.VAL5. + */ + @Override + public T_2486Record setVal5(java.math.BigDecimal value) { + setValue(4, value); + return this; + } + + /** + * Getter for PUBLIC.T_2486.VAL5. + */ + @Override + public java.math.BigDecimal getVal5() { + return (java.math.BigDecimal) getValue(4); + } + + /** + * Setter for PUBLIC.T_2486.VAL6. + */ + @Override + public T_2486Record setVal6(java.math.BigDecimal value) { + setValue(5, value); + return this; + } + + /** + * Getter for PUBLIC.T_2486.VAL6. + */ + @Override + public java.math.BigDecimal getVal6() { + return (java.math.BigDecimal) getValue(5); + } + + /** + * Setter for PUBLIC.T_2486.VAL7. + */ + @Override + public T_2486Record setVal7(java.math.BigInteger value) { + setValue(6, value); + return this; + } + + /** + * Getter for PUBLIC.T_2486.VAL7. + */ + @Override + public java.math.BigInteger getVal7() { + return (java.math.BigInteger) getValue(6); + } + + /** + * Setter for PUBLIC.T_2486.VAL8. + */ + @Override + public T_2486Record setVal8(java.math.BigInteger value) { + setValue(7, value); + return this; + } + + /** + * Getter for PUBLIC.T_2486.VAL8. + */ + @Override + public java.math.BigInteger getVal8() { + return (java.math.BigInteger) getValue(7); + } + + // ------------------------------------------------------------------------- + // Record8 type implementation + // ------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Row8 fieldsRow() { + return (org.jooq.Row8) super.fieldsRow(); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Row8 valuesRow() { + return (org.jooq.Row8) super.valuesRow(); + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field1() { + return org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486.VAL1; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field2() { + return org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486.VAL2; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field3() { + return org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486.VAL3; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field4() { + return org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486.VAL4; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field5() { + return org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486.VAL5; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field6() { + return org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486.VAL6; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field7() { + return org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486.VAL7; + } + + /** + * {@inheritDoc} + */ + @Override + public org.jooq.Field field8() { + return org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486.VAL8; + } + + /** + * {@inheritDoc} + */ + @Override + public java.math.BigDecimal value1() { + return getVal1(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.math.BigDecimal value2() { + return getVal2(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.math.BigDecimal value3() { + return getVal3(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.math.BigDecimal value4() { + return getVal4(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.math.BigDecimal value5() { + return getVal5(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.math.BigDecimal value6() { + return getVal6(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.math.BigInteger value7() { + return getVal7(); + } + + /** + * {@inheritDoc} + */ + @Override + public java.math.BigInteger value8() { + return getVal8(); + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record value1(java.math.BigDecimal value) { + setVal1(value); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record value2(java.math.BigDecimal value) { + setVal2(value); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record value3(java.math.BigDecimal value) { + setVal3(value); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record value4(java.math.BigDecimal value) { + setVal4(value); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record value5(java.math.BigDecimal value) { + setVal5(value); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record value6(java.math.BigDecimal value) { + setVal6(value); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record value7(java.math.BigInteger value) { + setVal7(value); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record value8(java.math.BigInteger value) { + setVal8(value); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public T_2486Record values(java.math.BigDecimal value1, java.math.BigDecimal value2, java.math.BigDecimal value3, java.math.BigDecimal value4, java.math.BigDecimal value5, java.math.BigDecimal value6, java.math.BigInteger value7, java.math.BigInteger value8) { + return this; + } + + // ------------------------------------------------------------------------- + // FROM and INTO + // ------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public void from(org.jooq.test.h2.generatedclasses.tables.interfaces.IT_2486 from) { + setVal1(from.getVal1()); + setVal2(from.getVal2()); + setVal3(from.getVal3()); + setVal4(from.getVal4()); + setVal5(from.getVal5()); + setVal6(from.getVal6()); + setVal7(from.getVal7()); + setVal8(from.getVal8()); + } + + /** + * {@inheritDoc} + */ + @Override + public E into(E into) { + into.from(this); + return into; + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached T_2486Record + */ + public T_2486Record() { + super(org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486); + } + + /** + * Create a detached, initialised T_2486Record + */ + public T_2486Record(java.math.BigDecimal val1, java.math.BigDecimal val2, java.math.BigDecimal val3, java.math.BigDecimal val4, java.math.BigDecimal val5, java.math.BigDecimal val6, java.math.BigInteger val7, java.math.BigInteger val8) { + super(org.jooq.test.h2.generatedclasses.tables.T_2486.T_2486); + + setValue(0, val1); + setValue(1, val2); + setValue(2, val3); + setValue(3, val4); + setValue(4, val5); + setValue(5, val6); + setValue(6, val7); + setValue(7, val8); + } +}