diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGenerator.java b/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGenerator.java index 835975de43..853acecc6d 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGenerator.java +++ b/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGenerator.java @@ -58,10 +58,7 @@ import org.jooq.EnumType; import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Identity; -import org.jooq.MasterDataType; import org.jooq.Parameter; -import org.jooq.Record; -import org.jooq.Result; import org.jooq.Select; import org.jooq.Sequence; import org.jooq.Table; @@ -106,7 +103,6 @@ import org.jooq.util.GeneratorStrategy.Mode; * * @author Lukas Eder */ -@SuppressWarnings("deprecation") public class DefaultGenerator extends AbstractGenerator { private static final JooqLogger log = JooqLogger.getLogger(DefaultGenerator.class); @@ -198,10 +194,6 @@ public class DefaultGenerator extends AbstractGenerator { generateSequences(schema, targetSchemaDir); } - if (database.getMasterDataTables(schema).size() > 0) { - generateMasterTables(schema); - } - if (database.getTables(schema).size() > 0) { generateTables(schema); } @@ -351,12 +343,6 @@ public class DefaultGenerator extends AbstractGenerator { List foreignKeys = table.getForeignKeys(); for (ForeignKeyDefinition foreignKey : foreignKeys) { - - // Skip master data foreign keys - if (foreignKey.getReferencedTable() instanceof MasterDataTableDefinition) { - continue; - } - out.print("\tpublic static final "); out.print(ForeignKey.class); out.print("<"); @@ -1701,13 +1687,6 @@ public class DefaultGenerator extends AbstractGenerator { String separator = ""; for (ForeignKeyDefinition foreignKey : foreignKeys) { - TableDefinition referencedTable = foreignKey.getReferencedTable(); - - // Skip master data foreign keys - if (referencedTable instanceof MasterDataTableDefinition) { - continue; - } - out.print(separator); out.print(strategy.getFullJavaIdentifier(foreignKey)); @@ -1799,131 +1778,6 @@ public class DefaultGenerator extends AbstractGenerator { out.close(); } - protected void generateMasterTables(SchemaDefinition schema) { - log.info("Generating master data"); - - for (MasterDataTableDefinition table : database.getMasterDataTables(schema)) { - try { - generateMasterTable(table); - } catch (Exception e) { - log.error("Exception while generating master data table " + table, e); - } - } - - watch.splitInfo("Master data generated"); - } - - protected void generateMasterTable(MasterDataTableDefinition table) { - log.info("Generating table", strategy.getFileName(table)); - - GenerationWriter out = new GenerationWriter(strategy.getFile(table)); - printHeader(out, table); - printClassJavadoc(out, table); - - ColumnDefinition pk = table.getPrimaryKeyColumn(); - ColumnDefinition l = table.getLiteralColumn(); - ColumnDefinition d = table.getDescriptionColumn(); - - Result data = table.getData(); - - out.print("public enum "); - out.print(strategy.getJavaClassName(table)); - printImplements(out, table, Mode.ENUM, - MasterDataType.class.getName() + "<" + getJavaType(pk.getType()) + ">"); - out.println(" {"); - - Set columns = - new LinkedHashSet(Arrays.asList(pk, l, d)); - - - for (Record record : data) { - String literal = record.getValueAsString(l.getName()); - String description = record.getValueAsString(d.getName()); - - if (!StringUtils.isEmpty(description)) { - out.println(); - out.println("\t/**"); - out.println("\t * " + description); - out.println("\t */"); - } - - out.print("\t"); - out.print(GenerationUtil.convertToJavaIdentifier(literal)); - out.print("("); - - String separator = ""; - for (ColumnDefinition column : columns) { - out.print(separator); - out.printNewJavaObject(getJavaType(column.getType()), record.getValue(column.getName())); - - separator = ", "; - } - - out.println("),"); - } - - out.println("\t;"); - out.println(); - - // Fields - for (ColumnDefinition column : columns) { - out.print("\tprivate final "); - out.print(getJavaType(column.getType())); - out.print(" "); - out.println(strategy.getJavaMemberName(column) + ";"); - } - - // Constructor - out.println(); - out.print("\tprivate " + strategy.getJavaClassName(table) + "("); - - String separator = ""; - for (ColumnDefinition column : columns) { - out.print(separator); - out.print(getJavaType(column.getType())); - out.print(" "); - out.print(strategy.getJavaMemberName(column)); - - separator = ", "; - } - - out.println(") {"); - for (ColumnDefinition column : columns) { - out.print("\t\tthis."); - out.print(strategy.getJavaMemberName(column)); - out.print(" = "); - out.print(strategy.getJavaMemberName(column)); - out.println(";"); - } - out.println("\t}"); - - // Implementation methods - out.println(); - printOverride(out); - out.print("\tpublic "); - out.print(getJavaType(pk.getType())); - out.println(" getPrimaryKey() {"); - out.println("\t\treturn " + strategy.getJavaMemberName(pk) + ";"); - out.println("\t}"); - - // Getters - for (ColumnDefinition column : columns) { - printFieldJavaDoc(out, column); - out.print("\tpublic final "); - out.print(getJavaType(column.getType())); - out.print(" "); - out.print(strategy.getJavaGetterName(column, Mode.DEFAULT)); - out.println("() {"); - out.print("\t\treturn "); - out.print(strategy.getJavaMemberName(column)); - out.println(";"); - out.println("\t}"); - } - - out.println("}"); - out.close(); - } - protected void generateSequences(SchemaDefinition schema, File targetSchemaDir) { log.info("Generating sequences"); @@ -2870,10 +2724,6 @@ public class DefaultGenerator extends AbstractGenerator { // Do not generate referential code for master data tables TableDefinition referenced = foreignKey.getReferencedTable(); - if (referenced instanceof MasterDataTableDefinition) { - return; - } - printFetchMethod(out, column, foreignKey, referenced); } @@ -3401,42 +3251,24 @@ public class DefaultGenerator extends AbstractGenerator { } protected String getJavaTypeReference(Database db, DataTypeDefinition type) { - if (type instanceof MasterDataTypeDefinition) { - StringBuilder sb = new StringBuilder(); - - sb.append(getJavaTypeReference(db, ((MasterDataTypeDefinition) type).underlying)); - sb.append(".asMasterDataType("); - sb.append(getJavaType(type)); - sb.append(".class)"); - - return sb.toString(); + if (database.isArrayType(type.getType())) { + String baseType = GenerationUtil.getArrayBaseType(db.getDialect(), type.getType(), type.getUserType()); + return getTypeReference(db, type.getSchema(), baseType, 0, 0, baseType) + ".getArrayDataType()"; } - else { - if (database.isArrayType(type.getType())) { - String baseType = GenerationUtil.getArrayBaseType(db.getDialect(), type.getType(), type.getUserType()); - return getTypeReference(db, type.getSchema(), baseType, 0, 0, baseType) + ".getArrayDataType()"; - } - else { - return getTypeReference(db, type.getSchema(), type.getType(), type.getPrecision(), type.getScale(), type.getUserType()); - } + return getTypeReference(db, type.getSchema(), type.getType(), type.getPrecision(), type.getScale(), type.getUserType()); } } protected String getJavaType(DataTypeDefinition type) { - if (type instanceof MasterDataTypeDefinition) { - return strategy.getFullJavaClassName(((MasterDataTypeDefinition) type).table); - } - else { - return getType( - type.getDatabase(), - type.getSchema(), - type.getType(), - type.getPrecision(), - type.getScale(), - type.getUserType(), - Object.class.getName()); - } + return getType( + type.getDatabase(), + type.getSchema(), + type.getType(), + type.getPrecision(), + type.getScale(), + type.getUserType(), + Object.class.getName()); } protected String getType(Database db, SchemaDefinition schema, String t, int p, int s, String u, String defaultType) { diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGeneratorStrategy.java b/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGeneratorStrategy.java index 008b4218c7..c434d8aaa6 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGeneratorStrategy.java +++ b/jOOQ-codegen/src/main/java/org/jooq/util/DefaultGeneratorStrategy.java @@ -216,12 +216,8 @@ public class DefaultGeneratorStrategy extends AbstractGeneratorStrategy { return result.toString(); } - @SuppressWarnings("deprecation") private final String getSubPackage(Definition definition) { - if (definition instanceof MasterDataTableDefinition) { - return "enums"; - } - else if (definition instanceof TableDefinition) { + if (definition instanceof TableDefinition) { return "tables"; } diff --git a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java index a80c966d2b..df5b8394ca 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java +++ b/jOOQ-codegen/src/main/java/org/jooq/util/GenerationTool.java @@ -59,7 +59,6 @@ import org.jooq.util.jaxb.EnumType; import org.jooq.util.jaxb.ForcedType; import org.jooq.util.jaxb.Generate; import org.jooq.util.jaxb.Jdbc; -import org.jooq.util.jaxb.MasterDataTable; import org.jooq.util.jaxb.Property; import org.jooq.util.jaxb.Schema; import org.jooq.util.jaxb.Strategy; @@ -114,11 +113,11 @@ public class GenerationTool { // TODO [#1201] Add better error handling here xml = xml.replaceAll( "<(\\w+:)?configuration xmlns(:\\w+)?=\"http://www.jooq.org/xsd/jooq-codegen-\\d+\\.\\d+\\.\\d+.xsd\">", - "<$1configuration xmlns$2=\"http://www.jooq.org/xsd/jooq-codegen-2.5.0.xsd\">"); + "<$1configuration xmlns$2=\"http://www.jooq.org/xsd/jooq-codegen-3.0.0.xsd\">"); xml = xml.replace( "", - ""); + ""); main(JAXB.unmarshal(new StringReader(xml), Configuration.class)); } @@ -149,19 +148,6 @@ public class GenerationTool { Strategy strategy = new Strategy(); strategy.setName(properties.containsKey("generator.strategy") ? properties.getProperty("generator.strategy") : null); - List masterDataTables = new ArrayList(); - for (String name : defaultString(properties.getProperty("generator.generate.master-data-tables")).split(",")) { - if (isBlank(name)) continue; - - MasterDataTable table = new MasterDataTable(); - - table.setName(name); - table.setLiteral(properties.getProperty("generator.generate.master-data-table-literal." + name)); - table.setDescription(properties.getProperty("generator.generate.master-data-table-description." + name)); - - masterDataTables.add(table); - } - List enumTypes = new ArrayList(); for (String property : properties.stringPropertyNames()) { if (property.startsWith("generator.database.enum-type.")) { @@ -196,9 +182,6 @@ public class GenerationTool { database.setOutputSchema(properties.containsKey("generator.database.output-schema") ? properties.getProperty("generator.database.output-schema") : null); // Avoid creating these empty elements when migrating - if (!masterDataTables.isEmpty()) - database.getMasterDataTables().addAll(masterDataTables); - if (!enumTypes.isEmpty()) database.getEnumTypes().addAll(enumTypes); @@ -344,7 +327,6 @@ public class GenerationTool { database.setExcludes(defaultString(g.getDatabase().getExcludes()).split(",")); database.setRecordVersionFields(defaultString(g.getDatabase().getRecordVersionFields()).split(",")); database.setRecordTimestampFields(defaultString(g.getDatabase().getRecordTimestampFields()).split(",")); - database.setConfiguredMasterDataTables(g.getDatabase().getMasterDataTables()); database.setConfiguredCustomTypes(g.getDatabase().getCustomTypes()); database.setConfiguredEnumTypes(g.getDatabase().getEnumTypes()); database.setConfiguredForcedTypes(g.getDatabase().getForcedTypes()); diff --git a/jOOQ-meta/pom.xml b/jOOQ-meta/pom.xml index a2b6e55753..a993721808 100644 --- a/jOOQ-meta/pom.xml +++ b/jOOQ-meta/pom.xml @@ -33,7 +33,7 @@ src/main/resources/xsd src/main/resources/xjb - jooq-codegen-2.5.0.xsd + jooq-codegen-3.0.0.xsd org.jooq.util.jaxb diff --git a/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java b/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java index 00b764cb8f..2094066a21 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/AbstractDatabase.java @@ -54,7 +54,6 @@ import org.jooq.tools.csv.CSVReader; import org.jooq.util.jaxb.CustomType; import org.jooq.util.jaxb.EnumType; import org.jooq.util.jaxb.ForcedType; -import org.jooq.util.jaxb.MasterDataTable; import org.jooq.util.jaxb.Schema; import org.jooq.util.oracle.OracleDatabase; @@ -81,7 +80,6 @@ public abstract class AbstractDatabase implements Database { private boolean supportsUnsignedTypes; private boolean dateAsTimestamp; private List configuredSchemata; - private List configuredMasterDataTables; private List configuredCustomTypes; private List configuredEnumTypes; private List configuredForcedTypes; @@ -94,8 +92,6 @@ public abstract class AbstractDatabase implements Database { private List schemata; private List sequences; private List tables; - @SuppressWarnings("deprecation") - private List masterDataTables; private List enums; private List udts; private List arrays; @@ -262,16 +258,6 @@ public abstract class AbstractDatabase implements Database { return recordTimestampFields; } - @Override - public final void setConfiguredMasterDataTables(List configuredMasterDataTables) { - this.configuredMasterDataTables = configuredMasterDataTables; - } - - @Override - public final List getConfiguredMasterDataTables() { - return configuredMasterDataTables; - } - @Override public final void setConfiguredEnumTypes(List configuredEnumTypes) { this.configuredEnumTypes = configuredEnumTypes; @@ -357,7 +343,7 @@ public abstract class AbstractDatabase implements Database { tables = new ArrayList(); try { - List t = filterMasterDataTables(getTables0(), false); + List t = getTables0(); tables = filterExcludeInclude(t); log.info("Tables fetched", fetchedSize(t, tables)); @@ -376,45 +362,7 @@ public abstract class AbstractDatabase implements Database { @Override public final TableDefinition getTable(SchemaDefinition schema, String name, boolean ignoreCase) { - TableDefinition result = null; - - result = getDefinition(getTables(schema), name, ignoreCase); - if (result == null) { - result = getDefinition(getMasterDataTables(schema), name, ignoreCase); - } - - return result; - } - - @SuppressWarnings("deprecation") - @Override - public final List getMasterDataTables(SchemaDefinition schema) { - if (masterDataTables == null) { - masterDataTables = new ArrayList(); - - try { - List t = filterMasterDataTables(getTables0(), true); - masterDataTables = filterExcludeInclude(t); - - log.info("Masterdata tables fetched", fetchedSize(t, masterDataTables)); - } catch (Exception e) { - log.error("Exception while fetching master data tables", e); - } - } - - return filterSchema(masterDataTables, schema); - } - - @SuppressWarnings("deprecation") - @Override - public final MasterDataTableDefinition getMasterDataTable(SchemaDefinition schema, String name) { - return getMasterDataTable(schema, name, false); - } - - @SuppressWarnings("deprecation") - @Override - public final MasterDataTableDefinition getMasterDataTable(SchemaDefinition schema, String name, boolean ignoreCase) { - return getDefinition(getMasterDataTables(schema), name, ignoreCase); + return getDefinition(getTables(schema), name, ignoreCase); } @Override @@ -641,36 +589,6 @@ public abstract class AbstractDatabase implements Database { return result; } - @SuppressWarnings({ "unchecked", "deprecation" }) - private final List filterMasterDataTables(List list, boolean include) { - List result = new ArrayList(); - - definitionLoop: for (TableDefinition definition : list) { - for (MasterDataTable table : configuredMasterDataTables) { - if (definition.getName().equals(table.getName())) { - - // If we have a match, then add the table only if master - // data tables are included in the result - if (include) { - log.info("DEPRECATION", "Master data tables have been deprecated in jOOQ 2.5.0 and will be removed in jOOQ 3.0. Do not reuse this feature"); - result.add((T) new DefaultMasterDataTableDefinition(definition)); - } - - continue definitionLoop; - } - - } - - // If we don't have any match, then add the table only if - // master data tables are excluded in the result - if (!include) { - result.add((T) definition); - } - } - - return result; - } - /** * Retrieve ALL relations from the database. */ diff --git a/jOOQ-meta/src/main/java/org/jooq/util/Database.java b/jOOQ-meta/src/main/java/org/jooq/util/Database.java index 744dae8020..a8d5375191 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/Database.java @@ -44,7 +44,6 @@ import org.jooq.impl.Factory; import org.jooq.util.jaxb.CustomType; import org.jooq.util.jaxb.EnumType; import org.jooq.util.jaxb.ForcedType; -import org.jooq.util.jaxb.MasterDataTable; import org.jooq.util.jaxb.Schema; /** @@ -89,25 +88,6 @@ public interface Database { */ TableDefinition getTable(SchemaDefinition schema, String name, boolean ignoreCase); - /** - * The master data tables contained in this database (for schema - * {@link #getSchema(String)}) - */ - @SuppressWarnings("deprecation") - List getMasterDataTables(SchemaDefinition schema); - - /** - * Get a master data table in this database by name - */ - @SuppressWarnings("deprecation") - MasterDataTableDefinition getMasterDataTable(SchemaDefinition schema, String name); - - /** - * Get a master data table in this database by name - */ - @SuppressWarnings("deprecation") - MasterDataTableDefinition getMasterDataTable(SchemaDefinition schema, String name, boolean ignoreCase); - /** * The enum UDTs defined in this database */ @@ -239,18 +219,6 @@ public interface Database { */ String[] getRecordTimestampFields(); - /** - * Database objects matching any of these table names will be generated as - * master data tables. - */ - void setConfiguredMasterDataTables(List tables); - - /** - * Database objects matching any of these table names will be generated as - * master data tables. - */ - List getConfiguredMasterDataTables(); - /** * Database objects matching any of these field names will be generated as * custom types diff --git a/jOOQ-meta/src/main/java/org/jooq/util/DefaultColumnDefinition.java b/jOOQ-meta/src/main/java/org/jooq/util/DefaultColumnDefinition.java index ff7011f988..ff17e883c9 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/DefaultColumnDefinition.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/DefaultColumnDefinition.java @@ -48,33 +48,21 @@ public class DefaultColumnDefinition implements ColumnDefinition { private final int position; - private final DataTypeDefinition underlying; private final boolean isIdentity; private final boolean nullable; - private DataTypeDefinition type; private boolean primaryKeyLoaded; private UniqueKeyDefinition primaryKey; private List uniqueKeys; private boolean foreignKeyLoaded; private ForeignKeyDefinition foreignKey; - /** - * @deprecated - 2.1.0 - Use the other constructor instead - */ - @Deprecated - public DefaultColumnDefinition(TableDefinition table, String name, int position, DataTypeDefinition type, - boolean isIdentity, String comment) { - this(table, name, position, type, true, isIdentity, comment); - } - public DefaultColumnDefinition(TableDefinition table, String name, int position, DataTypeDefinition type, boolean nullable, boolean isIdentity, String comment) { super(table, name, position, type, comment); this.position = position; - this.underlying = type; this.isIdentity = isIdentity; this.nullable = nullable; } @@ -84,32 +72,6 @@ public class DefaultColumnDefinition return position; } - @SuppressWarnings("deprecation") - @Override - public final DataTypeDefinition getType() { - - // Lazy initialise - if (type == null) { - ForeignKeyDefinition fk = getDatabase().getRelations().getForeignKey(this); - - // If this is a foreign key to a master data type - if (fk != null) { - TableDefinition referencedTable = fk.getReferencedTable(); - - if (referencedTable instanceof MasterDataTableDefinition) { - type = new MasterDataTypeDefinition(referencedTable, underlying); - } - } - - // Else... - if (type == null) { - type = super.getType(); - } - } - - return type; - } - @Override public final UniqueKeyDefinition getPrimaryKey() { if (!primaryKeyLoaded) { diff --git a/jOOQ-meta/src/main/java/org/jooq/util/DefaultMasterDataTableDefinition.java b/jOOQ-meta/src/main/java/org/jooq/util/DefaultMasterDataTableDefinition.java deleted file mode 100644 index ff190fcc0c..0000000000 --- a/jOOQ-meta/src/main/java/org/jooq/util/DefaultMasterDataTableDefinition.java +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com - * All rights reserved. - * - * This software is licensed to you under the Apache License, Version 2.0 - * (the "License"); You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name "jOOQ" nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.jooq.util; - -import static org.jooq.impl.Factory.field; - -import java.util.Arrays; -import java.util.List; - -import org.jooq.Record; -import org.jooq.Result; -import org.jooq.Table; -import org.jooq.exception.DataAccessException; -import org.jooq.tools.JooqLogger; -import org.jooq.util.jaxb.MasterDataTable; - -/** - * A default definition for a master data table - * - * @author Lukas Eder - * @deprecated - 2.5.0 [#1741] - This feature will be removed as of jOOQ 3.0 - */ -@Deprecated -public class DefaultMasterDataTableDefinition extends AbstractDefinition implements MasterDataTableDefinition { - - private static final JooqLogger log = JooqLogger.getLogger(DefaultMasterDataTableDefinition.class); - - private final TableDefinition delegate; - private Result data; - private boolean dataFetched; - - public DefaultMasterDataTableDefinition(TableDefinition delegate) { - super(delegate.getDatabase(), delegate.getSchema(), delegate.getName(), delegate.getComment()); - - this.delegate = delegate; - } - - @Override - public List getDefinitionPath() { - return Arrays.asList(getSchema(), this); - } - - @Override - public ColumnDefinition getPrimaryKeyColumn() { - for (ColumnDefinition column : getColumns()) { - if (getDatabase().getRelations().getPrimaryKey(column) != null) { - return column; - } - } - - return null; - } - - @Override - public ColumnDefinition getLiteralColumn() { - String columnName = getConfiguredMasterDataTable().getLiteral(); - - if (columnName == null) { - columnName = getPrimaryKeyColumn().getName(); - } - - return getColumn(columnName); - } - - @Override - public ColumnDefinition getDescriptionColumn() { - String columnName = getConfiguredMasterDataTable().getDescription(); - - if (columnName == null) { - columnName = getLiteralColumn().getName(); - } - - return getColumn(columnName); - } - - private final MasterDataTable getConfiguredMasterDataTable() { - for (MasterDataTable table : getDatabase().getConfiguredMasterDataTables()) { - if (table.getName().equals(getName())) { - return table; - } - } - - return null; - } - - @Override - public Result getData() { - if (!dataFetched) { - dataFetched = true; - - try { - data = create().select() - .from(delegate.getTable()) - .orderBy(field(getPrimaryKeyColumn().getName())) - .fetch(); - } - catch (DataAccessException e) { - log.error("Error while initialising master data", e); - } - } - - return data; - } - - @Override - public UniqueKeyDefinition getMainUniqueKey() { - return delegate.getMainUniqueKey(); - } - - @Override - public List getUniqueKeys() { - return delegate.getUniqueKeys(); - } - - @Override - public List getForeignKeys() { - return delegate.getForeignKeys(); - } - - @Override - public IdentityDefinition getIdentity() { - return delegate.getIdentity(); - } - - @Override - public List getColumns() { - return delegate.getColumns(); - } - - @Override - public ColumnDefinition getColumn(String columnName) { - return delegate.getColumn(columnName); - } - - @Override - public ColumnDefinition getColumn(String columnName, boolean ignoreCase) { - return delegate.getColumn(columnName, ignoreCase); - } - - @Override - public ColumnDefinition getColumn(int columnIndex) { - return delegate.getColumn(columnIndex); - } - - @Override - public Table getTable() { - return delegate.getTable(); - } -} diff --git a/jOOQ-meta/src/main/java/org/jooq/util/MasterDataTableDefinition.java b/jOOQ-meta/src/main/java/org/jooq/util/MasterDataTableDefinition.java deleted file mode 100644 index 5919e8a80c..0000000000 --- a/jOOQ-meta/src/main/java/org/jooq/util/MasterDataTableDefinition.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com - * All rights reserved. - * - * This software is licensed to you under the Apache License, Version 2.0 - * (the "License"); You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name "jOOQ" nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.jooq.util; - -import org.jooq.Record; -import org.jooq.Result; - -/** - * A definition for a master data table - * - * @author Lukas Eder - * @deprecated - 2.5.0 [#1741] - This feature will be removed as of jOOQ 3.0 - */ -@Deprecated -public interface MasterDataTableDefinition extends TableDefinition { - - /** - * The primary key for this master data table. This will not be - * null. - */ - ColumnDefinition getPrimaryKeyColumn(); - - /** - * The column used for generating literals in the generated class. This may - * be null. - */ - ColumnDefinition getLiteralColumn(); - - /** - * The column used for generating a description (Javadoc) in the generated - * class. This may be null. - */ - ColumnDefinition getDescriptionColumn(); - - /** - * The data contained in the master table - */ - Result getData(); -} diff --git a/jOOQ-meta/src/main/java/org/jooq/util/MasterDataTypeDefinition.java b/jOOQ-meta/src/main/java/org/jooq/util/MasterDataTypeDefinition.java deleted file mode 100644 index ef090a67c5..0000000000 --- a/jOOQ-meta/src/main/java/org/jooq/util/MasterDataTypeDefinition.java +++ /dev/null @@ -1,98 +0,0 @@ -/** - * Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com - * All rights reserved. - * - * This software is licensed to you under the Apache License, Version 2.0 - * (the "License"); You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * . Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * - * . Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * . Neither the name "jOOQ" nor the names of its contributors may be - * used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ -package org.jooq.util; - - -/** - * @author Lukas Eder - * @deprecated - 2.5.0 [#1741] - This feature will be removed as of jOOQ 3.0 - */ -@Deprecated -public class MasterDataTypeDefinition implements DataTypeDefinition { - - final TableDefinition table; - final DataTypeDefinition underlying; - - public MasterDataTypeDefinition(TableDefinition table, DataTypeDefinition underlying) { - this.table = table; - this.underlying = underlying; - } - - @Override - public final String getType() { - return underlying.getType(); - } - - @Override - public final int getLength() { - return underlying.getLength(); - } - - @Override - public final int getPrecision() { - return underlying.getPrecision(); - } - - @Override - public final int getScale() { - return underlying.getScale(); - } - - @Override - public final String getUserType() { - return underlying.getUserType(); - } - - @Override - public final boolean isGenericNumberType() { - return underlying.isGenericNumberType(); - } - - @Override - public final boolean isUDT() { - return false; - } - - @Override - public final Database getDatabase() { - return underlying.getDatabase(); - } - - @Override - public final SchemaDefinition getSchema() { - return underlying.getSchema(); - } -} diff --git a/jOOQ-meta/src/main/resources/xjb/binding.xjb b/jOOQ-meta/src/main/resources/xjb/binding.xjb index 4c4d069223..e3f5acb475 100644 --- a/jOOQ-meta/src/main/resources/xjb/binding.xjb +++ b/jOOQ-meta/src/main/resources/xjb/binding.xjb @@ -11,12 +11,12 @@ - + - + diff --git a/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.0.0.xsd b/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.0.0.xsd new file mode 100644 index 0000000000..cb9fa9a301 --- /dev/null +++ b/jOOQ-meta/src/main/resources/xsd/jooq-codegen-3.0.0.xsd @@ -0,0 +1,375 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/IvanD/h2/library.properties b/jOOQ-test/configuration/org/jooq/configuration/IvanD/h2/library.properties index 3de66d6bdf..7176eb462f 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/IvanD/h2/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/IvanD/h2/library.properties @@ -36,13 +36,5 @@ generator.generate.relations=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.h2.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/IvanD/h2/library.xml b/jOOQ-test/configuration/org/jooq/configuration/IvanD/h2/library.xml index ab854ac34f..b4fb72e1b1 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/IvanD/h2/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/IvanD/h2/library.xml @@ -17,34 +17,6 @@ false true PUBLIC - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/espen/db2/library.properties b/jOOQ-test/configuration/org/jooq/configuration/espen/db2/library.properties index 202993642b..449c71b255 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/espen/db2/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/espen/db2/library.properties @@ -36,13 +36,5 @@ generator.generate.relations=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.db2.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/espen/db2/library.xml b/jOOQ-test/configuration/org/jooq/configuration/espen/db2/library.xml index 4963722438..64e3591bbf 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/espen/db2/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/espen/db2/library.xml @@ -15,34 +15,6 @@ T_BOOK_DETAILS false true - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/espen/h2/library.properties b/jOOQ-test/configuration/org/jooq/configuration/espen/h2/library.properties index 0198680cbb..1e586d0890 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/espen/h2/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/espen/h2/library.properties @@ -35,13 +35,5 @@ generator.generate.relations=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.h2.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/espen/h2/library.xml b/jOOQ-test/configuration/org/jooq/configuration/espen/h2/library.xml index a90aa1d948..f41ae94b6e 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/espen/h2/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/espen/h2/library.xml @@ -15,34 +15,6 @@ T_BOOK_DETAILS,SYSTEM_SEQUENCE.* false true - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/espen/hsqldb/library.properties b/jOOQ-test/configuration/org/jooq/configuration/espen/hsqldb/library.properties index a08874d319..ba5bf20acb 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/espen/hsqldb/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/espen/hsqldb/library.properties @@ -34,13 +34,5 @@ generator.database.forced-type.BOOLEAN=(?i:(.*?\.)?T_BOOLEANS\.(VC|C|N)_BOOLEAN) generator.generate.relations=true generator.generate.instance-fields=true -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.hsqldb.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/espen/hsqldb/library.xml b/jOOQ-test/configuration/org/jooq/configuration/espen/hsqldb/library.xml index fa38f36dd1..138dbf466c 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/espen/hsqldb/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/espen/hsqldb/library.xml @@ -15,34 +15,6 @@ T_BOOK_DETAILS,S_TRIGGERS_SEQUENCE false true - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - org.jooq.test._.converters.StringEnum diff --git a/jOOQ-test/configuration/org/jooq/configuration/espen/sybase/library.properties b/jOOQ-test/configuration/org/jooq/configuration/espen/sybase/library.properties index de8a289c11..6131ea253b 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/espen/sybase/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/espen/sybase/library.properties @@ -36,13 +36,5 @@ generator.generate.records=true generator.generate.instance-fields=true generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=cd -generator.generate.master-data-table-description.t_language=description -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.sybase.generatedclasses generator.target.directory=./src diff --git a/jOOQ-test/configuration/org/jooq/configuration/espen/sybase/library.xml b/jOOQ-test/configuration/org/jooq/configuration/espen/sybase/library.xml index 12f101a776..6257d806f6 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/espen/sybase/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/espen/sybase/library.xml @@ -15,34 +15,6 @@ t_.*,x_.*,v_.*,V_.*,p_.*,f_.*,(f|p)[0-9]+,s_.* t_book_details false - - - t_language - cd - description - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - org.jooq.test._.converters.Boolean_10 diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/ase/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/ase/library.properties index 998efc0eba..37b136ce5d 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/ase/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/ase/library.properties @@ -36,13 +36,5 @@ generator.generate.records=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=cd -generator.generate.master-data-table-description.t_language=description -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.ase.generatedclasses generator.target.directory=./src diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/ase/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/ase/library.xml index 4da6ada96c..fa07ebe3ca 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/ase/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/ase/library.xml @@ -15,34 +15,6 @@ t_book_details false true - - - t_language - cd - description - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/cubrid/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/cubrid/library.xml index 0f640c0462..a8bf338785 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/cubrid/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/cubrid/library.xml @@ -15,34 +15,6 @@ t_book_details false true - - - t_language - cd - description - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/db2/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/db2/library.properties index 63726eaa6b..7ed423008a 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/db2/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/db2/library.properties @@ -36,13 +36,5 @@ generator.generate.relations=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.db2.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/db2/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/db2/library.xml index f25bc24828..78e5a18758 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/db2/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/db2/library.xml @@ -15,34 +15,6 @@ T_BOOK_DETAILS false true - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/derby/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/derby/library.properties index 6effb79654..d434aea6c3 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/derby/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/derby/library.properties @@ -35,13 +35,5 @@ generator.generate.relations=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.derby.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/derby/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/derby/library.xml index d1708c7c76..0e6af12048 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/derby/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/derby/library.xml @@ -17,34 +17,6 @@ REC_VERSION REC_TIMESTAMP true - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/firebird/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/firebird/library.xml index 944de34b9c..211288256b 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/firebird/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/firebird/library.xml @@ -24,34 +24,6 @@ REC_TIMESTAMP false true - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - org.jooq.test._.converters.StringEnum diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/h2/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/h2/library.properties index 3de66d6bdf..7176eb462f 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/h2/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/h2/library.properties @@ -36,13 +36,5 @@ generator.generate.relations=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.h2.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/h2/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/h2/library.xml index ab854ac34f..b4fb72e1b1 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/h2/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/h2/library.xml @@ -17,34 +17,6 @@ false true PUBLIC - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/hsqldb/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/hsqldb/library.properties index f5e0d12074..65b3706a7c 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/hsqldb/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/hsqldb/library.properties @@ -34,13 +34,5 @@ generator.database.forced-type.BOOLEAN=(?i:(.*?\.)?T_BOOLEANS\.(VC|C|N)_BOOLEAN) generator.generate.relations=true generator.generate.instance-fields= -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.hsqldb.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/hsqldb/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/hsqldb/library.xml index 93d006a4e5..2de253d177 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/hsqldb/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/hsqldb/library.xml @@ -25,34 +25,6 @@ REC_TIMESTAMP false true - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - org.jooq.test._.converters.StringEnum diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/ingres/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/ingres/library.properties index 447db11101..c1c1375870 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/ingres/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/ingres/library.properties @@ -35,13 +35,5 @@ generator.generate.relations=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=cd -generator.generate.master-data-table-description.t_language=description -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.ingres.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/ingres/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/ingres/library.xml index 7c0c3b071b..39dd075235 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/ingres/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/ingres/library.xml @@ -13,34 +13,6 @@ t_book_details false true - - - t_language - cd - description - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library-schema-rewrite.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library-schema-rewrite.properties index a6be1ecde9..61ed6aa471 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library-schema-rewrite.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library-schema-rewrite.properties @@ -42,13 +42,5 @@ generator.generate.generated-annotation=false generator.generate.pojos=true generator.generate.jpa-annotations=true -#Generate a master data table enum from t_language -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=CD -generator.generate.master-data-table-description.t_language=DESCRIPTION -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.mysql2.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library-schema-rewrite.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library-schema-rewrite.xml index 68124ad14f..95b286ff96 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library-schema-rewrite.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library-schema-rewrite.xml @@ -17,34 +17,6 @@ true test test2 - - - t_language - CD - DESCRIPTION - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library.properties index 311943e6fc..1fe66c1951 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library.properties @@ -36,13 +36,5 @@ generator.generate.instance-fields=false generator.generate.generated-annotation=false generator.generate.pojos=true -#Generate a master data table enum from t_language -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=CD -generator.generate.master-data-table-description.t_language=DESCRIPTION -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.mysql.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library.xml index 072b7fab60..a9a96922db 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/library.xml @@ -15,34 +15,6 @@ t_book_details false true - - - t_language - CD - DESCRIPTION - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/sakila.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/sakila.properties index 2ec96aa2da..e94f0664be 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/sakila.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/mysql/sakila.properties @@ -20,7 +20,5 @@ generator.strategy.record-class-prefix=sakila_r_ generator.strategy.record-class-suffix=_record generator.strategy.member-scheme=case-sensitive -#Generate a master data table enum from t_language - generator.target.package=org.jooq.examples.mysql.sakila generator.target.directory=./examples \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library-custom-strategy.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library-custom-strategy.xml index 6922b23adb..019acc0db2 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library-custom-strategy.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library-custom-strategy.xml @@ -26,34 +26,6 @@ TEST - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - true diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library.properties index 43268c5c09..a7f3ad2b8a 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library.properties @@ -36,13 +36,5 @@ generator.generate.instance-fields= generator.generate.generated-annotation=false generator.generate.pojos=true -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=T_LANGUAGE,T_658_11,T_658_21,T_658_31,T_658_12,T_658_22,T_658_32 -generator.generate.master-data-table-literal.T_LANGUAGE=CD -generator.generate.master-data-table-description.T_LANGUAGE=DESCRIPTION -generator.generate.master-data-table-literal.T_658_12=CD -generator.generate.master-data-table-literal.T_658_22=CD -generator.generate.master-data-table-literal.T_658_32=CD - generator.target.package=org.jooq.test.oracle.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library.xml index 2f32355b2d..4ad9943ca2 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/library.xml @@ -22,34 +22,6 @@ MULTI_SCHEMA - - - T_LANGUAGE - CD - DESCRIPTION - - - T_658_11 - - - T_658_21 - - - T_658_31 - - - T_658_12 - CD - - - T_658_22 - CD - - - T_658_32 - CD - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/postgres/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/postgres/library.properties index d1a4e02b29..558cf462bb 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/postgres/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/postgres/library.properties @@ -38,13 +38,5 @@ generator.generate.generated-annotation=false generator.generate.pojos=true generator.generate.jpa-annotations=true -#Generate a master data table enum from t_language -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=cd -generator.generate.master-data-table-description.t_language=description -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.postgres.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/postgres/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/postgres/library.xml index 68edb17108..43e66874bc 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/postgres/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/postgres/library.xml @@ -15,35 +15,6 @@ t_book_details,.*?_seq false true - - - t_language - cd - description - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - - org.jooq.test._.converters.Boolean_10 diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlite/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlite/library.properties index 1a8eaf85c0..d3e4091946 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlite/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlite/library.properties @@ -35,13 +35,5 @@ generator.generate.relations=true generator.generate.instance-fields=false generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=cd -generator.generate.master-data-table-description.t_language=description -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.sqlite.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlite/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlite/library.xml index 04c427f30a..b48bb08c88 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlite/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlite/library.xml @@ -15,34 +15,6 @@ t_book_details,sqlite_sequence false true - - - t_language - cd - description - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.properties index b00cd57947..37517e9ed8 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.properties @@ -36,13 +36,5 @@ generator.generate.instance-fields=true generator.generate.generated-annotation=false generator.generate.pojos=true -#Generate a master data table enum from t_language -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=cd -generator.generate.master-data-table-description.t_language=description -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.sqlserver.generatedclasses generator.target.directory=./src \ No newline at end of file diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.xml index 3bdf6b86bf..a5966bb6b5 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sqlserver/library.xml @@ -15,34 +15,6 @@ t_.*,x_.*,v_.*,p_.*,f_.*,(f|p)[0-9]+,s_.* t_book_details false - - - t_language - cd - description - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - org.jooq.test._.converters.Boolean_10 diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.properties index de8a289c11..6131ea253b 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.properties @@ -36,13 +36,5 @@ generator.generate.records=true generator.generate.instance-fields=true generator.generate.generated-annotation=false -#Generate a master data table enum from T_LANGUAGE -generator.generate.master-data-tables=t_language,t_658_11,t_658_21,t_658_31,t_658_12,t_658_22,t_658_32 -generator.generate.master-data-table-literal.t_language=cd -generator.generate.master-data-table-description.t_language=description -generator.generate.master-data-table-literal.t_658_12=cd -generator.generate.master-data-table-literal.t_658_22=cd -generator.generate.master-data-table-literal.t_658_32=cd - generator.target.package=org.jooq.test.sybase.generatedclasses generator.target.directory=./src diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.xml b/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.xml index 620fe67337..3b67a1b2ee 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.xml +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/sybase/library.xml @@ -15,34 +15,6 @@ t_.*,x_.*,v_.*,V_.*,p_.*,f_.*,(f|p)[0-9]+,s_.* t_book_details false - - - t_language - cd - description - - - t_658_11 - - - t_658_21 - - - t_658_31 - - - t_658_12 - cd - - - t_658_22 - cd - - - t_658_32 - cd - - diff --git a/jOOQ-test/examples/org/jooq/examples/Library.java b/jOOQ-test/examples/org/jooq/examples/Library.java index aec194309d..ba976cce65 100644 --- a/jOOQ-test/examples/org/jooq/examples/Library.java +++ b/jOOQ-test/examples/org/jooq/examples/Library.java @@ -35,6 +35,7 @@ */ package org.jooq.examples; +import static org.jooq.test.mysql.generatedclasses.Tables.T_LANGUAGE; import static org.jooq.test.mysql.generatedclasses.tables.TAuthor.T_AUTHOR; import static org.jooq.test.mysql.generatedclasses.tables.TBook.T_BOOK; @@ -48,9 +49,9 @@ import org.jooq.Select; import org.jooq.SelectQuery; import org.jooq.impl.Factory; import org.jooq.test.mysql.generatedclasses.enums.TBookStatus; -import org.jooq.test.mysql.generatedclasses.enums.TLanguage; import org.jooq.test.mysql.generatedclasses.tables.TAuthor; import org.jooq.test.mysql.generatedclasses.tables.TBook; +import org.jooq.test.mysql.generatedclasses.tables.TLanguage; import org.jooq.test.mysql.generatedclasses.tables.records.TAuthorRecord; import org.jooq.test.mysql.generatedclasses.tables.records.TBookRecord; @@ -177,10 +178,16 @@ public class Library { } for (TAuthorRecord record : create().selectFrom(T_AUTHOR) - .where(TAuthor.ID.in(create().selectDistinct(TBook.AUTHOR_ID) - .from(T_BOOK).where(TBook.LANGUAGE_ID.in(TLanguage.en, TLanguage.pt)))).fetch()) { + .where(TAuthor.ID.in(create() + .selectDistinct(TBook.AUTHOR_ID) + .from(T_BOOK) + .where(TBook.LANGUAGE_ID.in( + create().select(TLanguage.ID) + .from(T_LANGUAGE) + .where(TLanguage.CD.in("pt", "en")) + )))).fetch()) { - System.out.println("Author : " + record.getFirstName() + " " + record.getLastName() + " have english or portuguese books"); + System.out.println("Author : " + record.getFirstName() + " " + record.getLastName() + " has english or portuguese books"); } Select union = diff --git a/jOOQ-test/src/org/jooq/test/ASETest.java b/jOOQ-test/src/org/jooq/test/ASETest.java index e45a2c865d..285bf9ac11 100644 --- a/jOOQ-test/src/org/jooq/test/ASETest.java +++ b/jOOQ-test/src/org/jooq/test/ASETest.java @@ -70,7 +70,6 @@ import org.jooq.test.ase.generatedclasses.tables.TIdentity; import org.jooq.test.ase.generatedclasses.tables.TIdentityPk; import org.jooq.test.ase.generatedclasses.tables.TTriggers; import org.jooq.test.ase.generatedclasses.tables.T_639NumbersTable; -import org.jooq.test.ase.generatedclasses.tables.T_658Ref; import org.jooq.test.ase.generatedclasses.tables.T_725LobTest; import org.jooq.test.ase.generatedclasses.tables.T_785; import org.jooq.test.ase.generatedclasses.tables.VLibrary; @@ -84,7 +83,6 @@ import org.jooq.test.ase.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.ase.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.ase.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.ase.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.ase.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.ase.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.ase.generatedclasses.tables.records.T_785Record; import org.jooq.test.ase.generatedclasses.tables.records.VLibraryRecord; @@ -118,7 +116,6 @@ public class ASETest extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -233,11 +230,6 @@ public class ASETest extends jOOQAbstractTest< return T_725LobTest.LOB; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T785() { return T_785.T_785; @@ -464,7 +456,7 @@ public class ASETest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return TBook.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/BaseTest.java b/jOOQ-test/src/org/jooq/test/BaseTest.java index bf9941c55a..2ef992f340 100644 --- a/jOOQ-test/src/org/jooq/test/BaseTest.java +++ b/jOOQ-test/src/org/jooq/test/BaseTest.java @@ -35,8 +35,6 @@ */ package org.jooq.test; -import static org.jooq.tools.reflect.Reflect.on; - import java.lang.reflect.Method; import java.math.BigDecimal; import java.math.BigInteger; @@ -128,7 +126,6 @@ public abstract class BaseTest< IPK extends UpdatableRecord, // Various tables related to trac ticket numbers - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> { @@ -147,16 +144,12 @@ public abstract class BaseTest< protected static final JooqLogger log = JooqLogger.getLogger(jOOQAbstractTest.class); - protected final jOOQAbstractTest delegate; + protected final jOOQAbstractTest delegate; - protected BaseTest(jOOQAbstractTest delegate) { + protected BaseTest(jOOQAbstractTest delegate) { this.delegate = delegate; } - protected Table T658() { - return delegate.T658(); - } - protected Table T725() { return delegate.T725(); } @@ -441,7 +434,7 @@ public abstract class BaseTest< return delegate.TBook_TITLE(); } - protected TableField TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return delegate.TBook_LANGUAGE_ID(); } @@ -725,7 +718,6 @@ public abstract class BaseTest< /** * Convenience method to create a new dummy book */ - @SuppressWarnings("unchecked") protected final B newBook(int id) { B record = create().newRecord(TBook()); @@ -733,7 +725,7 @@ public abstract class BaseTest< record.setValue(TBook_AUTHOR_ID(), 1); record.setValue(TBook_TITLE(), "XX"); record.setValue(TBook_PUBLISHED_IN(), 2000); - record.setValue((Field)TBook_LANGUAGE_ID(), on(TBook_LANGUAGE_ID().getDataType().getType()).get("en")); + record.setValue(TBook_LANGUAGE_ID(), 1); return record; } diff --git a/jOOQ-test/src/org/jooq/test/CUBRIDTest.java b/jOOQ-test/src/org/jooq/test/CUBRIDTest.java index 9caf345fde..50f78bb0fd 100644 --- a/jOOQ-test/src/org/jooq/test/CUBRIDTest.java +++ b/jOOQ-test/src/org/jooq/test/CUBRIDTest.java @@ -73,7 +73,6 @@ import org.jooq.test.cubrid.generatedclasses.tables.TIdentity; import org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk; import org.jooq.test.cubrid.generatedclasses.tables.TTriggers; import org.jooq.test.cubrid.generatedclasses.tables.T_639NumbersTable; -import org.jooq.test.cubrid.generatedclasses.tables.T_658Ref; import org.jooq.test.cubrid.generatedclasses.tables.T_725LobTest; import org.jooq.test.cubrid.generatedclasses.tables.T_785; import org.jooq.test.cubrid.generatedclasses.tables.VLibrary; @@ -88,7 +87,6 @@ import org.jooq.test.cubrid.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.cubrid.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.cubrid.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.cubrid.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.cubrid.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.cubrid.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.cubrid.generatedclasses.tables.records.T_785Record; import org.jooq.test.cubrid.generatedclasses.tables.records.VLibraryRecord; @@ -122,7 +120,6 @@ public class CUBRIDTest extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -237,11 +234,6 @@ public class CUBRIDTest extends jOOQAbstractTest< return T_725LobTest.LOB; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T785() { return T_785.T_785; @@ -471,7 +463,7 @@ public class CUBRIDTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return TBook.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/DB2Test.java b/jOOQ-test/src/org/jooq/test/DB2Test.java index ce92b6a9b9..2e5fe36902 100644 --- a/jOOQ-test/src/org/jooq/test/DB2Test.java +++ b/jOOQ-test/src/org/jooq/test/DB2Test.java @@ -77,7 +77,6 @@ import org.jooq.test.db2.generatedclasses.tables.TIdentity; import org.jooq.test.db2.generatedclasses.tables.TIdentityPk; import org.jooq.test.db2.generatedclasses.tables.TTriggers; import org.jooq.test.db2.generatedclasses.tables.T_639NumbersTable; -import org.jooq.test.db2.generatedclasses.tables.T_658Ref; import org.jooq.test.db2.generatedclasses.tables.T_725LobTest; import org.jooq.test.db2.generatedclasses.tables.T_785; import org.jooq.test.db2.generatedclasses.tables.VLibrary; @@ -91,7 +90,6 @@ import org.jooq.test.db2.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.db2.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.db2.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.db2.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.db2.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.db2.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.db2.generatedclasses.tables.records.T_785Record; import org.jooq.test.db2.generatedclasses.tables.records.VLibraryRecord; @@ -125,7 +123,6 @@ public class DB2Test extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -230,11 +227,6 @@ public class DB2Test extends jOOQAbstractTest< return TBookToBookStore.STOCK; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T639() { return T_639NumbersTable.T_639_NUMBERS_TABLE; @@ -484,7 +476,7 @@ public class DB2Test extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return TBook.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/DerbyTest.java b/jOOQ-test/src/org/jooq/test/DerbyTest.java index 6b6d544789..89492f8839 100644 --- a/jOOQ-test/src/org/jooq/test/DerbyTest.java +++ b/jOOQ-test/src/org/jooq/test/DerbyTest.java @@ -77,7 +77,6 @@ import org.jooq.test.derby.generatedclasses.tables.TIdentity; import org.jooq.test.derby.generatedclasses.tables.TIdentityPk; import org.jooq.test.derby.generatedclasses.tables.TTriggers; import org.jooq.test.derby.generatedclasses.tables.T_639NumbersTable; -import org.jooq.test.derby.generatedclasses.tables.T_658Ref; import org.jooq.test.derby.generatedclasses.tables.T_725LobTest; import org.jooq.test.derby.generatedclasses.tables.T_785; import org.jooq.test.derby.generatedclasses.tables.VLibrary; @@ -91,7 +90,6 @@ import org.jooq.test.derby.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.derby.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.derby.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.derby.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.derby.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.derby.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.derby.generatedclasses.tables.records.T_785Record; import org.jooq.test.derby.generatedclasses.tables.records.VLibraryRecord; @@ -122,7 +120,6 @@ public class DerbyTest extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -232,11 +229,6 @@ public class DerbyTest extends jOOQAbstractTest< return TBookToBookStore.STOCK; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T639() { return T_639NumbersTable.T_639_NUMBERS_TABLE; @@ -483,7 +475,7 @@ public class DerbyTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return TBook.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/FirebirdTest.java b/jOOQ-test/src/org/jooq/test/FirebirdTest.java index a5afa4c8ab..afed09ebd9 100644 --- a/jOOQ-test/src/org/jooq/test/FirebirdTest.java +++ b/jOOQ-test/src/org/jooq/test/FirebirdTest.java @@ -37,7 +37,6 @@ package org.jooq.test; import static org.jooq.test.firebird.generatedclasses.Tables.T_639_NUMBERS_TABLE; -import static org.jooq.test.firebird.generatedclasses.Tables.T_658_REF; import static org.jooq.test.firebird.generatedclasses.Tables.T_725_LOB_TEST; import static org.jooq.test.firebird.generatedclasses.Tables.T_785; import static org.jooq.test.firebird.generatedclasses.Tables.T_AUTHOR; @@ -82,7 +81,6 @@ import org.jooq.test.firebird.generatedclasses.tables.records.TBooleansRecord; import org.jooq.test.firebird.generatedclasses.tables.records.TDatesRecord; import org.jooq.test.firebird.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.firebird.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.firebird.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.firebird.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.firebird.generatedclasses.tables.records.T_785Record; import org.jooq.test.firebird.generatedclasses.tables.records.VLibraryRecord; @@ -115,7 +113,6 @@ public class FirebirdTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, XUnusedRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -230,11 +227,6 @@ public class FirebirdTest extends jOOQAbstractTest< return T_725_LOB_TEST.LOB; } - @Override - protected Table T658() { - return T_658_REF; - } - @Override protected Table T639() { return T_639_NUMBERS_TABLE; @@ -466,7 +458,7 @@ public class FirebirdTest extends jOOQAbstractTest< } @Override - protected TableField TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return T_BOOK.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/H2Test.java b/jOOQ-test/src/org/jooq/test/H2Test.java index 1df2327604..f201961dcb 100644 --- a/jOOQ-test/src/org/jooq/test/H2Test.java +++ b/jOOQ-test/src/org/jooq/test/H2Test.java @@ -80,7 +80,6 @@ import org.jooq.test.h2.generatedclasses.tables.TIdentity; import org.jooq.test.h2.generatedclasses.tables.TIdentityPk; import org.jooq.test.h2.generatedclasses.tables.TTriggers; import org.jooq.test.h2.generatedclasses.tables.T_639NumbersTable; -import org.jooq.test.h2.generatedclasses.tables.T_658Ref; import org.jooq.test.h2.generatedclasses.tables.T_725LobTest; import org.jooq.test.h2.generatedclasses.tables.T_785; import org.jooq.test.h2.generatedclasses.tables.VLibrary; @@ -96,7 +95,6 @@ import org.jooq.test.h2.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.h2.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.h2.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.h2.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.h2.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.h2.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.h2.generatedclasses.tables.records.T_785Record; import org.jooq.test.h2.generatedclasses.tables.records.VLibraryRecord; @@ -129,7 +127,6 @@ public class H2Test extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -244,11 +241,6 @@ public class H2Test extends jOOQAbstractTest< return TBookToBookStore.STOCK; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T639() { return T_639NumbersTable.T_639_NUMBERS_TABLE; @@ -498,7 +490,7 @@ public class H2Test extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return TBook.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/HSQLDBTest.java b/jOOQ-test/src/org/jooq/test/HSQLDBTest.java index b7c104ad8b..69be02974a 100644 --- a/jOOQ-test/src/org/jooq/test/HSQLDBTest.java +++ b/jOOQ-test/src/org/jooq/test/HSQLDBTest.java @@ -37,7 +37,6 @@ package org.jooq.test; import static org.jooq.test.hsqldb.generatedclasses.Tables.T_639_NUMBERS_TABLE; -import static org.jooq.test.hsqldb.generatedclasses.Tables.T_658_REF; import static org.jooq.test.hsqldb.generatedclasses.Tables.T_725_LOB_TEST; import static org.jooq.test.hsqldb.generatedclasses.Tables.T_785; import static org.jooq.test.hsqldb.generatedclasses.Tables.T_ARRAYS; @@ -90,7 +89,6 @@ import org.jooq.test.hsqldb.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.hsqldb.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.hsqldb.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.hsqldb.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.hsqldb.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.hsqldb.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.hsqldb.generatedclasses.tables.records.T_785Record; import org.jooq.test.hsqldb.generatedclasses.tables.records.VLibraryRecord; @@ -121,7 +119,6 @@ public class HSQLDBTest extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -231,11 +228,6 @@ public class HSQLDBTest extends jOOQAbstractTest< return T_BOOK_TO_BOOK_STORE.STOCK; } - @Override - protected Table T658() { - return T_658_REF; - } - @Override protected Table T639() { return T_639_NUMBERS_TABLE; @@ -482,7 +474,7 @@ public class HSQLDBTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return T_BOOK.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/HSQLDBTest2.java b/jOOQ-test/src/org/jooq/test/HSQLDBTest2.java index 7d395d704f..dd1d7e8e4f 100644 --- a/jOOQ-test/src/org/jooq/test/HSQLDBTest2.java +++ b/jOOQ-test/src/org/jooq/test/HSQLDBTest2.java @@ -37,7 +37,6 @@ package org.jooq.test; import static org.jooq.test.h2.generatedclasses.Tables.T_639_NUMBERS_TABLE; -import static org.jooq.test.h2.generatedclasses.Tables.T_658_REF; import static org.jooq.test.h2.generatedclasses.Tables.T_725_LOB_TEST; import static org.jooq.test.h2.generatedclasses.Tables.T_785; import static org.jooq.test.h2.generatedclasses.Tables.T_AUTHOR; @@ -88,7 +87,6 @@ import org.jooq.test.h2.generatedclasses.tables.records.TBooleansRecord; import org.jooq.test.h2.generatedclasses.tables.records.TDatesRecord; import org.jooq.test.h2.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.h2.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.h2.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.h2.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.h2.generatedclasses.tables.records.T_785Record; import org.jooq.test.h2.generatedclasses.tables.records.VLibraryRecord; @@ -120,7 +118,6 @@ public class HSQLDBTest2 extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, XUnusedRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -235,11 +232,6 @@ public class HSQLDBTest2 extends jOOQAbstractTest< return T_BOOK_TO_BOOK_STORE.STOCK; } - @Override - protected Table T658() { - return T_658_REF; - } - @Override protected Table T639() { return T_639_NUMBERS_TABLE; @@ -486,7 +478,7 @@ public class HSQLDBTest2 extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return T_BOOK.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/IngresTest.java b/jOOQ-test/src/org/jooq/test/IngresTest.java index 123eef694b..e5a9a16f96 100644 --- a/jOOQ-test/src/org/jooq/test/IngresTest.java +++ b/jOOQ-test/src/org/jooq/test/IngresTest.java @@ -76,7 +76,6 @@ import org.jooq.test.ingres.generatedclasses.tables.TIdentity; import org.jooq.test.ingres.generatedclasses.tables.TIdentityPk; import org.jooq.test.ingres.generatedclasses.tables.TTriggers; import org.jooq.test.ingres.generatedclasses.tables.T_639NumbersTable; -import org.jooq.test.ingres.generatedclasses.tables.T_658Ref; import org.jooq.test.ingres.generatedclasses.tables.T_725LobTest; import org.jooq.test.ingres.generatedclasses.tables.T_785; import org.jooq.test.ingres.generatedclasses.tables.VLibrary; @@ -90,7 +89,6 @@ import org.jooq.test.ingres.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.ingres.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.ingres.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.ingres.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.ingres.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.ingres.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.ingres.generatedclasses.tables.records.T_785Record; import org.jooq.test.ingres.generatedclasses.tables.records.VLibraryRecord; @@ -122,7 +120,6 @@ public class IngresTest extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -222,11 +219,6 @@ public class IngresTest extends jOOQAbstractTest< return TBookToBookStore.STOCK; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T639() { return T_639NumbersTable.T_639_NUMBERS_TABLE; @@ -473,7 +465,7 @@ public class IngresTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return TBook.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/MySQLTest.java b/jOOQ-test/src/org/jooq/test/MySQLTest.java index a433cbff95..da3e921eec 100644 --- a/jOOQ-test/src/org/jooq/test/MySQLTest.java +++ b/jOOQ-test/src/org/jooq/test/MySQLTest.java @@ -96,7 +96,6 @@ import org.jooq.test.mysql.generatedclasses.tables.TIdentityPk; import org.jooq.test.mysql.generatedclasses.tables.TTriggers; import org.jooq.test.mysql.generatedclasses.tables.TUnsigned; import org.jooq.test.mysql.generatedclasses.tables.T_639NumbersTable; -import org.jooq.test.mysql.generatedclasses.tables.T_658Ref; import org.jooq.test.mysql.generatedclasses.tables.T_725LobTest; import org.jooq.test.mysql.generatedclasses.tables.T_785; import org.jooq.test.mysql.generatedclasses.tables.T_959; @@ -112,7 +111,6 @@ import org.jooq.test.mysql.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.mysql.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.mysql.generatedclasses.tables.records.TUnsignedRecord; import org.jooq.test.mysql.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.mysql.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.mysql.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.mysql.generatedclasses.tables.records.T_785Record; import org.jooq.test.mysql.generatedclasses.tables.records.VLibraryRecord; @@ -146,7 +144,6 @@ public class MySQLTest extends jOOQAbstractTest< TUnsignedRecord, XUnusedRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -251,11 +248,6 @@ public class MySQLTest extends jOOQAbstractTest< return TBookToBookStore.STOCK; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T639() { return T_639NumbersTable.T_639_NUMBERS_TABLE; @@ -502,7 +494,7 @@ public class MySQLTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return TBook.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/MySQLTestSchemaRewrite.java b/jOOQ-test/src/org/jooq/test/MySQLTestSchemaRewrite.java index 9e285db0e3..3cbd971764 100644 --- a/jOOQ-test/src/org/jooq/test/MySQLTestSchemaRewrite.java +++ b/jOOQ-test/src/org/jooq/test/MySQLTestSchemaRewrite.java @@ -37,7 +37,6 @@ package org.jooq.test; import static org.jooq.test.mysql2.generatedclasses.Tables.T_639_NUMBERS_TABLE; -import static org.jooq.test.mysql2.generatedclasses.Tables.T_658_REF; import static org.jooq.test.mysql2.generatedclasses.Tables.T_725_LOB_TEST; import static org.jooq.test.mysql2.generatedclasses.Tables.T_785; import static org.jooq.test.mysql2.generatedclasses.Tables.T_AUTHOR; @@ -85,7 +84,6 @@ import org.jooq.test.mysql2.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.mysql2.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.mysql2.generatedclasses.tables.records.TUnsignedRecord; import org.jooq.test.mysql2.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.mysql2.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.mysql2.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.mysql2.generatedclasses.tables.records.T_785Record; import org.jooq.test.mysql2.generatedclasses.tables.records.VLibraryRecord; @@ -117,7 +115,6 @@ public class MySQLTestSchemaRewrite extends jOOQAbstractTest< TUnsignedRecord, XUnusedRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -222,11 +219,6 @@ public class MySQLTestSchemaRewrite extends jOOQAbstractTest< return T_BOOK_TO_BOOK_STORE.STOCK; } - @Override - protected Table T658() { - return T_658_REF; - } - @Override protected Table T639() { return T_639_NUMBERS_TABLE; @@ -473,7 +465,7 @@ public class MySQLTestSchemaRewrite extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return T_BOOK.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/OracleTest.java b/jOOQ-test/src/org/jooq/test/OracleTest.java index 706246c090..2faad31e6d 100644 --- a/jOOQ-test/src/org/jooq/test/OracleTest.java +++ b/jOOQ-test/src/org/jooq/test/OracleTest.java @@ -57,7 +57,6 @@ import static org.jooq.test.oracle.generatedclasses.test.Routines.pArrays1; import static org.jooq.test.oracle.generatedclasses.test.Routines.pTables1; import static org.jooq.test.oracle.generatedclasses.test.Routines.secondMax; import static org.jooq.test.oracle.generatedclasses.test.Tables.T_639_NUMBERS_TABLE; -import static org.jooq.test.oracle.generatedclasses.test.Tables.T_658_REF; import static org.jooq.test.oracle.generatedclasses.test.Tables.T_725_LOB_TEST; import static org.jooq.test.oracle.generatedclasses.test.Tables.T_785; import static org.jooq.test.oracle.generatedclasses.test.Tables.T_ARRAYS; @@ -123,7 +122,6 @@ import org.jooq.test.oracle.generatedclasses.test.tables.records.TDatesRecord; import org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord; import org.jooq.test.oracle.generatedclasses.test.tables.records.TTriggersRecord; import org.jooq.test.oracle.generatedclasses.test.tables.records.T_639NumbersTableRecord; -import org.jooq.test.oracle.generatedclasses.test.tables.records.T_658RefRecord; import org.jooq.test.oracle.generatedclasses.test.tables.records.T_725LobTestRecord; import org.jooq.test.oracle.generatedclasses.test.tables.records.T_785Record; import org.jooq.test.oracle.generatedclasses.test.tables.records.VIncompleteRecord; @@ -181,7 +179,6 @@ public class OracleTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, XUnusedRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -431,11 +428,6 @@ public class OracleTest extends jOOQAbstractTest< return T_BOOLEANS.N_BOOLEAN; } - @Override - protected Table T658() { - return T_658_REF; - } - @Override protected Table T639() { return T_639_NUMBERS_TABLE; @@ -557,7 +549,7 @@ public class OracleTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return T_BOOK.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/PostgresTest.java b/jOOQ-test/src/org/jooq/test/PostgresTest.java index 834aa99e5c..c7f0426455 100644 --- a/jOOQ-test/src/org/jooq/test/PostgresTest.java +++ b/jOOQ-test/src/org/jooq/test/PostgresTest.java @@ -37,7 +37,6 @@ package org.jooq.test; import static org.jooq.test.postgres.generatedclasses.Tables.T_639_NUMBERS_TABLE; -import static org.jooq.test.postgres.generatedclasses.Tables.T_658_REF; import static org.jooq.test.postgres.generatedclasses.Tables.T_725_LOB_TEST; import static org.jooq.test.postgres.generatedclasses.Tables.T_785; import static org.jooq.test.postgres.generatedclasses.Tables.T_959; @@ -93,7 +92,6 @@ import org.jooq.test.postgres.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.postgres.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.postgres.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.postgres.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.postgres.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.postgres.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.postgres.generatedclasses.tables.records.T_785Record; import org.jooq.test.postgres.generatedclasses.tables.records.VLibraryRecord; @@ -129,7 +127,6 @@ public class PostgresTest extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -354,11 +351,6 @@ public class PostgresTest extends jOOQAbstractTest< return T_BOOLEANS.N_BOOLEAN; } - @Override - protected Table T658() { - return T_658_REF; - } - @Override protected Table T639() { return T_639_NUMBERS_TABLE; @@ -480,7 +472,7 @@ public class PostgresTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return T_BOOK.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/SQLServerTest.java b/jOOQ-test/src/org/jooq/test/SQLServerTest.java index 87eb9c2925..a840b68391 100644 --- a/jOOQ-test/src/org/jooq/test/SQLServerTest.java +++ b/jOOQ-test/src/org/jooq/test/SQLServerTest.java @@ -75,7 +75,6 @@ import org.jooq.test._.converters.Boolean_YES_NO_UC; import org.jooq.test._.converters.Boolean_YN_LC; import org.jooq.test._.converters.Boolean_YN_UC; import org.jooq.test.sqlserver.generatedclasses.Routines; -import org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref; import org.jooq.test.sqlserver.generatedclasses.tables.records.TAuthorRecord; import org.jooq.test.sqlserver.generatedclasses.tables.records.TBookRecord; import org.jooq.test.sqlserver.generatedclasses.tables.records.TBookStoreRecord; @@ -86,7 +85,6 @@ import org.jooq.test.sqlserver.generatedclasses.tables.records.TIdentityPkRecord import org.jooq.test.sqlserver.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.sqlserver.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.sqlserver.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.sqlserver.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.sqlserver.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.sqlserver.generatedclasses.tables.records.T_785Record; import org.jooq.test.sqlserver.generatedclasses.tables.records.VLibraryRecord; @@ -117,7 +115,6 @@ public class SQLServerTest extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -232,11 +229,6 @@ public class SQLServerTest extends jOOQAbstractTest< return T_725_LOB_TEST.LOB; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T639() { return T_639_NUMBERS_TABLE; @@ -468,7 +460,7 @@ public class SQLServerTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return T_BOOK.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/SQLiteTest.java b/jOOQ-test/src/org/jooq/test/SQLiteTest.java index ffd65ae8f2..5a9932600b 100644 --- a/jOOQ-test/src/org/jooq/test/SQLiteTest.java +++ b/jOOQ-test/src/org/jooq/test/SQLiteTest.java @@ -71,7 +71,6 @@ import org.jooq.test.sqlite.generatedclasses.tables.TBookToBookStore; import org.jooq.test.sqlite.generatedclasses.tables.TBooleans; import org.jooq.test.sqlite.generatedclasses.tables.TTriggers; import org.jooq.test.sqlite.generatedclasses.tables.T_639NumbersTable; -import org.jooq.test.sqlite.generatedclasses.tables.T_658Ref; import org.jooq.test.sqlite.generatedclasses.tables.T_725LobTest; import org.jooq.test.sqlite.generatedclasses.tables.T_785; import org.jooq.test.sqlite.generatedclasses.tables.VLibrary; @@ -83,7 +82,6 @@ import org.jooq.test.sqlite.generatedclasses.tables.records.TBooleansRecord; import org.jooq.test.sqlite.generatedclasses.tables.records.TDatesRecord; import org.jooq.test.sqlite.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.sqlite.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.sqlite.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.sqlite.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.sqlite.generatedclasses.tables.records.T_785Record; import org.jooq.test.sqlite.generatedclasses.tables.records.VLibraryRecord; @@ -116,7 +114,6 @@ public class SQLiteTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, XUnusedRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -231,11 +228,6 @@ public class SQLiteTest extends jOOQAbstractTest< return T_725LobTest.LOB; } - @Override - protected Table T658() { - return T_658Ref.T_658_REF; - } - @Override protected Table T639() { return T_639NumbersTable.T_639_NUMBERS_TABLE; @@ -467,7 +459,7 @@ public class SQLiteTest extends jOOQAbstractTest< } @Override - protected TableField TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return TBook.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/SybaseTest.java b/jOOQ-test/src/org/jooq/test/SybaseTest.java index ad64d94a76..3dda6500bf 100644 --- a/jOOQ-test/src/org/jooq/test/SybaseTest.java +++ b/jOOQ-test/src/org/jooq/test/SybaseTest.java @@ -32,7 +32,6 @@ package org.jooq.test; import static org.jooq.test.sybase.generatedclasses.Tables.T_639_NUMBERS_TABLE; -import static org.jooq.test.sybase.generatedclasses.Tables.T_658_REF; import static org.jooq.test.sybase.generatedclasses.Tables.T_725_LOB_TEST; import static org.jooq.test.sybase.generatedclasses.Tables.T_785; import static org.jooq.test.sybase.generatedclasses.Tables.T_AUTHOR; @@ -82,7 +81,6 @@ import org.jooq.test.sybase.generatedclasses.tables.records.TIdentityPkRecord; import org.jooq.test.sybase.generatedclasses.tables.records.TIdentityRecord; import org.jooq.test.sybase.generatedclasses.tables.records.TTriggersRecord; import org.jooq.test.sybase.generatedclasses.tables.records.T_639NumbersTableRecord; -import org.jooq.test.sybase.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.sybase.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.sybase.generatedclasses.tables.records.T_785Record; import org.jooq.test.sybase.generatedclasses.tables.records.VLibraryRecord; @@ -116,7 +114,6 @@ public class SybaseTest extends jOOQAbstractTest< XUnusedRecord, TIdentityRecord, TIdentityPkRecord, - T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, T_785Record> { @@ -232,11 +229,6 @@ public class SybaseTest extends jOOQAbstractTest< return T_725_LOB_TEST.LOB; } - @Override - protected Table T658() { - return T_658_REF; - } - @Override protected Table T785() { return T_785; @@ -463,7 +455,7 @@ public class SybaseTest extends jOOQAbstractTest< } @Override - protected TableField> TBook_LANGUAGE_ID() { + protected TableField TBook_LANGUAGE_ID() { return T_BOOK.LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/AggregateWindowFunctionTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/AggregateWindowFunctionTests.java index c31346dfbf..34e3999f74 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/AggregateWindowFunctionTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/AggregateWindowFunctionTests.java @@ -119,13 +119,12 @@ public class AggregateWindowFunctionTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public AggregateWindowFunctionTests(jOOQAbstractTest delegate) { + public AggregateWindowFunctionTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/BenchmarkTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/BenchmarkTests.java index 00041bc763..b22f5d4f25 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/BenchmarkTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/BenchmarkTests.java @@ -66,16 +66,15 @@ public class BenchmarkTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { private static final int REPETITIONS = 100; private static final String RANDOM = "" + new Random().nextLong(); - public BenchmarkTests(jOOQAbstractTest delegate) { + public BenchmarkTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/CRUDTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/CRUDTests.java index 2b933a9708..f0cfb34803 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/CRUDTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/CRUDTests.java @@ -90,13 +90,12 @@ public class CRUDTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public CRUDTests(jOOQAbstractTest delegate) { + public CRUDTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/DaoTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/DaoTests.java index aeb897dd12..a279e1197f 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/DaoTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/DaoTests.java @@ -67,13 +67,12 @@ public class DaoTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public DaoTests(jOOQAbstractTest delegate) { + public DaoTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/DataTypeTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/DataTypeTests.java index ab75b28e89..ad262f535d 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/DataTypeTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/DataTypeTests.java @@ -115,13 +115,12 @@ public class DataTypeTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public DataTypeTests(jOOQAbstractTest delegate) { + public DataTypeTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/EnumTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/EnumTests.java index 0c19bdd2e1..3e658ab0bb 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/EnumTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/EnumTests.java @@ -36,7 +36,6 @@ package org.jooq.test._.testcases; import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; import static org.jooq.tools.reflect.Reflect.on; import java.util.List; @@ -74,13 +73,12 @@ public class EnumTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public EnumTests(jOOQAbstractTest delegate) { + public EnumTests(jOOQAbstractTest delegate) { super(delegate); } @@ -242,49 +240,4 @@ extends BaseTest value = (Enum) book.getValue(TBook_LANGUAGE_ID()); - assertEquals(Integer.valueOf(1), ((org.jooq.MasterDataType) value).getPrimaryKey()); - assertEquals("en", value.name()); - - book.setValue((Field) TBook_LANGUAGE_ID(), Enum.valueOf(value.getClass(), "de")); - book.store(); - - book = create().fetchOne(TBook(), TBook_TITLE().equal("1984")); - value = (Enum) book.getValue(TBook_LANGUAGE_ID()); - assertEquals(Integer.valueOf(2), ((org.jooq.MasterDataType) value).getPrimaryKey()); - assertEquals("de", value.name()); - - // [#658] - General master data test - T658 master = create().fetchOne(T658()); - assertNotNull(master); - assertEquals("A", invoke(master.getValue(0), "getPrimaryKey").toString().trim()); - assertEquals("A", invoke(master.getValue(0), "getId").toString().trim()); - assertEquals(1, invoke(master.getValue(1), "getPrimaryKey")); - assertEquals(1, invoke(master.getValue(1), "getId")); - assertEquals(1L, invoke(master.getValue(2), "getPrimaryKey")); - assertEquals(1L, invoke(master.getValue(2), "getId")); - - assertEquals("B", invoke(master.getValue(3), "getPrimaryKey").toString().trim()); - assertEquals("B", invoke(master.getValue(3), "getId").toString().trim()); - assertEquals("B", invoke(master.getValue(3), "getCd").toString().trim()); - assertEquals(2, invoke(master.getValue(4), "getPrimaryKey")); - assertEquals(2, invoke(master.getValue(4), "getId")); - assertEquals(2, invoke(master.getValue(4), "getCd")); - assertEquals(2L, invoke(master.getValue(5), "getPrimaryKey")); - assertEquals(2L, invoke(master.getValue(5), "getId")); - assertEquals(2L, invoke(master.getValue(5), "getCd")); - } } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/ExecuteListenerTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/ExecuteListenerTests.java index 37dea0dbc9..c03086deea 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/ExecuteListenerTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/ExecuteListenerTests.java @@ -44,7 +44,6 @@ import static junit.framework.Assert.fail; import static org.jooq.conf.SettingsTools.executePreparedStatements; import static org.jooq.impl.Factory.param; import static org.jooq.impl.Factory.val; -import static org.jooq.tools.reflect.Reflect.on; import java.util.ArrayList; import java.util.HashMap; @@ -56,7 +55,6 @@ import org.jooq.Cursor; import org.jooq.ExecuteContext; import org.jooq.ExecuteListener; import org.jooq.ExecuteType; -import org.jooq.Field; import org.jooq.Result; import org.jooq.TableRecord; import org.jooq.UpdatableRecord; @@ -85,13 +83,12 @@ public class ExecuteListenerTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public ExecuteListenerTests(jOOQAbstractTest delegate) { + public ExecuteListenerTests(jOOQAbstractTest delegate) { super(delegate); } @@ -684,7 +681,7 @@ extends BaseTest)TBook_LANGUAGE_ID(), on(TBook_LANGUAGE_ID().getDataType().getType()).get("en")) + .set(TBook_LANGUAGE_ID(), 1) .set(TBook_CONTENT_TEXT(), "Design Patterns are awesome") .set(TBook_TITLE(), "Design Patterns"), diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/ExoticTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/ExoticTests.java index 0e7edb7ebd..86f1f028df 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/ExoticTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/ExoticTests.java @@ -88,13 +88,12 @@ public class ExoticTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public ExoticTests(jOOQAbstractTest delegate) { + public ExoticTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/FetchTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/FetchTests.java index 5b7eb99fd9..1ce6513ed6 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/FetchTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/FetchTests.java @@ -119,13 +119,12 @@ public class FetchTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public FetchTests(jOOQAbstractTest delegate) { + public FetchTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/FormatTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/FormatTests.java index a51f19eb68..f94d22e787 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/FormatTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/FormatTests.java @@ -85,13 +85,12 @@ public class FormatTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public FormatTests(jOOQAbstractTest delegate) { + public FormatTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/FunctionTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/FunctionTests.java index 2b62f4d9f4..690f143ad6 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/FunctionTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/FunctionTests.java @@ -158,13 +158,12 @@ public class FunctionTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public FunctionTests(jOOQAbstractTest delegate) { + public FunctionTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/GeneralTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/GeneralTests.java index 22a75a1838..4f32066e5e 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/GeneralTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/GeneralTests.java @@ -63,7 +63,6 @@ import static org.jooq.impl.Factory.trim; import static org.jooq.impl.Factory.two; import static org.jooq.impl.Factory.val; import static org.jooq.impl.Factory.zero; -import static org.jooq.tools.reflect.Reflect.on; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -115,13 +114,12 @@ public class GeneralTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public GeneralTests(jOOQAbstractTest delegate) { + public GeneralTests(jOOQAbstractTest delegate) { super(delegate); } @@ -734,7 +732,6 @@ extends BaseTest)TBook_LANGUAGE_ID(), on(TBook_LANGUAGE_ID().getDataType().getType()).get("en")) + .set(TBook_LANGUAGE_ID(), 1) .set(TBook_CONTENT_TEXT(), "Design Patterns are awesome") .set(TBook_TITLE(), "Design Patterns"), @@ -766,7 +763,6 @@ extends BaseTest)TBook_LANGUAGE_ID(), on(TBook_LANGUAGE_ID().getDataType().getType()).get("en")); + b1.setValue(TBook_LANGUAGE_ID(), 1); int[] result1 = create().batchStore(a1, b1, a2).execute(); assertEquals(3, result1.length); diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/GroupByTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/GroupByTests.java index ae9f349011..7fe2156620 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/GroupByTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/GroupByTests.java @@ -77,13 +77,12 @@ public class GroupByTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public GroupByTests(jOOQAbstractTest delegate) { + public GroupByTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/InsertUpdateTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/InsertUpdateTests.java index dc59f89678..131132857c 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/InsertUpdateTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/InsertUpdateTests.java @@ -94,13 +94,12 @@ public class InsertUpdateTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public InsertUpdateTests(jOOQAbstractTest delegate) { + public InsertUpdateTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/JoinTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/JoinTests.java index 75d107ff0e..c637ef79f6 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/JoinTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/JoinTests.java @@ -87,13 +87,12 @@ public class JoinTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public JoinTests(jOOQAbstractTest delegate) { + public JoinTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/LoaderTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/LoaderTests.java index 88acdf8463..42649a70b0 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/LoaderTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/LoaderTests.java @@ -70,13 +70,12 @@ public class LoaderTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public LoaderTests(jOOQAbstractTest delegate) { + public LoaderTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/OrderByTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/OrderByTests.java index 73be90f998..5e2eeff2eb 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/OrderByTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/OrderByTests.java @@ -82,13 +82,12 @@ public class OrderByTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public OrderByTests(jOOQAbstractTest delegate) { + public OrderByTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/PlainSQLTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/PlainSQLTests.java index c8831fba39..556c80945a 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/PlainSQLTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/PlainSQLTests.java @@ -97,13 +97,12 @@ public class PlainSQLTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public PlainSQLTests(jOOQAbstractTest delegate) { + public PlainSQLTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/PredicateTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/PredicateTests.java index 8778dae2bb..cc197da8bd 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/PredicateTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/PredicateTests.java @@ -50,7 +50,6 @@ import static org.jooq.impl.Factory.lower; import static org.jooq.impl.Factory.trueCondition; import static org.jooq.impl.Factory.upper; import static org.jooq.impl.Factory.val; -import static org.jooq.tools.reflect.Reflect.on; import java.util.ArrayList; import java.util.Arrays; @@ -85,13 +84,12 @@ public class PredicateTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public PredicateTests(jOOQAbstractTest delegate) { + public PredicateTests(jOOQAbstractTest delegate) { super(delegate); } @@ -183,7 +181,7 @@ extends BaseTest) TBook_LANGUAGE_ID(), on(TBook_LANGUAGE_ID().getDataType().getType()).get("en")) + .set(TBook_LANGUAGE_ID(), 1) .set(TBook_TITLE(), "About percentages (%) and underscores (_), a critical review! Check exclamation marks, too!") .execute()); diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/RecordTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/RecordTests.java index 634d4ae8e3..5b6fe6254e 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/RecordTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/RecordTests.java @@ -62,13 +62,12 @@ public class RecordTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public RecordTests(jOOQAbstractTest delegate) { + public RecordTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/RenderAndBindTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/RenderAndBindTests.java index 71a7934209..1ebb039f64 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/RenderAndBindTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/RenderAndBindTests.java @@ -91,13 +91,12 @@ public class RenderAndBindTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public RenderAndBindTests(jOOQAbstractTest delegate) { + public RenderAndBindTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/ResultTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/ResultTests.java index de21ce97ee..4c208ecf3b 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/ResultTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/ResultTests.java @@ -65,13 +65,12 @@ public class ResultTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public ResultTests(jOOQAbstractTest delegate) { + public ResultTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/RoutineAndUDTTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/RoutineAndUDTTests.java index 64b38ff2e6..99fec7b726 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/RoutineAndUDTTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/RoutineAndUDTTests.java @@ -84,13 +84,12 @@ public class RoutineAndUDTTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public RoutineAndUDTTests(jOOQAbstractTest delegate) { + public RoutineAndUDTTests(jOOQAbstractTest delegate) { super(delegate); } @Test diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/RowValueExpressionTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/RowValueExpressionTests.java index 400c588c2a..584321353e 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/RowValueExpressionTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/RowValueExpressionTests.java @@ -78,13 +78,12 @@ public class RowValueExpressionTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public RowValueExpressionTests(jOOQAbstractTest delegate) { + public RowValueExpressionTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/SchemaAndMappingTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/SchemaAndMappingTests.java index 88bd7ab590..a1d90e6b76 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/SchemaAndMappingTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/SchemaAndMappingTests.java @@ -59,8 +59,8 @@ import org.jooq.conf.RenderMapping; import org.jooq.conf.Settings; import org.jooq.impl.Factory; import org.jooq.test.BaseTest; -import org.jooq.test.jOOQAbstractTest; import org.jooq.test.MySQLTestSchemaRewrite; +import org.jooq.test.jOOQAbstractTest; import org.junit.Test; @@ -80,13 +80,12 @@ public class SchemaAndMappingTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public SchemaAndMappingTests(jOOQAbstractTest delegate) { + public SchemaAndMappingTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/SelectTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/SelectTests.java index f10475231f..3af11f5bc5 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/SelectTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/SelectTests.java @@ -76,13 +76,12 @@ public class SelectTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public SelectTests(jOOQAbstractTest delegate) { + public SelectTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/StatementTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/StatementTests.java index 2f6b579d2c..3ff5de9cf3 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/StatementTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/StatementTests.java @@ -81,13 +81,12 @@ public class StatementTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public StatementTests(jOOQAbstractTest delegate) { + public StatementTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/Template.java b/jOOQ-test/src/org/jooq/test/_/testcases/Template.java index d507772667..c1ca62c2fd 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/Template.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/Template.java @@ -56,13 +56,12 @@ public class Template< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public Template(jOOQAbstractTest delegate) { + public Template(jOOQAbstractTest delegate) { super(delegate); } } diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/ThreadSafetyTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/ThreadSafetyTests.java index 19f910e9ec..704cef8107 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/ThreadSafetyTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/ThreadSafetyTests.java @@ -61,13 +61,12 @@ public class ThreadSafetyTests< U extends TableRecord, I extends TableRecord, IPK extends UpdatableRecord, - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> -extends BaseTest { +extends BaseTest { - public ThreadSafetyTests(jOOQAbstractTest delegate) { + public ThreadSafetyTests(jOOQAbstractTest delegate) { super(delegate); } diff --git a/jOOQ-test/src/org/jooq/test/ase/create.sql b/jOOQ-test/src/org/jooq/test/ase/create.sql index aec986df02..216ad300ec 100644 --- a/jOOQ-test/src/org/jooq/test/ase/create.sql +++ b/jOOQ-test/src/org/jooq/test/ase/create.sql @@ -29,13 +29,6 @@ DROP TABLE t_986_1/ DROP TABLE t_986_2/ DROP TABLE x_unused/ DROP TABLE t_639_numbers_table/ -DROP TABLE t_658_ref/ -DROP TABLE t_658_11/ -DROP TABLE t_658_21/ -DROP TABLE t_658_31/ -DROP TABLE t_658_12/ -DROP TABLE t_658_22/ -DROP TABLE t_658_32/ DROP TABLE t_725_lob_test/ DROP TABLE t_785/ DROP TABLE t_booleans/ @@ -110,68 +103,6 @@ CREATE TABLE t_language ( ) / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ - CREATE TABLE t_725_lob_test ( id int NOT NULL, lob VARBINARY(500) NULL, diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Dbo.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Dbo.java index 16f57f1416..f1e89d2021 100644 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Dbo.java +++ b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Dbo.java @@ -9,7 +9,7 @@ package org.jooq.test.ase.generatedclasses; @java.lang.SuppressWarnings("all") public class Dbo extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -1906190113; + private static final long serialVersionUID = -79967263; /** * The singleton instance of dbo @@ -30,7 +30,6 @@ public class Dbo extends org.jooq.impl.SchemaImpl { org.jooq.test.ase.generatedclasses.tables.VBook.V_BOOK, org.jooq.test.ase.generatedclasses.tables.VLibrary.V_LIBRARY, org.jooq.test.ase.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.ase.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.ase.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.ase.generatedclasses.tables.T_785.T_785, org.jooq.test.ase.generatedclasses.tables.T_986_1.T_986_1, @@ -43,6 +42,7 @@ public class Dbo extends org.jooq.impl.SchemaImpl { org.jooq.test.ase.generatedclasses.tables.TDates.T_DATES, org.jooq.test.ase.generatedclasses.tables.TIdentity.T_IDENTITY, org.jooq.test.ase.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.ase.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.ase.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.ase.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.ase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Keys.java index 82ec9f0e97..2b086ec994 100644 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Keys.java @@ -29,6 +29,7 @@ public class Keys { public static final org.jooq.UniqueKey T_BOOLEANS__PK_T_BOOLEANS = UniqueKeys0.T_BOOLEANS__PK_T_BOOLEANS; public static final org.jooq.UniqueKey T_DATES__PK_T_DATES = UniqueKeys0.T_DATES__PK_T_DATES; public static final org.jooq.UniqueKey T_IDENTITY_PK__PK_T_IDENTITY_PK = UniqueKeys0.T_IDENTITY_PK__PK_T_IDENTITY_PK; + public static final org.jooq.UniqueKey T_LANGUAGE__PK_T_LANGUAGE = UniqueKeys0.T_LANGUAGE__PK_T_LANGUAGE; public static final org.jooq.UniqueKey T_TRIGGERS__PK_T_TRIGGERS = UniqueKeys0.T_TRIGGERS__PK_T_TRIGGERS; public static final org.jooq.UniqueKey X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69 = UniqueKeys0.X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey X_TEST_CASE_71__PK_X_TEST_CASE_71 = UniqueKeys0.X_TEST_CASE_71__PK_X_TEST_CASE_71; @@ -39,6 +40,7 @@ public class Keys { // FOREIGN KEY definitions public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_AUTHOR_ID; public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID; + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID; public static final org.jooq.ForeignKey X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A = ForeignKeys0.X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A; @@ -71,6 +73,7 @@ public class Keys { public static final org.jooq.UniqueKey T_BOOLEANS__PK_T_BOOLEANS = createUniqueKey(org.jooq.test.ase.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.ase.generatedclasses.tables.TBooleans.ID); public static final org.jooq.UniqueKey T_DATES__PK_T_DATES = createUniqueKey(org.jooq.test.ase.generatedclasses.tables.TDates.T_DATES, org.jooq.test.ase.generatedclasses.tables.TDates.ID); public static final org.jooq.UniqueKey T_IDENTITY_PK__PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.ase.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.ase.generatedclasses.tables.TIdentityPk.ID); + public static final org.jooq.UniqueKey T_LANGUAGE__PK_T_LANGUAGE = createUniqueKey(org.jooq.test.ase.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.ase.generatedclasses.tables.TLanguage.ID); public static final org.jooq.UniqueKey T_TRIGGERS__PK_T_TRIGGERS = createUniqueKey(org.jooq.test.ase.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.ase.generatedclasses.tables.TTriggers.ID_GENERATED); public static final org.jooq.UniqueKey X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.ase.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.ase.generatedclasses.tables.XTestCase_64_69.ID); public static final org.jooq.UniqueKey X_TEST_CASE_71__PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.ase.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.ase.generatedclasses.tables.XTestCase_71.ID); @@ -83,6 +86,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.ase.generatedclasses.Keys.T_AUTHOR__PK_T_AUTHOR, org.jooq.test.ase.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.ase.generatedclasses.tables.TBook.AUTHOR_ID); public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.ase.generatedclasses.Keys.T_AUTHOR__PK_T_AUTHOR, org.jooq.test.ase.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.ase.generatedclasses.tables.TBook.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.ase.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE, org.jooq.test.ase.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.ase.generatedclasses.tables.TBook.LANGUAGE_ID); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.ase.generatedclasses.Keys.T_BOOK_STORE__UK_T_BOOK_STORE_NAME, org.jooq.test.ase.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.ase.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = createForeignKey(org.jooq.test.ase.generatedclasses.Keys.T_BOOK__PK_T_BOOK, org.jooq.test.ase.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.ase.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.ForeignKey X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A = createForeignKey(org.jooq.test.ase.generatedclasses.Keys.X_UNUSED__UK_X_UNUSED_ID, org.jooq.test.ase.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.ase.generatedclasses.tables.XTestCase_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Tables.java index cd239d7dd1..540b0f0815 100644 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/Tables.java @@ -31,11 +31,6 @@ public final class Tables { */ public static final org.jooq.test.ase.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.ase.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table dbo.t_658_ref - */ - public static final org.jooq.test.ase.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.ase.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table dbo.t_725_lob_test */ @@ -96,6 +91,11 @@ public final class Tables { */ public static final org.jooq.test.ase.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.ase.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * The table dbo.t_language + */ + public static final org.jooq.test.ase.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.ase.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table dbo.t_triggers */ diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 4b88648974..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_language.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column dbo.t_language.cd - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column dbo.t_language.description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 6a8e6fcd1c..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_12.java deleted file mode 100644 index b8dd04b9b5..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column dbo.t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_21.java deleted file mode 100644 index f034db2e8f..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 00d2cb03d0..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column dbo.t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_31.java deleted file mode 100644 index 802a7c017a..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_32.java deleted file mode 100644 index b42844d6b3..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column dbo.t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/TBook.java index f77c686858..a1a88aba83 100644 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.ase.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 321938034; + private static final long serialVersionUID = -183336563; /** * The singleton instance of dbo.t_book @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public static final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.ase.generatedclasses.enums.TLanguage.class), T_BOOK); + public static final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER, T_BOOK); /** * The table column dbo.t_book.content_text @@ -110,6 +110,6 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.ase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.ase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.ase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.ase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.ase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_LANGUAGE_ID); } } diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..cd2b39497d --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/TLanguage.java @@ -0,0 +1,66 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.ase.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 213528451; + + /** + * The singleton instance of dbo.t_language + */ + public static final org.jooq.test.ase.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.ase.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.ase.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column dbo.t_language.cd + */ + public static final org.jooq.TableField CD = createField("cd", org.jooq.impl.SQLDataType.CHAR, T_LANGUAGE); + + /** + * The table column dbo.t_language.description + */ + public static final org.jooq.TableField DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column dbo.t_language.description_english + */ + public static final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column dbo.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public static final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, T_LANGUAGE); + + /** + * No further instances allowed + */ + private TLanguage() { + super("t_language", org.jooq.test.ase.generatedclasses.Dbo.DBO); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.ase.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.ase.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 8e2eaa1988..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = -1680682817; - - /** - * The singleton instance of dbo.t_658_ref - */ - public static final org.jooq.test.ase.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.ase.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.ase.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column dbo.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES dbo.t_658_11 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.ase.generatedclasses.enums.T_658_11.class), T_658_REF); - - /** - * The table column dbo.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES dbo.t_658_21 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.ase.generatedclasses.enums.T_658_21.class), T_658_REF); - - /** - * The table column dbo.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES dbo.t_658_31 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.ase.generatedclasses.enums.T_658_31.class), T_658_REF); - - /** - * The table column dbo.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES dbo.t_658_12 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.ase.generatedclasses.enums.T_658_12.class), T_658_REF); - - /** - * The table column dbo.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES dbo.t_658_22 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.ase.generatedclasses.enums.T_658_22.class), T_658_REF); - - /** - * The table column dbo.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES dbo.t_658_32 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.ase.generatedclasses.enums.T_658_32.class), T_658_REF); - - /** - * No further instances allowed - */ - private T_658Ref() { - super("t_658_ref", org.jooq.test.ase.generatedclasses.Dbo.DBO); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/TBookRecord.java index f26da35147..a6d86007a2 100644 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/TBookRecord.java @@ -9,7 +9,7 @@ package org.jooq.test.ase.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -586852048; + private static final long serialVersionUID = 200998395; /** * The table column dbo.t_book.id @@ -202,7 +202,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.ase.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.ase.generatedclasses.tables.TBook.LANGUAGE_ID, value); } @@ -215,10 +215,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.ase.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.ase.generatedclasses.tables.TBook.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.ase.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.ase.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.ase.generatedclasses.tables.TBook.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.ase.generatedclasses.tables.TBook.LANGUAGE_ID, value.getValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.ID)); + } + } + + /** + * The table column dbo.t_book.language_id + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT t_book__fk_t_book_language_id
+	 * FOREIGN KEY (language_id)
+	 * REFERENCES dbo.t_language (id)
+	 * 
+ */ + public org.jooq.test.ase.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.ase.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.ase.generatedclasses.tables.TLanguage.ID.equal(getValue(org.jooq.test.ase.generatedclasses.tables.TBook.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column dbo.t_book.content_text */ diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..1adf8cbde2 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,92 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.ase.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = 381731671; + + /** + * The table column dbo.t_language.cd + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.CD, value); + } + + /** + * The table column dbo.t_language.cd + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.CD); + } + + /** + * The table column dbo.t_language.description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.DESCRIPTION, value); + } + + /** + * The table column dbo.t_language.description + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.DESCRIPTION); + } + + /** + * The table column dbo.t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column dbo.t_language.description_english + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH); + } + + /** + * The table column dbo.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.ID, value); + } + + /** + * The table column dbo.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.ID); + } + + /** + * The table column dbo.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.ase.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.ase.generatedclasses.tables.TBook.LANGUAGE_ID.equal(getValue(org.jooq.test.ase.generatedclasses.tables.TLanguage.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.ase.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index 866c0ce825..0000000000 --- a/jOOQ-test/src/org/jooq/test/ase/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ase.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -969101341; - - /** - * The table column dbo.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES dbo.t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.ase.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_11, value); - } - - /** - * The table column dbo.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES dbo.t_658_11 (id)
-	 * 
- */ - public org.jooq.test.ase.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_11); - } - - /** - * The table column dbo.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES dbo.t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.ase.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_21, value); - } - - /** - * The table column dbo.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES dbo.t_658_21 (id)
-	 * 
- */ - public org.jooq.test.ase.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_21); - } - - /** - * The table column dbo.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES dbo.t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.ase.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_31, value); - } - - /** - * The table column dbo.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES dbo.t_658_31 (id)
-	 * 
- */ - public org.jooq.test.ase.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_31); - } - - /** - * The table column dbo.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES dbo.t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.ase.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_12, value); - } - - /** - * The table column dbo.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES dbo.t_658_12 (id)
-	 * 
- */ - public org.jooq.test.ase.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_12); - } - - /** - * The table column dbo.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES dbo.t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.ase.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_22, value); - } - - /** - * The table column dbo.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES dbo.t_658_22 (id)
-	 * 
- */ - public org.jooq.test.ase.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_22); - } - - /** - * The table column dbo.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES dbo.t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.ase.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_32, value); - } - - /** - * The table column dbo.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES dbo.t_658_32 (id)
-	 * 
- */ - public org.jooq.test.ase.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.ase.generatedclasses.tables.T_658Ref.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.ase.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/ase/reset.sql b/jOOQ-test/src/org/jooq/test/ase/reset.sql index 8deeb7d45f..ab03d49d7c 100644 --- a/jOOQ-test/src/org/jooq/test/ase/reset.sql +++ b/jOOQ-test/src/org/jooq/test/ase/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ DELETE FROM t_book/ @@ -23,26 +16,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A')/ -INSERT INTO t_658_11 VALUES ('B')/ -INSERT INTO t_658_11 VALUES ('C')/ -INSERT INTO t_658_21 VALUES (1)/ -INSERT INTO t_658_21 VALUES (2)/ -INSERT INTO t_658_21 VALUES (3)/ -INSERT INTO t_658_31 VALUES (1)/ -INSERT INTO t_658_31 VALUES (2)/ -INSERT INTO t_658_31 VALUES (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A')/ -INSERT INTO t_658_12 VALUES ('B', 'B')/ -INSERT INTO t_658_12 VALUES ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1)/ -INSERT INTO t_658_22 VALUES (2, 2)/ -INSERT INTO t_658_22 VALUES (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1)/ -INSERT INTO t_658_32 VALUES (2, 2)/ -INSERT INTO t_658_32 VALUES (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author VALUES (1, 'George', 'Orwell', '1903-06-25', 1903, null)/ INSERT INTO t_author VALUES (2, 'Paulo', 'Coelho', '1947-08-24', 1947, null)/ INSERT INTO t_book VALUES (1, 1, null, null, '1984', 1948, 1, 'To know and not to know, to be conscious of complete truthfulness while telling carefully constructed lies, to hold simultaneously two opinions which cancelled out, knowing them to be contradictory and believing in both of them, to use logic against logic, to repudiate morality while laying claim to it, to believe that democracy was impossible and that the Party was the guardian of democracy, to forget, whatever it was necessary to forget, then to draw it back into memory again at the moment when it was needed, and then promptly to forget it again, and above all, to apply the same process to the process itself -- that was the ultimate subtlety; consciously to induce unconsciousness, and then, once again, to become unconscious of the act of hypnosis you had just performed. Even to understand the word ''doublethink'' involved the use of doublethink..', null)/ diff --git a/jOOQ-test/src/org/jooq/test/cubrid/create.sql b/jOOQ-test/src/org/jooq/test/cubrid/create.sql index f5e4a7c749..62e8dec16b 100644 --- a/jOOQ-test/src/org/jooq/test/cubrid/create.sql +++ b/jOOQ-test/src/org/jooq/test/cubrid/create.sql @@ -20,13 +20,6 @@ DROP TABLE t_986_1/ DROP TABLE t_986_2/ DROP TABLE x_unused/ DROP TABLE t_639_numbers_table/ -DROP TABLE t_658_ref/ -DROP TABLE t_658_11/ -DROP TABLE t_658_21/ -DROP TABLE t_658_31/ -DROP TABLE t_658_12/ -DROP TABLE t_658_22/ -DROP TABLE t_658_32/ DROP TABLE t_725_lob_test/ DROP TABLE t_785/ DROP TABLE t_booleans/ @@ -113,68 +106,6 @@ CREATE TABLE t_language ( ) / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ - CREATE TABLE t_725_lob_test ( id int NOT NULL, lob BLOB NULL, diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Dba.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Dba.java index 72e21f4433..23edbd8981 100644 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Dba.java +++ b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Dba.java @@ -9,7 +9,7 @@ package org.jooq.test.cubrid.generatedclasses; @java.lang.SuppressWarnings("all") public class Dba extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -1642764678; + private static final long serialVersionUID = 974700682; /** * The singleton instance of DBA @@ -36,7 +36,6 @@ public class Dba extends org.jooq.impl.SchemaImpl { public final java.util.List> getTables() { return java.util.Arrays.>asList( org.jooq.test.cubrid.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.cubrid.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.cubrid.generatedclasses.tables.T_785.T_785, org.jooq.test.cubrid.generatedclasses.tables.T_986_1.T_986_1, @@ -50,6 +49,7 @@ public class Dba extends org.jooq.impl.SchemaImpl { org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY, org.jooq.test.cubrid.generatedclasses.tables.TIdentity.T_IDENTITY, org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.cubrid.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.cubrid.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.cubrid.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.cubrid.generatedclasses.tables.VBook.V_BOOK, diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Keys.java index c6ad8d7a5e..1452c8f31b 100644 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Keys.java @@ -30,6 +30,7 @@ public class Keys { public static final org.jooq.UniqueKey T_DATES__PK_T_DATES = UniqueKeys0.T_DATES__PK_T_DATES; public static final org.jooq.UniqueKey T_DIRECTORY__PK_T_DIRECTORY = UniqueKeys0.T_DIRECTORY__PK_T_DIRECTORY; public static final org.jooq.UniqueKey T_IDENTITY_PK__PK_T_IDENTITY_PK = UniqueKeys0.T_IDENTITY_PK__PK_T_IDENTITY_PK; + public static final org.jooq.UniqueKey T_LANGUAGE__PK_T_LANGUAGE = UniqueKeys0.T_LANGUAGE__PK_T_LANGUAGE; public static final org.jooq.UniqueKey T_TRIGGERS__PK_T_TRIGGERS = UniqueKeys0.T_TRIGGERS__PK_T_TRIGGERS; public static final org.jooq.UniqueKey X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69 = UniqueKeys0.X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey X_TEST_CASE_71__PK_X_TEST_CASE_71 = UniqueKeys0.X_TEST_CASE_71__PK_X_TEST_CASE_71; @@ -40,6 +41,7 @@ public class Keys { // FOREIGN KEY definitions public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_AUTHOR_ID; public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID; + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID; public static final org.jooq.ForeignKey T_DIRECTORY__PK_T_DIRECTORY_SELF = ForeignKeys0.T_DIRECTORY__PK_T_DIRECTORY_SELF; @@ -73,6 +75,7 @@ public class Keys { public static final org.jooq.UniqueKey T_DATES__PK_T_DATES = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TDates.T_DATES, org.jooq.test.cubrid.generatedclasses.tables.TDates.ID); public static final org.jooq.UniqueKey T_DIRECTORY__PK_T_DIRECTORY = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY, org.jooq.test.cubrid.generatedclasses.tables.TDirectory.ID); public static final org.jooq.UniqueKey T_IDENTITY_PK__PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk.ID); + public static final org.jooq.UniqueKey T_LANGUAGE__PK_T_LANGUAGE = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.cubrid.generatedclasses.tables.TLanguage.ID); public static final org.jooq.UniqueKey T_TRIGGERS__PK_T_TRIGGERS = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.cubrid.generatedclasses.tables.TTriggers.ID_GENERATED); public static final org.jooq.UniqueKey X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.cubrid.generatedclasses.tables.XTestCase_64_69.ID); public static final org.jooq.UniqueKey X_TEST_CASE_71__PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.cubrid.generatedclasses.tables.XTestCase_71.ID); @@ -85,6 +88,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.cubrid.generatedclasses.Keys.T_AUTHOR__PK_T_AUTHOR, org.jooq.test.cubrid.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.cubrid.generatedclasses.tables.TBook.AUTHOR_ID); public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.cubrid.generatedclasses.Keys.T_AUTHOR__PK_T_AUTHOR, org.jooq.test.cubrid.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.cubrid.generatedclasses.tables.TBook.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.cubrid.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE, org.jooq.test.cubrid.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.cubrid.generatedclasses.tables.TBook.LANGUAGE_ID); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.cubrid.generatedclasses.Keys.T_BOOK_STORE__UK_T_BOOK_STORE_NAME, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = createForeignKey(org.jooq.test.cubrid.generatedclasses.Keys.T_BOOK__PK_T_BOOK, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.ForeignKey T_DIRECTORY__PK_T_DIRECTORY_SELF = createForeignKey(org.jooq.test.cubrid.generatedclasses.Keys.T_DIRECTORY__PK_T_DIRECTORY, org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY, org.jooq.test.cubrid.generatedclasses.tables.TDirectory.PARENT_ID); diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Tables.java index cdd2dee2a3..fc10dd09e5 100644 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.cubrid.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.cubrid.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table DBA.t_658_ref - */ - public static final org.jooq.test.cubrid.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table DBA.t_725_lob_test */ @@ -86,6 +81,11 @@ public final class Tables { */ public static final org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * The table DBA.t_language + */ + public static final org.jooq.test.cubrid.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.cubrid.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table DBA.t_triggers */ diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 635c999753..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_language.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column DBA.t_language.cd - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column DBA.t_language.description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 7802bd544e..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_12.java deleted file mode 100644 index 9fec130a14..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column DBA.t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 39bb03a7d0..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_22.java deleted file mode 100644 index ba74bb543b..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column DBA.t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_31.java deleted file mode 100644 index a25301089a..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_32.java deleted file mode 100644 index baba3605b4..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column DBA.t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/TBook.java index 3722eb6ea3..4ef14ea446 100644 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.cubrid.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 1893239715; + private static final long serialVersionUID = -1387123146; /** * The singleton instance of DBA.t_book @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public static final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.cubrid.generatedclasses.enums.TLanguage.class), T_BOOK); + public static final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER, T_BOOK); /** * The table column DBA.t_book.content_text @@ -110,6 +110,6 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.cubrid.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.cubrid.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.cubrid.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.cubrid.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.cubrid.generatedclasses.Keys.T_BOOK__FK_T_BOOK_LANGUAGE_ID); } } diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..3c22173f08 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/TLanguage.java @@ -0,0 +1,66 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.cubrid.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = -1264240133; + + /** + * The singleton instance of DBA.t_language + */ + public static final org.jooq.test.cubrid.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.cubrid.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.cubrid.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column DBA.t_language.cd + */ + public static final org.jooq.TableField CD = createField("cd", org.jooq.impl.SQLDataType.CHAR, T_LANGUAGE); + + /** + * The table column DBA.t_language.description + */ + public static final org.jooq.TableField DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column DBA.t_language.description_english + */ + public static final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column DBA.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public static final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, T_LANGUAGE); + + /** + * No further instances allowed + */ + private TLanguage() { + super("t_language", org.jooq.test.cubrid.generatedclasses.Dba.DBA); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.cubrid.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.cubrid.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 7924d9e3e3..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = -1463598011; - - /** - * The singleton instance of DBA.t_658_ref - */ - public static final org.jooq.test.cubrid.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.cubrid.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.cubrid.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column DBA.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES DBA.t_658_11 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.cubrid.generatedclasses.enums.T_658_11.class), T_658_REF); - - /** - * The table column DBA.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES DBA.t_658_21 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.cubrid.generatedclasses.enums.T_658_21.class), T_658_REF); - - /** - * The table column DBA.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES DBA.t_658_31 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.cubrid.generatedclasses.enums.T_658_31.class), T_658_REF); - - /** - * The table column DBA.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES DBA.t_658_12 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.cubrid.generatedclasses.enums.T_658_12.class), T_658_REF); - - /** - * The table column DBA.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES DBA.t_658_22 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.cubrid.generatedclasses.enums.T_658_22.class), T_658_REF); - - /** - * The table column DBA.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES DBA.t_658_32 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.cubrid.generatedclasses.enums.T_658_32.class), T_658_REF); - - /** - * No further instances allowed - */ - private T_658Ref() { - super("t_658_ref", org.jooq.test.cubrid.generatedclasses.Dba.DBA); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/TBookRecord.java index a324d85b89..be20031214 100644 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/TBookRecord.java @@ -9,7 +9,7 @@ package org.jooq.test.cubrid.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 1575187844; + private static final long serialVersionUID = 631633661; /** * The table column DBA.t_book.id @@ -202,7 +202,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.cubrid.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.cubrid.generatedclasses.tables.TBook.LANGUAGE_ID, value); } @@ -215,10 +215,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.cubrid.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.cubrid.generatedclasses.tables.TBook.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.cubrid.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.cubrid.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.cubrid.generatedclasses.tables.TBook.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.cubrid.generatedclasses.tables.TBook.LANGUAGE_ID, value.getValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.ID)); + } + } + + /** + * The table column DBA.t_book.language_id + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT t_book__fk_t_book_language_id
+	 * FOREIGN KEY (language_id)
+	 * REFERENCES DBA.t_language (id)
+	 * 
+ */ + public org.jooq.test.cubrid.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.ID.equal(getValue(org.jooq.test.cubrid.generatedclasses.tables.TBook.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column DBA.t_book.content_text */ diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..751542ccf9 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,92 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.cubrid.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = -1623287907; + + /** + * The table column DBA.t_language.cd + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.CD, value); + } + + /** + * The table column DBA.t_language.cd + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.CD); + } + + /** + * The table column DBA.t_language.description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.DESCRIPTION, value); + } + + /** + * The table column DBA.t_language.description + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.DESCRIPTION); + } + + /** + * The table column DBA.t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column DBA.t_language.description_english + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH); + } + + /** + * The table column DBA.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.ID, value); + } + + /** + * The table column DBA.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.ID); + } + + /** + * The table column DBA.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.cubrid.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.cubrid.generatedclasses.tables.TBook.LANGUAGE_ID.equal(getValue(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.cubrid.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index 70a7edbbc3..0000000000 --- a/jOOQ-test/src/org/jooq/test/cubrid/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.cubrid.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -1348341785; - - /** - * The table column DBA.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES DBA.t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.cubrid.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_11, value); - } - - /** - * The table column DBA.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES DBA.t_658_11 (id)
-	 * 
- */ - public org.jooq.test.cubrid.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_11); - } - - /** - * The table column DBA.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES DBA.t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.cubrid.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_21, value); - } - - /** - * The table column DBA.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES DBA.t_658_21 (id)
-	 * 
- */ - public org.jooq.test.cubrid.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_21); - } - - /** - * The table column DBA.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES DBA.t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.cubrid.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_31, value); - } - - /** - * The table column DBA.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES DBA.t_658_31 (id)
-	 * 
- */ - public org.jooq.test.cubrid.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_31); - } - - /** - * The table column DBA.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES DBA.t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.cubrid.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_12, value); - } - - /** - * The table column DBA.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES DBA.t_658_12 (id)
-	 * 
- */ - public org.jooq.test.cubrid.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_12); - } - - /** - * The table column DBA.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES DBA.t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.cubrid.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_22, value); - } - - /** - * The table column DBA.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES DBA.t_658_22 (id)
-	 * 
- */ - public org.jooq.test.cubrid.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_22); - } - - /** - * The table column DBA.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES DBA.t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.cubrid.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_32, value); - } - - /** - * The table column DBA.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES DBA.t_658_32 (id)
-	 * 
- */ - public org.jooq.test.cubrid.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.cubrid.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/cubrid/reset.sql b/jOOQ-test/src/org/jooq/test/cubrid/reset.sql index e6e8f3603b..b2dda55e06 100644 --- a/jOOQ-test/src/org/jooq/test/cubrid/reset.sql +++ b/jOOQ-test/src/org/jooq/test/cubrid/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ DELETE FROM t_book/ @@ -27,26 +20,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A')/ -INSERT INTO t_658_11 VALUES ('B')/ -INSERT INTO t_658_11 VALUES ('C')/ -INSERT INTO t_658_21 VALUES (1)/ -INSERT INTO t_658_21 VALUES (2)/ -INSERT INTO t_658_21 VALUES (3)/ -INSERT INTO t_658_31 VALUES (1)/ -INSERT INTO t_658_31 VALUES (2)/ -INSERT INTO t_658_31 VALUES (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A')/ -INSERT INTO t_658_12 VALUES ('B', 'B')/ -INSERT INTO t_658_12 VALUES ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1)/ -INSERT INTO t_658_22 VALUES (2, 2)/ -INSERT INTO t_658_22 VALUES (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1)/ -INSERT INTO t_658_32 VALUES (2, 2)/ -INSERT INTO t_658_32 VALUES (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author VALUES (s_author_id.NEXT_VALUE, 'George', 'Orwell', '1903-06-25', 1903, null)/ INSERT INTO t_author VALUES (s_author_id.NEXT_VALUE, 'Paulo', 'Coelho', '1947-08-24', 1947, null)/ INSERT INTO t_book VALUES (1, 1, null, null, '1984', 1948, 1, 'To know and not to know, to be conscious of complete truthfulness while telling carefully constructed lies, to hold simultaneously two opinions which cancelled out, knowing them to be contradictory and believing in both of them, to use logic against logic, to repudiate morality while laying claim to it, to believe that democracy was impossible and that the Party was the guardian of democracy, to forget, whatever it was necessary to forget, then to draw it back into memory again at the moment when it was needed, and then promptly to forget it again, and above all, to apply the same process to the process itself -- that was the ultimate subtlety; consciously to induce unconsciousness, and then, once again, to become unconscious of the act of hypnosis you had just performed. Even to understand the word ''doublethink'' involved the use of doublethink..', null)/ diff --git a/jOOQ-test/src/org/jooq/test/db2/create.sql b/jOOQ-test/src/org/jooq/test/db2/create.sql index ad1f5216cc..04652bc528 100644 --- a/jOOQ-test/src/org/jooq/test/db2/create.sql +++ b/jOOQ-test/src/org/jooq/test/db2/create.sql @@ -31,13 +31,6 @@ DROP TABLE t_986_1/ DROP TABLE t_986_2/ DROP TABLE x_unused/ DROP TABLE t_639_numbers_table/ -DROP TABLE t_658_ref/ -DROP TABLE t_658_11/ -DROP TABLE t_658_21/ -DROP TABLE t_658_31/ -DROP TABLE t_658_12/ -DROP TABLE t_658_22/ -DROP TABLE t_658_32/ DROP TABLE t_725_lob_test/ DROP TABLE t_785/ DROP TABLE t_booleans/ @@ -122,67 +115,6 @@ CREATE TABLE t_language ( ) / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Keys.java index 599e062c58..9f77b8c2e4 100644 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Keys.java @@ -28,6 +28,7 @@ public class Keys { public static final org.jooq.UniqueKey T_BOOLEANS__PK_T_BOOLEANS = UniqueKeys0.T_BOOLEANS__PK_T_BOOLEANS; public static final org.jooq.UniqueKey T_DATES__PK_T_DATES = UniqueKeys0.T_DATES__PK_T_DATES; public static final org.jooq.UniqueKey T_IDENTITY_PK__PK_T_IDENTITY_PK = UniqueKeys0.T_IDENTITY_PK__PK_T_IDENTITY_PK; + public static final org.jooq.UniqueKey T_LANGUAGE__PK_T_LANGUAGE = UniqueKeys0.T_LANGUAGE__PK_T_LANGUAGE; public static final org.jooq.UniqueKey T_TRIGGERS__PK_T_TRIGGERS = UniqueKeys0.T_TRIGGERS__PK_T_TRIGGERS; public static final org.jooq.UniqueKey X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69 = UniqueKeys0.X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey X_TEST_CASE_71__PK_X_TEST_CASE_71 = UniqueKeys0.X_TEST_CASE_71__PK_X_TEST_CASE_71; @@ -40,6 +41,7 @@ public class Keys { public static final org.jooq.ForeignKey T_986_2__FK_986 = ForeignKeys0.T_986_2__FK_986; public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_AUTHOR_ID; public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID; + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID; public static final org.jooq.ForeignKey X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A = ForeignKeys0.X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A; @@ -71,6 +73,7 @@ public class Keys { public static final org.jooq.UniqueKey T_BOOLEANS__PK_T_BOOLEANS = createUniqueKey(org.jooq.test.db2.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.db2.generatedclasses.tables.TBooleans.ID); public static final org.jooq.UniqueKey T_DATES__PK_T_DATES = createUniqueKey(org.jooq.test.db2.generatedclasses.tables.TDates.T_DATES, org.jooq.test.db2.generatedclasses.tables.TDates.ID); public static final org.jooq.UniqueKey T_IDENTITY_PK__PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.db2.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.db2.generatedclasses.tables.TIdentityPk.ID); + public static final org.jooq.UniqueKey T_LANGUAGE__PK_T_LANGUAGE = createUniqueKey(org.jooq.test.db2.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.db2.generatedclasses.tables.TLanguage.ID); public static final org.jooq.UniqueKey T_TRIGGERS__PK_T_TRIGGERS = createUniqueKey(org.jooq.test.db2.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.db2.generatedclasses.tables.TTriggers.ID_GENERATED); public static final org.jooq.UniqueKey X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.db2.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.db2.generatedclasses.tables.XTestCase_64_69.ID); public static final org.jooq.UniqueKey X_TEST_CASE_71__PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.db2.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.db2.generatedclasses.tables.XTestCase_71.ID); @@ -85,6 +88,7 @@ public class Keys { public static final org.jooq.ForeignKey T_986_2__FK_986 = createForeignKey(org.jooq.test.db2.generatedclasses.Keys.X_UNUSED__UK_X_UNUSED_ID, org.jooq.test.db2.generatedclasses.tables.T_986_2.T_986_2, org.jooq.test.db2.generatedclasses.tables.T_986_2.REF); public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.db2.generatedclasses.Keys.T_AUTHOR__PK_T_AUTHOR, org.jooq.test.db2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.db2.generatedclasses.tables.TBook.AUTHOR_ID); public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.db2.generatedclasses.Keys.T_AUTHOR__PK_T_AUTHOR, org.jooq.test.db2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.db2.generatedclasses.tables.TBook.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.db2.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE, org.jooq.test.db2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.db2.generatedclasses.tables.TBook.LANGUAGE_ID); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.db2.generatedclasses.Keys.T_BOOK_STORE__UK_T_BOOK_STORE_NAME, org.jooq.test.db2.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.db2.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = createForeignKey(org.jooq.test.db2.generatedclasses.Keys.T_BOOK__PK_T_BOOK, org.jooq.test.db2.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.db2.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.ForeignKey X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A = createForeignKey(org.jooq.test.db2.generatedclasses.Keys.X_UNUSED__UK_X_UNUSED_ID, org.jooq.test.db2.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.db2.generatedclasses.tables.XTestCase_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Lukas.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Lukas.java index 0cf6c30836..47240c30d5 100644 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Lukas.java +++ b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Lukas.java @@ -9,7 +9,7 @@ package org.jooq.test.db2.generatedclasses; @java.lang.SuppressWarnings("all") public class Lukas extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = 226476943; + private static final long serialVersionUID = -1882849565; /** * The singleton instance of LUKAS @@ -34,7 +34,6 @@ public class Lukas extends org.jooq.impl.SchemaImpl { public final java.util.List> getTables() { return java.util.Arrays.>asList( org.jooq.test.db2.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.db2.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.db2.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.db2.generatedclasses.tables.T_785.T_785, org.jooq.test.db2.generatedclasses.tables.T_986_1.T_986_1, @@ -47,6 +46,7 @@ public class Lukas extends org.jooq.impl.SchemaImpl { org.jooq.test.db2.generatedclasses.tables.TDates.T_DATES, org.jooq.test.db2.generatedclasses.tables.TIdentity.T_IDENTITY, org.jooq.test.db2.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.db2.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.db2.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.db2.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.db2.generatedclasses.tables.VBook.V_BOOK, diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Tables.java index 1412b5a0a7..c396cd7b0a 100644 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.db2.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.db2.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table LUKAS.T_658_REF - */ - public static final org.jooq.test.db2.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.db2.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table LUKAS.T_725_LOB_TEST */ @@ -81,6 +76,11 @@ public final class Tables { */ public static final org.jooq.test.db2.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.db2.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * The table LUKAS.T_LANGUAGE + */ + public static final org.jooq.test.db2.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.db2.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table LUKAS.T_TRIGGERS */ diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 4db02b9b12..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column LUKAS.T_LANGUAGE.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column LUKAS.T_LANGUAGE.CD - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column LUKAS.T_LANGUAGE.DESCRIPTION - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_11.java deleted file mode 100644 index b829ff3d9e..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column LUKAS.T_658_11.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_12.java deleted file mode 100644 index 5a2ae842ce..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column LUKAS.T_658_12.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column LUKAS.T_658_12.CD - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 223dcd0cf9..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column LUKAS.T_658_21.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 762de6599a..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column LUKAS.T_658_22.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column LUKAS.T_658_22.CD - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_31.java deleted file mode 100644 index 1e0ed598d8..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column LUKAS.T_658_31.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_32.java deleted file mode 100644 index 921675557a..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column LUKAS.T_658_32.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column LUKAS.T_658_32.CD - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/TBook.java index 100254171b..bdf581c49d 100644 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.db2.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 1715618744; + private static final long serialVersionUID = 133473674; /** * The singleton instance of LUKAS.T_BOOK @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.db2.generatedclasses.enums.TLanguage.class), T_BOOK); + public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, T_BOOK); /** * The table column LUKAS.T_BOOK.CONTENT_TEXT @@ -110,6 +110,6 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.db2.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.db2.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.db2.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.db2.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.db2.generatedclasses.Keys.T_BOOK__FK_T_BOOK_LANGUAGE_ID); } } diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..2d6b272b94 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/TLanguage.java @@ -0,0 +1,66 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.db2.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 1276023170; + + /** + * The singleton instance of LUKAS.T_LANGUAGE + */ + public static final org.jooq.test.db2.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.db2.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.db2.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column LUKAS.T_LANGUAGE.CD + */ + public static final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, T_LANGUAGE); + + /** + * The table column LUKAS.T_LANGUAGE.DESCRIPTION + */ + public static final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column LUKAS.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public static final org.jooq.TableField DESCRIPTION_ENGLISH = createField("DESCRIPTION_ENGLISH", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column LUKAS.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public static final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, T_LANGUAGE); + + /** + * No further instances allowed + */ + private TLanguage() { + super("T_LANGUAGE", org.jooq.test.db2.generatedclasses.Lukas.LUKAS); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.db2.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.db2.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index f7524c07ef..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 1884417455; - - /** - * The singleton instance of LUKAS.T_658_REF - */ - public static final org.jooq.test.db2.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.db2.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.db2.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column LUKAS.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES LUKAS.T_658_11 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_11 = createField("REF_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.db2.generatedclasses.enums.T_658_11.class), T_658_REF); - - /** - * The table column LUKAS.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES LUKAS.T_658_21 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_21 = createField("REF_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.db2.generatedclasses.enums.T_658_21.class), T_658_REF); - - /** - * The table column LUKAS.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES LUKAS.T_658_31 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_31 = createField("REF_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.db2.generatedclasses.enums.T_658_31.class), T_658_REF); - - /** - * The table column LUKAS.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES LUKAS.T_658_12 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_12 = createField("REF_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.db2.generatedclasses.enums.T_658_12.class), T_658_REF); - - /** - * The table column LUKAS.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES LUKAS.T_658_22 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_22 = createField("REF_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.db2.generatedclasses.enums.T_658_22.class), T_658_REF); - - /** - * The table column LUKAS.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES LUKAS.T_658_32 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_32 = createField("REF_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.db2.generatedclasses.enums.T_658_32.class), T_658_REF); - - /** - * No further instances allowed - */ - private T_658Ref() { - super("T_658_REF", org.jooq.test.db2.generatedclasses.Lukas.LUKAS); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/TBookRecord.java index 53a32a93e2..f421e3c504 100644 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/TBookRecord.java @@ -9,7 +9,7 @@ package org.jooq.test.db2.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -341978826; + private static final long serialVersionUID = -1122037696; /** * The table column LUKAS.T_BOOK.ID @@ -202,7 +202,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.db2.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.db2.generatedclasses.tables.TBook.LANGUAGE_ID, value); } @@ -215,10 +215,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.db2.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.db2.generatedclasses.tables.TBook.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.db2.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.db2.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.db2.generatedclasses.tables.TBook.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.db2.generatedclasses.tables.TBook.LANGUAGE_ID, value.getValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.ID)); + } + } + + /** + * The table column LUKAS.T_BOOK.LANGUAGE_ID + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT T_BOOK__FK_T_BOOK_LANGUAGE_ID
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES LUKAS.T_LANGUAGE (ID)
+	 * 
+ */ + public org.jooq.test.db2.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.db2.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.db2.generatedclasses.tables.TLanguage.ID.equal(getValue(org.jooq.test.db2.generatedclasses.tables.TBook.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column LUKAS.T_BOOK.CONTENT_TEXT */ diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..87426849b3 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,92 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.db2.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = -903105589; + + /** + * The table column LUKAS.T_LANGUAGE.CD + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.CD, value); + } + + /** + * The table column LUKAS.T_LANGUAGE.CD + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.CD); + } + + /** + * The table column LUKAS.T_LANGUAGE.DESCRIPTION + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.DESCRIPTION, value); + } + + /** + * The table column LUKAS.T_LANGUAGE.DESCRIPTION + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.DESCRIPTION); + } + + /** + * The table column LUKAS.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column LUKAS.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH); + } + + /** + * The table column LUKAS.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.ID, value); + } + + /** + * The table column LUKAS.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.ID); + } + + /** + * The table column LUKAS.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.db2.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.db2.generatedclasses.tables.TBook.LANGUAGE_ID.equal(getValue(org.jooq.test.db2.generatedclasses.tables.TLanguage.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.db2.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index 95bada2c9e..0000000000 --- a/jOOQ-test/src/org/jooq/test/db2/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.db2.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = 1081322634; - - /** - * The table column LUKAS.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES LUKAS.T_658_11 (ID)
-	 * 
- */ - public void setRef_11(org.jooq.test.db2.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_11, value); - } - - /** - * The table column LUKAS.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES LUKAS.T_658_11 (ID)
-	 * 
- */ - public org.jooq.test.db2.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_11); - } - - /** - * The table column LUKAS.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES LUKAS.T_658_21 (ID)
-	 * 
- */ - public void setRef_21(org.jooq.test.db2.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_21, value); - } - - /** - * The table column LUKAS.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES LUKAS.T_658_21 (ID)
-	 * 
- */ - public org.jooq.test.db2.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_21); - } - - /** - * The table column LUKAS.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES LUKAS.T_658_31 (ID)
-	 * 
- */ - public void setRef_31(org.jooq.test.db2.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_31, value); - } - - /** - * The table column LUKAS.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES LUKAS.T_658_31 (ID)
-	 * 
- */ - public org.jooq.test.db2.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_31); - } - - /** - * The table column LUKAS.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES LUKAS.T_658_12 (ID)
-	 * 
- */ - public void setRef_12(org.jooq.test.db2.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_12, value); - } - - /** - * The table column LUKAS.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES LUKAS.T_658_12 (ID)
-	 * 
- */ - public org.jooq.test.db2.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_12); - } - - /** - * The table column LUKAS.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES LUKAS.T_658_22 (ID)
-	 * 
- */ - public void setRef_22(org.jooq.test.db2.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_22, value); - } - - /** - * The table column LUKAS.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES LUKAS.T_658_22 (ID)
-	 * 
- */ - public org.jooq.test.db2.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_22); - } - - /** - * The table column LUKAS.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES LUKAS.T_658_32 (ID)
-	 * 
- */ - public void setRef_32(org.jooq.test.db2.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_32, value); - } - - /** - * The table column LUKAS.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT T_658_REF__FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES LUKAS.T_658_32 (ID)
-	 * 
- */ - public org.jooq.test.db2.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.db2.generatedclasses.tables.T_658Ref.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.db2.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/db2/reset.sql b/jOOQ-test/src/org/jooq/test/db2/reset.sql index e0d4fec5b4..8af0743d6d 100644 --- a/jOOQ-test/src/org/jooq/test/db2/reset.sql +++ b/jOOQ-test/src/org/jooq/test/db2/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ @@ -29,14 +22,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A'), ('B'), ('C')/ -INSERT INTO t_658_21 VALUES (1), (2), (3)/ -INSERT INTO t_658_31 VALUES (1), (2), (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A'), ('B', 'B'), ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author VALUES (s_author_id.nextval, 'George', 'Orwell', '1903-06-25', 1903, null) / INSERT INTO t_author VALUES (s_author_id.nextval, 'Paulo', 'Coelho', '1947-08-24', 1947, null) diff --git a/jOOQ-test/src/org/jooq/test/derby/create.sql b/jOOQ-test/src/org/jooq/test/derby/create.sql index 05f00fbbfa..80a320ce99 100644 --- a/jOOQ-test/src/org/jooq/test/derby/create.sql +++ b/jOOQ-test/src/org/jooq/test/derby/create.sql @@ -17,13 +17,6 @@ DROP TABLE x_test_case_64_69/ DROP TABLE x_test_case_85/ DROP TABLE x_unused/ DROP TABLE t_639_numbers_table/ -DROP TABLE t_658_ref/ -DROP TABLE t_658_11/ -DROP TABLE t_658_21/ -DROP TABLE t_658_31/ -DROP TABLE t_658_12/ -DROP TABLE t_658_22/ -DROP TABLE t_658_32/ DROP TABLE t_725_lob_test/ DROP TABLE t_785/ DROP TABLE t_booleans/ @@ -105,67 +98,6 @@ CREATE TABLE t_language ( ) / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Keys.java index 6aaad9bef7..f790d45e37 100644 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Keys.java @@ -27,6 +27,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = UniqueKeys0.PK_T_IDENTITY_PK; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = UniqueKeys0.PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = UniqueKeys0.PK_X_TEST_CASE_71; @@ -37,6 +38,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = ForeignKeys0.FK_X_TEST_CASE_64_69A; @@ -67,6 +69,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.derby.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.derby.generatedclasses.tables.TBooleans.ID); public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.derby.generatedclasses.tables.TDates.T_DATES, org.jooq.test.derby.generatedclasses.tables.TDates.ID); public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.derby.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.derby.generatedclasses.tables.TIdentityPk.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.derby.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.derby.generatedclasses.tables.TLanguage.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.derby.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.derby.generatedclasses.tables.TTriggers.ID_GENERATED); public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.derby.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.derby.generatedclasses.tables.XTestCase_64_69.ID); public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.derby.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.derby.generatedclasses.tables.XTestCase_71.ID); @@ -79,6 +82,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.derby.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.derby.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.derby.generatedclasses.tables.TBook.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.derby.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.derby.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.derby.generatedclasses.tables.TBook.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.derby.generatedclasses.Keys.PK_T_LANGUAGE, org.jooq.test.derby.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.derby.generatedclasses.tables.TBook.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.derby.generatedclasses.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.derby.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.derby.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.derby.generatedclasses.Keys.PK_T_BOOK, org.jooq.test.derby.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.derby.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = createForeignKey(org.jooq.test.derby.generatedclasses.Keys.UK_X_UNUSED_ID, org.jooq.test.derby.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.derby.generatedclasses.tables.XTestCase_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Tables.java index 038c154b55..f97d19a0a9 100644 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.derby.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.derby.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table TEST.T_658_REF - */ - public static final org.jooq.test.derby.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.derby.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table TEST.T_725_LOB_TEST */ @@ -71,6 +66,11 @@ public final class Tables { */ public static final org.jooq.test.derby.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.derby.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * The table TEST.T_LANGUAGE + */ + public static final org.jooq.test.derby.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.derby.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table TEST.T_TRIGGERS */ diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Test.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Test.java index 6786e894d5..707c3f9082 100644 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Test.java +++ b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/Test.java @@ -9,7 +9,7 @@ package org.jooq.test.derby.generatedclasses; @java.lang.SuppressWarnings("all") public class Test extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = 1093400111; + private static final long serialVersionUID = -1173161041; /** * The singleton instance of TEST @@ -32,7 +32,6 @@ public class Test extends org.jooq.impl.SchemaImpl { public final java.util.List> getTables() { return java.util.Arrays.>asList( org.jooq.test.derby.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.derby.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.derby.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.derby.generatedclasses.tables.T_785.T_785, org.jooq.test.derby.generatedclasses.tables.TAuthor.T_AUTHOR, @@ -43,6 +42,7 @@ public class Test extends org.jooq.impl.SchemaImpl { org.jooq.test.derby.generatedclasses.tables.TDates.T_DATES, org.jooq.test.derby.generatedclasses.tables.TIdentity.T_IDENTITY, org.jooq.test.derby.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.derby.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.derby.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.derby.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.derby.generatedclasses.tables.VBook.V_BOOK, diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/TLanguage.java deleted file mode 100644 index b30762e9c2..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_LANGUAGE.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column TEST.T_LANGUAGE.CD - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column TEST.T_LANGUAGE.DESCRIPTION - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 40d67a3012..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_11.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_12.java deleted file mode 100644 index e2b15874aa..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_12.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column TEST.T_658_12.CD - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_21.java deleted file mode 100644 index a2c01d8169..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_21.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 827a47af0b..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_22.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column TEST.T_658_22.CD - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_31.java deleted file mode 100644 index 33ba9adfdb..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_31.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_32.java deleted file mode 100644 index 734448dd2a..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_32.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column TEST.T_658_32.CD - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/TBook.java index 029c8f96b5..61ca933621 100644 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.derby.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 347175737; + private static final long serialVersionUID = -189712541; /** * The singleton instance of TEST.T_BOOK @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.derby.generatedclasses.enums.TLanguage.class), T_BOOK); + public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, T_BOOK); /** * The table column TEST.T_BOOK.CONTENT_TEXT @@ -115,7 +115,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.derby.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.derby.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.derby.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.derby.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.derby.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..ae612270ae --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/TLanguage.java @@ -0,0 +1,66 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.derby.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 1349641162; + + /** + * The singleton instance of TEST.T_LANGUAGE + */ + public static final org.jooq.test.derby.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.derby.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.derby.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column TEST.T_LANGUAGE.CD + */ + public static final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, T_LANGUAGE); + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION + */ + public static final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public static final org.jooq.TableField DESCRIPTION_ENGLISH = createField("DESCRIPTION_ENGLISH", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column TEST.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public static final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, T_LANGUAGE); + + /** + * No further instances allowed + */ + private TLanguage() { + super("T_LANGUAGE", org.jooq.test.derby.generatedclasses.Test.TEST); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.derby.generatedclasses.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.derby.generatedclasses.Keys.PK_T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 7aa9ebf40a..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 1270100027; - - /** - * The singleton instance of TEST.T_658_REF - */ - public static final org.jooq.test.derby.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.derby.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.derby.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_11 = createField("REF_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.derby.generatedclasses.enums.T_658_11.class), T_658_REF); - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_21 = createField("REF_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.derby.generatedclasses.enums.T_658_21.class), T_658_REF); - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_31 = createField("REF_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.derby.generatedclasses.enums.T_658_31.class), T_658_REF); - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_12 = createField("REF_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.derby.generatedclasses.enums.T_658_12.class), T_658_REF); - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_22 = createField("REF_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.derby.generatedclasses.enums.T_658_22.class), T_658_REF); - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_32 = createField("REF_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.derby.generatedclasses.enums.T_658_32.class), T_658_REF); - - /** - * No further instances allowed - */ - private T_658Ref() { - super("T_658_REF", org.jooq.test.derby.generatedclasses.Test.TEST); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/TBookRecord.java index dd1a77f94e..5b87676559 100644 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/TBookRecord.java @@ -9,7 +9,7 @@ package org.jooq.test.derby.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -1390513756; + private static final long serialVersionUID = -805621128; /** * The table column TEST.T_BOOK.ID @@ -202,7 +202,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.derby.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.derby.generatedclasses.tables.TBook.LANGUAGE_ID, value); } @@ -215,10 +215,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.derby.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.derby.generatedclasses.tables.TBook.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.derby.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.derby.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.derby.generatedclasses.tables.TBook.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.derby.generatedclasses.tables.TBook.LANGUAGE_ID, value.getValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.ID)); + } + } + + /** + * The table column TEST.T_BOOK.LANGUAGE_ID + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT FK_T_BOOK_LANGUAGE_ID
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES TEST.T_LANGUAGE (ID)
+	 * 
+ */ + public org.jooq.test.derby.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.derby.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.derby.generatedclasses.tables.TLanguage.ID.equal(getValue(org.jooq.test.derby.generatedclasses.tables.TBook.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column TEST.T_BOOK.CONTENT_TEXT */ diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..e5338c87c2 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,92 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.derby.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = 1809770125; + + /** + * The table column TEST.T_LANGUAGE.CD + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.CD, value); + } + + /** + * The table column TEST.T_LANGUAGE.CD + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.CD); + } + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.DESCRIPTION, value); + } + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.DESCRIPTION); + } + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH); + } + + /** + * The table column TEST.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.ID, value); + } + + /** + * The table column TEST.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.ID); + } + + /** + * The table column TEST.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.derby.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.derby.generatedclasses.tables.TBook.LANGUAGE_ID.equal(getValue(org.jooq.test.derby.generatedclasses.tables.TLanguage.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.derby.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index 989a1308f7..0000000000 --- a/jOOQ-test/src/org/jooq/test/derby/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.derby.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -1051231492; - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - public void setRef_11(org.jooq.test.derby.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_11, value); - } - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - public org.jooq.test.derby.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_11); - } - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - public void setRef_21(org.jooq.test.derby.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_21, value); - } - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - public org.jooq.test.derby.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_21); - } - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - public void setRef_31(org.jooq.test.derby.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_31, value); - } - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - public org.jooq.test.derby.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_31); - } - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - public void setRef_12(org.jooq.test.derby.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_12, value); - } - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - public org.jooq.test.derby.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_12); - } - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - public void setRef_22(org.jooq.test.derby.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_22, value); - } - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - public org.jooq.test.derby.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_22); - } - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - public void setRef_32(org.jooq.test.derby.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_32, value); - } - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - public org.jooq.test.derby.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.derby.generatedclasses.tables.T_658Ref.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.derby.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/derby/reset.sql b/jOOQ-test/src/org/jooq/test/derby/reset.sql index 4d92d9138f..5bf6ed60bc 100644 --- a/jOOQ-test/src/org/jooq/test/derby/reset.sql +++ b/jOOQ-test/src/org/jooq/test/derby/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ @@ -27,14 +20,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A'), ('B'), ('C')/ -INSERT INTO t_658_21 VALUES (1), (2), (3)/ -INSERT INTO t_658_31 VALUES (1), (2), (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A'), ('B', 'B'), ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author VALUES (next value for s_author_id, 'George', 'Orwell', '1903-06-25', 1903, null) / INSERT INTO t_author VALUES (next value for s_author_id, 'Paulo', 'Coelho', '1947-08-24', 1947, null) diff --git a/jOOQ-test/src/org/jooq/test/firebird/create.sql b/jOOQ-test/src/org/jooq/test/firebird/create.sql index a40f015eaf..06612c4328 100644 --- a/jOOQ-test/src/org/jooq/test/firebird/create.sql +++ b/jOOQ-test/src/org/jooq/test/firebird/create.sql @@ -19,13 +19,6 @@ DROP TABLE x_test_case_85/ DROP TABLE x_test_case_64_69/ DROP TABLE x_unused/ DROP TABLE t_639_numbers_table/ -DROP TABLE t_658_ref/ -DROP TABLE t_658_11/ -DROP TABLE t_658_21/ -DROP TABLE t_658_31/ -DROP TABLE t_658_12/ -DROP TABLE t_658_22/ -DROP TABLE t_658_32/ DROP TABLE t_725_lob_test/ DROP TABLE t_785/ DROP TABLE T_937/ @@ -102,67 +95,6 @@ CREATE TABLE t_language ( ) / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/Keys.java index 7ffa0ce77b..6dd979bc66 100644 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/Keys.java @@ -24,6 +24,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_B2BS = UniqueKeys0.PK_B2BS; public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = UniqueKeys0.PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = UniqueKeys0.PK_X_TEST_CASE_71; @@ -34,6 +35,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69 = ForeignKeys0.FK_X_TEST_CASE_64_69; @@ -57,6 +59,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_B2BS = createUniqueKey(org.jooq.test.firebird.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.firebird.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_ID, org.jooq.test.firebird.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.firebird.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.firebird.generatedclasses.tables.TBooleans.T_BOOLEANS.ID); public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.firebird.generatedclasses.tables.TDates.T_DATES, org.jooq.test.firebird.generatedclasses.tables.TDates.T_DATES.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.firebird.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.firebird.generatedclasses.tables.TTriggers.T_TRIGGERS.ID_GENERATED); public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.firebird.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.firebird.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.ID); public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.firebird.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.firebird.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.ID); @@ -69,6 +72,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.firebird.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.firebird.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.firebird.generatedclasses.Keys.PK_T_LANGUAGE, org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.firebird.generatedclasses.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.firebird.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.firebird.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.firebird.generatedclasses.Keys.PK_T_BOOK, org.jooq.test.firebird.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.firebird.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_ID); public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69 = createForeignKey(org.jooq.test.firebird.generatedclasses.Keys.UK_X_UNUSED_ID, org.jooq.test.firebird.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.firebird.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/Tables.java index 96d42fa848..8773099030 100644 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.firebird.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.firebird.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table T_658_REF - */ - public static final org.jooq.test.firebird.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table T_725_LOB_TEST */ @@ -66,6 +61,11 @@ public final class Tables { */ public static final org.jooq.test.firebird.generatedclasses.tables.TDates T_DATES = org.jooq.test.firebird.generatedclasses.tables.TDates.T_DATES; + /** + * The table T_LANGUAGE + */ + public static final org.jooq.test.firebird.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table T_TRIGGERS */ diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/TLanguage.java deleted file mode 100644 index a615f739a8..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column T_LANGUAGE.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column T_LANGUAGE.CD - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column T_LANGUAGE.DESCRIPTION - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_11.java deleted file mode 100644 index da39f8ad98..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column T_658_11.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_12.java deleted file mode 100644 index 9c4cdde6f6..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column T_658_12.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column T_658_12.CD - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_21.java deleted file mode 100644 index b796dda869..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column T_658_21.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_22.java deleted file mode 100644 index b01494a462..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column T_658_22.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column T_658_22.CD - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_31.java deleted file mode 100644 index 768a1cdbdb..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column T_658_31.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_32.java deleted file mode 100644 index b9e610ac87..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column T_658_32.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column T_658_32.CD - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/TBook.java index 5894956a18..7b8e731ce9 100644 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.firebird.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 43896007; + private static final long serialVersionUID = 1186870848; /** * The singleton instance of T_BOOK @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.firebird.generatedclasses.enums.TLanguage.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, this); /** * The table column T_BOOK.CONTENT_TEXT @@ -116,7 +116,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.firebird.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.firebird.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.firebird.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.firebird.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.firebird.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..c982e060a5 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/TLanguage.java @@ -0,0 +1,72 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.firebird.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 1557283321; + + /** + * The singleton instance of T_LANGUAGE + */ + public static final org.jooq.test.firebird.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.firebird.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.firebird.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column T_LANGUAGE.CD + */ + public final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, this); + + /** + * The table column T_LANGUAGE.DESCRIPTION + */ + public final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public final org.jooq.TableField DESCRIPTION_ENGLISH = createField("DESCRIPTION_ENGLISH", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, this); + + public TLanguage() { + super("T_LANGUAGE"); + } + + public TLanguage(java.lang.String alias) { + super(alias, null, org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.firebird.generatedclasses.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.firebird.generatedclasses.Keys.PK_T_LANGUAGE); + } + + @Override + public org.jooq.test.firebird.generatedclasses.tables.TLanguage as(java.lang.String alias) { + return new org.jooq.test.firebird.generatedclasses.tables.TLanguage(alias); + } +} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index a7b970e68b..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 954239424; - - /** - * The singleton instance of T_658_REF - */ - public static final org.jooq.test.firebird.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.firebird.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.firebird.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES T_658_11 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_11 = createField("REF_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.firebird.generatedclasses.enums.T_658_11.class), this); - - /** - * The table column T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES T_658_21 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_21 = createField("REF_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.firebird.generatedclasses.enums.T_658_21.class), this); - - /** - * The table column T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES T_658_31 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_31 = createField("REF_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.firebird.generatedclasses.enums.T_658_31.class), this); - - /** - * The table column T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES T_658_12 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_12 = createField("REF_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.firebird.generatedclasses.enums.T_658_12.class), this); - - /** - * The table column T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES T_658_22 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_22 = createField("REF_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.firebird.generatedclasses.enums.T_658_22.class), this); - - /** - * The table column T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES T_658_32 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_32 = createField("REF_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.firebird.generatedclasses.enums.T_658_32.class), this); - - public T_658Ref() { - super("T_658_REF"); - } - - public T_658Ref(java.lang.String alias) { - super(alias, null, org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } - - @Override - public org.jooq.test.firebird.generatedclasses.tables.T_658Ref as(java.lang.String alias) { - return new org.jooq.test.firebird.generatedclasses.tables.T_658Ref(alias); - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/ITBook.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/ITBook.java index b45cb71c33..905eb44f75 100644 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/ITBook.java +++ b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/ITBook.java @@ -106,7 +106,7 @@ public interface ITBook extends java.io.Serializable { * REFERENCES T_LANGUAGE (ID) * */ - public void setLanguageId(org.jooq.test.firebird.generatedclasses.enums.TLanguage value); + public void setLanguageId(java.lang.Integer value); /** * The table column T_BOOK.LANGUAGE_ID @@ -117,7 +117,7 @@ public interface ITBook extends java.io.Serializable { * REFERENCES T_LANGUAGE (ID) * */ - public org.jooq.test.firebird.generatedclasses.enums.TLanguage getLanguageId(); + public java.lang.Integer getLanguageId(); /** * The table column T_BOOK.CONTENT_TEXT diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/ITLanguage.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/ITLanguage.java new file mode 100644 index 0000000000..506bb602c2 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/ITLanguage.java @@ -0,0 +1,55 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.firebird.generatedclasses.tables.interfaces; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public interface ITLanguage extends java.io.Serializable { + + /** + * The table column T_LANGUAGE.CD + */ + public void setCd(java.lang.String value); + + /** + * The table column T_LANGUAGE.CD + */ + public java.lang.String getCd(); + + /** + * The table column T_LANGUAGE.DESCRIPTION + */ + public void setDescription(java.lang.String value); + + /** + * The table column T_LANGUAGE.DESCRIPTION + */ + public java.lang.String getDescription(); + + /** + * The table column T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public void setDescriptionEnglish(java.lang.String value); + + /** + * The table column T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public java.lang.String getDescriptionEnglish(); + + /** + * The table column T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value); + + /** + * The table column T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId(); +} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/IT_658Ref.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/IT_658Ref.java deleted file mode 100644 index d129c02871..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/interfaces/IT_658Ref.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.tables.interfaces; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public interface IT_658Ref extends java.io.Serializable { - - /** - * The table column T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES T_658_11 (ID)
-	 * 
- */ - public void setRef_11(org.jooq.test.firebird.generatedclasses.enums.T_658_11 value); - - /** - * The table column T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES T_658_11 (ID)
-	 * 
- */ - public org.jooq.test.firebird.generatedclasses.enums.T_658_11 getRef_11(); - - /** - * The table column T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES T_658_21 (ID)
-	 * 
- */ - public void setRef_21(org.jooq.test.firebird.generatedclasses.enums.T_658_21 value); - - /** - * The table column T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES T_658_21 (ID)
-	 * 
- */ - public org.jooq.test.firebird.generatedclasses.enums.T_658_21 getRef_21(); - - /** - * The table column T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES T_658_31 (ID)
-	 * 
- */ - public void setRef_31(org.jooq.test.firebird.generatedclasses.enums.T_658_31 value); - - /** - * The table column T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES T_658_31 (ID)
-	 * 
- */ - public org.jooq.test.firebird.generatedclasses.enums.T_658_31 getRef_31(); - - /** - * The table column T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES T_658_12 (ID)
-	 * 
- */ - public void setRef_12(org.jooq.test.firebird.generatedclasses.enums.T_658_12 value); - - /** - * The table column T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES T_658_12 (ID)
-	 * 
- */ - public org.jooq.test.firebird.generatedclasses.enums.T_658_12 getRef_12(); - - /** - * The table column T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES T_658_22 (ID)
-	 * 
- */ - public void setRef_22(org.jooq.test.firebird.generatedclasses.enums.T_658_22 value); - - /** - * The table column T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES T_658_22 (ID)
-	 * 
- */ - public org.jooq.test.firebird.generatedclasses.enums.T_658_22 getRef_22(); - - /** - * The table column T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES T_658_32 (ID)
-	 * 
- */ - public void setRef_32(org.jooq.test.firebird.generatedclasses.enums.T_658_32 value); - - /** - * The table column T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES T_658_32 (ID)
-	 * 
- */ - public org.jooq.test.firebird.generatedclasses.enums.T_658_32 getRef_32(); -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/TBookRecord.java index 85182fae30..4b5c81e5a1 100644 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/TBookRecord.java @@ -9,7 +9,7 @@ package org.jooq.test.firebird.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.test.firebird.generatedclasses.tables.interfaces.ITBook { - private static final long serialVersionUID = 1617268159; + private static final long serialVersionUID = -978476070; /** * The table column T_BOOK.ID @@ -215,7 +215,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @Override - public void setLanguageId(org.jooq.test.firebird.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value); } @@ -229,10 +229,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @Override - public org.jooq.test.firebird.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.firebird.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.firebird.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value.getValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.ID)); + } + } + + /** + * The table column T_BOOK.LANGUAGE_ID + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT FK_T_BOOK_LANGUAGE_ID
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES T_LANGUAGE (ID)
+	 * 
+ */ + public org.jooq.test.firebird.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.ID.equal(getValue(org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column T_BOOK.CONTENT_TEXT */ diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..afcec2e9bb --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,100 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.firebird.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.test.firebird.generatedclasses.tables.interfaces.ITLanguage { + + private static final long serialVersionUID = 1147217692; + + /** + * The table column T_LANGUAGE.CD + */ + @Override + public void setCd(java.lang.String value) { + setValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.CD, value); + } + + /** + * The table column T_LANGUAGE.CD + */ + @Override + public java.lang.String getCd() { + return getValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.CD); + } + + /** + * The table column T_LANGUAGE.DESCRIPTION + */ + @Override + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION, value); + } + + /** + * The table column T_LANGUAGE.DESCRIPTION + */ + @Override + public java.lang.String getDescription() { + return getValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION); + } + + /** + * The table column T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @Override + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @Override + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH); + } + + /** + * The table column T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @Override + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.ID, value); + } + + /** + * The table column T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @Override + public java.lang.Integer getId() { + return getValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); + } + + /** + * The table column T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.firebird.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID.equal(getValue(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.firebird.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index d5fbc5b08b..0000000000 --- a/jOOQ-test/src/org/jooq/test/firebird/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.firebird.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl implements org.jooq.test.firebird.generatedclasses.tables.interfaces.IT_658Ref { - - private static final long serialVersionUID = -89506945; - - /** - * The table column T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES T_658_11 (ID)
-	 * 
- */ - @Override - public void setRef_11(org.jooq.test.firebird.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_11, value); - } - - /** - * The table column T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES T_658_11 (ID)
-	 * 
- */ - @Override - public org.jooq.test.firebird.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_11); - } - - /** - * The table column T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES T_658_21 (ID)
-	 * 
- */ - @Override - public void setRef_21(org.jooq.test.firebird.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_21, value); - } - - /** - * The table column T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES T_658_21 (ID)
-	 * 
- */ - @Override - public org.jooq.test.firebird.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_21); - } - - /** - * The table column T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES T_658_31 (ID)
-	 * 
- */ - @Override - public void setRef_31(org.jooq.test.firebird.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_31, value); - } - - /** - * The table column T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES T_658_31 (ID)
-	 * 
- */ - @Override - public org.jooq.test.firebird.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_31); - } - - /** - * The table column T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES T_658_12 (ID)
-	 * 
- */ - @Override - public void setRef_12(org.jooq.test.firebird.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_12, value); - } - - /** - * The table column T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES T_658_12 (ID)
-	 * 
- */ - @Override - public org.jooq.test.firebird.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_12); - } - - /** - * The table column T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES T_658_22 (ID)
-	 * 
- */ - @Override - public void setRef_22(org.jooq.test.firebird.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_22, value); - } - - /** - * The table column T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES T_658_22 (ID)
-	 * 
- */ - @Override - public org.jooq.test.firebird.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_22); - } - - /** - * The table column T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES T_658_32 (ID)
-	 * 
- */ - @Override - public void setRef_32(org.jooq.test.firebird.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_32, value); - } - - /** - * The table column T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES T_658_32 (ID)
-	 * 
- */ - @Override - public org.jooq.test.firebird.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.firebird.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/firebird/reset.sql b/jOOQ-test/src/org/jooq/test/firebird/reset.sql index daeb55e29c..d54902e113 100644 --- a/jOOQ-test/src/org/jooq/test/firebird/reset.sql +++ b/jOOQ-test/src/org/jooq/test/firebird/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ DELETE FROM t_book/ @@ -24,26 +17,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A')/ -INSERT INTO t_658_11 VALUES ('B')/ -INSERT INTO t_658_11 VALUES ('C')/ -INSERT INTO t_658_21 VALUES (1)/ -INSERT INTO t_658_21 VALUES (2)/ -INSERT INTO t_658_21 VALUES (3)/ -INSERT INTO t_658_31 VALUES (1)/ -INSERT INTO t_658_31 VALUES (2)/ -INSERT INTO t_658_31 VALUES (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A')/ -INSERT INTO t_658_12 VALUES ('B', 'B')/ -INSERT INTO t_658_12 VALUES ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1)/ -INSERT INTO t_658_22 VALUES (2, 2)/ -INSERT INTO t_658_22 VALUES (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1)/ -INSERT INTO t_658_32 VALUES (2, 2)/ -INSERT INTO t_658_32 VALUES (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author VALUES (next value for s_author_id, 'George', 'Orwell', '1903-06-25', 1903, null)/ INSERT INTO t_author VALUES (next value for s_author_id, 'Paulo', 'Coelho', '1947-08-24', 1947, null)/ diff --git a/jOOQ-test/src/org/jooq/test/h2/create.sql b/jOOQ-test/src/org/jooq/test/h2/create.sql index 1637f1f10f..f90c1ccc54 100644 --- a/jOOQ-test/src/org/jooq/test/h2/create.sql +++ b/jOOQ-test/src/org/jooq/test/h2/create.sql @@ -31,13 +31,6 @@ DROP TABLE IF EXISTS x_test_case_64_69/ DROP TABLE IF EXISTS x_test_case_85/ DROP TABLE IF EXISTS x_unused/ DROP TABLE IF EXISTS t_639_numbers_table/ -DROP TABLE IF EXISTS t_658_ref/ -DROP TABLE IF EXISTS t_658_11/ -DROP TABLE IF EXISTS t_658_21/ -DROP TABLE IF EXISTS t_658_31/ -DROP TABLE IF EXISTS t_658_12/ -DROP TABLE IF EXISTS t_658_22/ -DROP TABLE IF EXISTS t_658_32/ DROP TABLE IF EXISTS t_725_lob_test/ DROP TABLE IF EXISTS t_785/ DROP TABLE IF EXISTS t_877/ @@ -121,67 +114,6 @@ COMMENT ON COLUMN t_language.id IS 'The language ID'/ COMMENT ON COLUMN t_language.cd IS 'The language ISO code'/ COMMENT ON COLUMN t_language.description IS 'The language description'/ -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Keys.java index 427d76f090..ddecd1c219 100644 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Keys.java @@ -23,6 +23,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_725_LOB_TEST = UniqueKeys0.PK_T_725_LOB_TEST; 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; @@ -39,6 +40,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey FK_X_UNUSED_SELF = ForeignKeys0.FK_X_UNUSED_SELF; @@ -65,6 +67,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.h2.generatedclasses.tables.TDates.T_DATES, org.jooq.test.h2.generatedclasses.tables.TDates.ID); public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.h2.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.h2.generatedclasses.tables.TBooleans.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.h2.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.h2.generatedclasses.tables.TTriggers.ID_GENERATED); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.h2.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.h2.generatedclasses.tables.TLanguage.ID); public static final org.jooq.UniqueKey PK_T_725_LOB_TEST = createUniqueKey(org.jooq.test.h2.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.h2.generatedclasses.tables.T_725LobTest.ID); public static final org.jooq.UniqueKey PK_T_AUTHOR = createUniqueKey(org.jooq.test.h2.generatedclasses.tables.TAuthor.T_AUTHOR, org.jooq.test.h2.generatedclasses.tables.TAuthor.ID); public static final org.jooq.UniqueKey PK_T_BOOK = createUniqueKey(org.jooq.test.h2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.h2.generatedclasses.tables.TBook.ID); @@ -83,6 +86,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.h2.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.h2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.h2.generatedclasses.tables.TBook.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.h2.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.h2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.h2.generatedclasses.tables.TBook.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.h2.generatedclasses.Keys.PK_T_LANGUAGE, org.jooq.test.h2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.h2.generatedclasses.tables.TBook.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.h2.generatedclasses.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.h2.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.h2.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.h2.generatedclasses.Keys.PK_T_BOOK, org.jooq.test.h2.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.h2.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.ForeignKey FK_X_UNUSED_SELF = createForeignKey(org.jooq.test.h2.generatedclasses.Keys.PK_X_UNUSED, org.jooq.test.h2.generatedclasses.tables.XUnused.X_UNUSED, org.jooq.test.h2.generatedclasses.tables.XUnused.ID_REF, org.jooq.test.h2.generatedclasses.tables.XUnused.ID_REF, org.jooq.test.h2.generatedclasses.tables.XUnused.NAME_REF, org.jooq.test.h2.generatedclasses.tables.XUnused.NAME_REF); diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Public.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Public.java index c185e6d575..e5fec077ab 100644 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Public.java +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Public.java @@ -9,7 +9,7 @@ package org.jooq.test.h2.generatedclasses; @java.lang.SuppressWarnings("all") public class Public extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = 1307313874; + private static final long serialVersionUID = -85539578; /** * The singleton instance of PUBLIC @@ -38,7 +38,7 @@ public class Public extends org.jooq.impl.SchemaImpl { org.jooq.test.h2.generatedclasses.tables.TDates.T_DATES, org.jooq.test.h2.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.h2.generatedclasses.tables.TTriggers.T_TRIGGERS, - org.jooq.test.h2.generatedclasses.tables.T_658Ref.T_658_REF, + org.jooq.test.h2.generatedclasses.tables.TLanguage.T_LANGUAGE, 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, diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Tables.java index 8ade63a005..464afa701c 100644 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/Tables.java @@ -37,9 +37,9 @@ public final class Tables { public static final org.jooq.test.h2.generatedclasses.tables.TTriggers T_TRIGGERS = org.jooq.test.h2.generatedclasses.tables.TTriggers.T_TRIGGERS; /** - * The table PUBLIC.T_658_REF + * An entity holding language master data */ - public static final org.jooq.test.h2.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.h2.generatedclasses.tables.T_658Ref.T_658_REF; + public static final org.jooq.test.h2.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.h2.generatedclasses.tables.TLanguage.T_LANGUAGE; /** * The table PUBLIC.T_725_LOB_TEST diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 22223496fc..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - * - * An entity holding language master data - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The language ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The language ISO code - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The language description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_11.java deleted file mode 100644 index ba87a8132e..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A"), - - /** - * B - */ - B("B"), - - /** - * C - */ - C("C"), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_11.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_12.java deleted file mode 100644 index 39a672d431..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A", "A"), - - /** - * B - */ - B("B", "B"), - - /** - * C - */ - C("C", "C"), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_12.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column PUBLIC.T_658_12.CD - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 94af52a8c7..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_21.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 5abbb3a25a..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_22.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column PUBLIC.T_658_22.CD - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_31.java deleted file mode 100644 index fa302cc1e0..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_31.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_32.java deleted file mode 100644 index d7383cca9e..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_32.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column PUBLIC.T_658_32.CD - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/TBook.java index 7377b14f6d..22b2a65112 100644 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/TBook.java @@ -11,7 +11,7 @@ package org.jooq.test.h2.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -107336750; + private static final long serialVersionUID = 1931838636; /** * The singleton instance of PUBLIC.T_BOOK @@ -79,7 +79,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.h2.generatedclasses.enums.TLanguage.class), T_BOOK); + public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, T_BOOK); /** * Some textual content of the book @@ -122,7 +122,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.h2.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.h2.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.h2.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.h2.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.h2.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..6398697306 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/TLanguage.java @@ -0,0 +1,68 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = -8373476; + + /** + * The singleton instance of PUBLIC.T_LANGUAGE + */ + public static final org.jooq.test.h2.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.h2.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.h2.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The language ISO code + */ + public static final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, T_LANGUAGE); + + /** + * The language description + */ + public static final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public static final org.jooq.TableField DESCRIPTION_ENGLISH = createField("DESCRIPTION_ENGLISH", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public static final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, T_LANGUAGE); + + /** + * No further instances allowed + */ + private TLanguage() { + super("T_LANGUAGE", org.jooq.test.h2.generatedclasses.Public.PUBLIC); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.h2.generatedclasses.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.h2.generatedclasses.Keys.PK_T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 79ec8852c4..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = -819672258; - - /** - * The singleton instance of PUBLIC.T_658_REF - */ - public static final org.jooq.test.h2.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.h2.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.h2.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_11 = createField("REF_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.h2.generatedclasses.enums.T_658_11.class), T_658_REF); - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_21 = createField("REF_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.h2.generatedclasses.enums.T_658_21.class), T_658_REF); - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_31 = createField("REF_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.h2.generatedclasses.enums.T_658_31.class), T_658_REF); - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_12 = createField("REF_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.h2.generatedclasses.enums.T_658_12.class), T_658_REF); - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_22 = createField("REF_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.h2.generatedclasses.enums.T_658_22.class), T_658_REF); - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - public static final org.jooq.TableField REF_32 = createField("REF_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.h2.generatedclasses.enums.T_658_32.class), T_658_REF); - - /** - * No further instances allowed - */ - private T_658Ref() { - super("T_658_REF", org.jooq.test.h2.generatedclasses.Public.PUBLIC); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/daos/TBookDao.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/daos/TBookDao.java index 9f031311cd..8d920a9371 100644 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/daos/TBookDao.java +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/daos/TBookDao.java @@ -82,7 +82,7 @@ public class TBookDao extends org.jooq.impl.DAOImplLANGUAGE_ID IN (values) */ - public java.util.List fetchByLanguageId(org.jooq.test.h2.generatedclasses.enums.TLanguage... values) { + public java.util.List fetchByLanguageId(java.lang.Integer... values) { return fetch(org.jooq.test.h2.generatedclasses.tables.TBook.LANGUAGE_ID, values); } diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/daos/TLanguageDao.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/daos/TLanguageDao.java new file mode 100644 index 0000000000..9bc26dc7ba --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/daos/TLanguageDao.java @@ -0,0 +1,67 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables.daos; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguageDao extends org.jooq.impl.DAOImpl { + + /** + * Create a new TLanguageDao without any factory + */ + public TLanguageDao() { + super(org.jooq.test.h2.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.h2.generatedclasses.tables.pojos.TLanguage.class); + } + + /** + * Create a new TLanguageDao with an attached factory + */ + public TLanguageDao(org.jooq.impl.Factory factory) { + super(org.jooq.test.h2.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.h2.generatedclasses.tables.pojos.TLanguage.class, factory); + } + + @Override + protected java.lang.Integer getId(org.jooq.test.h2.generatedclasses.tables.pojos.TLanguage object) { + return object.getId(); + } + + /** + * Fetch records that have CD IN (values) + */ + public java.util.List fetchByCd(java.lang.String... values) { + return fetch(org.jooq.test.h2.generatedclasses.tables.TLanguage.CD, values); + } + + /** + * Fetch records that have DESCRIPTION IN (values) + */ + public java.util.List fetchByDescription(java.lang.String... values) { + return fetch(org.jooq.test.h2.generatedclasses.tables.TLanguage.DESCRIPTION, values); + } + + /** + * Fetch records that have DESCRIPTION_ENGLISH IN (values) + */ + public java.util.List fetchByDescriptionEnglish(java.lang.String... values) { + return fetch(org.jooq.test.h2.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, values); + } + + /** + * Fetch records that have ID IN (values) + */ + public java.util.List fetchById(java.lang.Integer... values) { + return fetch(org.jooq.test.h2.generatedclasses.tables.TLanguage.ID, values); + } + + /** + * Fetch a unique that has ID = value + */ + public org.jooq.test.h2.generatedclasses.tables.pojos.TLanguage fetchOneById(java.lang.Integer value) { + return fetchOne(org.jooq.test.h2.generatedclasses.tables.TLanguage.ID, value); + } +} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/ITBook.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/ITBook.java index 1bae3e7b66..51b117a39b 100644 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/ITBook.java +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/ITBook.java @@ -108,7 +108,7 @@ public interface ITBook extends java.io.Serializable { * REFERENCES PUBLIC.T_LANGUAGE (ID) * */ - public void setLanguageId(org.jooq.test.h2.generatedclasses.enums.TLanguage value); + public void setLanguageId(java.lang.Integer value); /** * The language of the book @@ -119,7 +119,7 @@ public interface ITBook extends java.io.Serializable { * REFERENCES PUBLIC.T_LANGUAGE (ID) * */ - public org.jooq.test.h2.generatedclasses.enums.TLanguage getLanguageId(); + public java.lang.Integer getLanguageId(); /** * Some textual content of the book diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/ITLanguage.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/ITLanguage.java new file mode 100644 index 0000000000..f28b1714aa --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/ITLanguage.java @@ -0,0 +1,57 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables.interfaces; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public interface ITLanguage extends java.io.Serializable { + + /** + * The language ISO code + */ + public void setCd(java.lang.String value); + + /** + * The language ISO code + */ + public java.lang.String getCd(); + + /** + * The language description + */ + public void setDescription(java.lang.String value); + + /** + * The language description + */ + public java.lang.String getDescription(); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public void setDescriptionEnglish(java.lang.String value); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public java.lang.String getDescriptionEnglish(); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId(); +} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/IT_658Ref.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/IT_658Ref.java deleted file mode 100644 index 2f57edca3a..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/interfaces/IT_658Ref.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.tables.interfaces; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public interface IT_658Ref extends java.io.Serializable { - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - public void setRef_11(org.jooq.test.h2.generatedclasses.enums.T_658_11 value); - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - public org.jooq.test.h2.generatedclasses.enums.T_658_11 getRef_11(); - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - public void setRef_21(org.jooq.test.h2.generatedclasses.enums.T_658_21 value); - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - public org.jooq.test.h2.generatedclasses.enums.T_658_21 getRef_21(); - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - public void setRef_31(org.jooq.test.h2.generatedclasses.enums.T_658_31 value); - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - public org.jooq.test.h2.generatedclasses.enums.T_658_31 getRef_31(); - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - public void setRef_12(org.jooq.test.h2.generatedclasses.enums.T_658_12 value); - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - public org.jooq.test.h2.generatedclasses.enums.T_658_12 getRef_12(); - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - public void setRef_22(org.jooq.test.h2.generatedclasses.enums.T_658_22 value); - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - public org.jooq.test.h2.generatedclasses.enums.T_658_22 getRef_22(); - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - public void setRef_32(org.jooq.test.h2.generatedclasses.enums.T_658_32 value); - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - public org.jooq.test.h2.generatedclasses.enums.T_658_32 getRef_32(); -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/TBook.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/TBook.java index 2e5e71d9b9..5b76510fdc 100644 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/TBook.java +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/TBook.java @@ -11,19 +11,19 @@ package org.jooq.test.h2.generatedclasses.tables.pojos; @java.lang.SuppressWarnings("all") public class TBook implements org.jooq.test.h2.generatedclasses.tables.interfaces.ITBook { - private static final long serialVersionUID = -1144250344; + private static final long serialVersionUID = -2060004160; - 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 org.jooq.test.h2.generatedclasses.enums.TLanguage languageId; - private java.lang.String contentText; - private byte[] contentPdf; - private java.lang.Integer recVersion; - private java.sql.Timestamp recTimestamp; + 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; @Override public java.lang.Integer getId() { @@ -86,12 +86,12 @@ public class TBook implements org.jooq.test.h2.generatedclasses.tables.interface } @Override - public org.jooq.test.h2.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return this.languageId; } @Override - public void setLanguageId(org.jooq.test.h2.generatedclasses.enums.TLanguage languageId) { + public void setLanguageId(java.lang.Integer languageId) { this.languageId = languageId; } diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/TLanguage.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/TLanguage.java new file mode 100644 index 0000000000..43cd6d9d90 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/TLanguage.java @@ -0,0 +1,60 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables.pojos; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguage implements org.jooq.test.h2.generatedclasses.tables.interfaces.ITLanguage { + + private static final long serialVersionUID = -2092117416; + + private java.lang.String cd; + private java.lang.String description; + private java.lang.String descriptionEnglish; + private java.lang.Integer id; + + @Override + public java.lang.String getCd() { + return this.cd; + } + + @Override + public void setCd(java.lang.String cd) { + this.cd = cd; + } + + @Override + public java.lang.String getDescription() { + return this.description; + } + + @Override + public void setDescription(java.lang.String description) { + this.description = description; + } + + @Override + public java.lang.String getDescriptionEnglish() { + return this.descriptionEnglish; + } + + @Override + public void setDescriptionEnglish(java.lang.String descriptionEnglish) { + this.descriptionEnglish = descriptionEnglish; + } + + @Override + public java.lang.Integer getId() { + return this.id; + } + + @Override + public void setId(java.lang.Integer id) { + this.id = id; + } +} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/T_658Ref.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/T_658Ref.java deleted file mode 100644 index 2d55d5d85a..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/pojos/T_658Ref.java +++ /dev/null @@ -1,80 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.tables.pojos; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref implements org.jooq.test.h2.generatedclasses.tables.interfaces.IT_658Ref { - - private static final long serialVersionUID = -223371692; - - private org.jooq.test.h2.generatedclasses.enums.T_658_11 ref_11; - private org.jooq.test.h2.generatedclasses.enums.T_658_21 ref_21; - private org.jooq.test.h2.generatedclasses.enums.T_658_31 ref_31; - private org.jooq.test.h2.generatedclasses.enums.T_658_12 ref_12; - private org.jooq.test.h2.generatedclasses.enums.T_658_22 ref_22; - private org.jooq.test.h2.generatedclasses.enums.T_658_32 ref_32; - - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_11 getRef_11() { - return this.ref_11; - } - - @Override - public void setRef_11(org.jooq.test.h2.generatedclasses.enums.T_658_11 ref_11) { - this.ref_11 = ref_11; - } - - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_21 getRef_21() { - return this.ref_21; - } - - @Override - public void setRef_21(org.jooq.test.h2.generatedclasses.enums.T_658_21 ref_21) { - this.ref_21 = ref_21; - } - - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_31 getRef_31() { - return this.ref_31; - } - - @Override - public void setRef_31(org.jooq.test.h2.generatedclasses.enums.T_658_31 ref_31) { - this.ref_31 = ref_31; - } - - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_12 getRef_12() { - return this.ref_12; - } - - @Override - public void setRef_12(org.jooq.test.h2.generatedclasses.enums.T_658_12 ref_12) { - this.ref_12 = ref_12; - } - - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_22 getRef_22() { - return this.ref_22; - } - - @Override - public void setRef_22(org.jooq.test.h2.generatedclasses.enums.T_658_22 ref_22) { - this.ref_22 = ref_22; - } - - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_32 getRef_32() { - return this.ref_32; - } - - @Override - public void setRef_32(org.jooq.test.h2.generatedclasses.enums.T_658_32 ref_32) { - this.ref_32 = ref_32; - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/TBookRecord.java index aeada767f7..771b4c4ea5 100644 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/TBookRecord.java @@ -11,7 +11,7 @@ package org.jooq.test.h2.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.test.h2.generatedclasses.tables.interfaces.ITBook { - private static final long serialVersionUID = -363187694; + private static final long serialVersionUID = -1507644177; /** * The book ID @@ -217,7 +217,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @Override - public void setLanguageId(org.jooq.test.h2.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.h2.generatedclasses.tables.TBook.LANGUAGE_ID, value); } @@ -231,10 +231,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @Override - public org.jooq.test.h2.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.h2.generatedclasses.tables.TBook.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.h2.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.h2.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.h2.generatedclasses.tables.TBook.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.h2.generatedclasses.tables.TBook.LANGUAGE_ID, value.getValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.ID)); + } + } + + /** + * The language of the book + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT FK_T_BOOK_LANGUAGE_ID
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES PUBLIC.T_LANGUAGE (ID)
+	 * 
+ */ + public org.jooq.test.h2.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.h2.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.h2.generatedclasses.tables.TLanguage.ID.equal(getValue(org.jooq.test.h2.generatedclasses.tables.TBook.LANGUAGE_ID))) + .fetchOne(); + } + /** * Some textual content of the book */ diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..c71ae079ed --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,102 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.h2.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.test.h2.generatedclasses.tables.interfaces.ITLanguage { + + private static final long serialVersionUID = 1540138468; + + /** + * The language ISO code + */ + @Override + public void setCd(java.lang.String value) { + setValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.CD, value); + } + + /** + * The language ISO code + */ + @Override + public java.lang.String getCd() { + return getValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.CD); + } + + /** + * The language description + */ + @Override + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.DESCRIPTION, value); + } + + /** + * The language description + */ + @Override + public java.lang.String getDescription() { + return getValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.DESCRIPTION); + } + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @Override + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @Override + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @Override + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.ID, value); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @Override + public java.lang.Integer getId() { + return getValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.ID); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.h2.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.h2.generatedclasses.tables.TBook.LANGUAGE_ID.equal(getValue(org.jooq.test.h2.generatedclasses.tables.TLanguage.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.h2.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index f565737ebf..0000000000 --- a/jOOQ-test/src/org/jooq/test/h2/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.h2.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl implements org.jooq.test.h2.generatedclasses.tables.interfaces.IT_658Ref { - - private static final long serialVersionUID = -1388554749; - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - @Override - public void setRef_11(org.jooq.test.h2.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_11, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_11); - } - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - @Override - public void setRef_21(org.jooq.test.h2.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_21, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_21); - } - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - @Override - public void setRef_31(org.jooq.test.h2.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_31, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_31); - } - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - @Override - public void setRef_12(org.jooq.test.h2.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_12, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_12); - } - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - @Override - public void setRef_22(org.jooq.test.h2.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_22, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_22); - } - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - @Override - public void setRef_32(org.jooq.test.h2.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_32, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - @Override - public org.jooq.test.h2.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.h2.generatedclasses.tables.T_658Ref.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.h2.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/h2/reset.sql b/jOOQ-test/src/org/jooq/test/h2/reset.sql index 155b59f7d1..35f6e6cd83 100644 --- a/jOOQ-test/src/org/jooq/test/h2/reset.sql +++ b/jOOQ-test/src/org/jooq/test/h2/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_arrays/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ @@ -27,14 +20,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A'), ('B'), ('C')/ -INSERT INTO t_658_21 VALUES (1), (2), (3)/ -INSERT INTO t_658_31 VALUES (1), (2), (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A'), ('B', 'B'), ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author VALUES (next value for s_author_id, 'George', 'Orwell', '1903-06-25', 1903, null); / INSERT INTO t_author VALUES (next value for s_author_id, 'Paulo', 'Coelho', '1947-08-24', 1947, null); diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/create.sql b/jOOQ-test/src/org/jooq/test/hsqldb/create.sql index 876abb4ffb..edc3f96b12 100644 --- a/jOOQ-test/src/org/jooq/test/hsqldb/create.sql +++ b/jOOQ-test/src/org/jooq/test/hsqldb/create.sql @@ -38,13 +38,6 @@ DROP TABLE IF EXISTS x_test_case_85/ DROP TABLE IF EXISTS x_test_case_64_69/ DROP TABLE IF EXISTS x_unused/ DROP TABLE IF EXISTS t_639_numbers_table/ -DROP TABLE IF EXISTS t_658_ref/ -DROP TABLE IF EXISTS t_658_11/ -DROP TABLE IF EXISTS t_658_21/ -DROP TABLE IF EXISTS t_658_31/ -DROP TABLE IF EXISTS t_658_12/ -DROP TABLE IF EXISTS t_658_22/ -DROP TABLE IF EXISTS t_658_32/ DROP TABLE IF EXISTS t_725_lob_test/ DROP TABLE IF EXISTS t_785/ DROP TABLE IF EXISTS T_937/ @@ -145,67 +138,6 @@ CREATE TABLE t_language ( ) / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Keys.java index e294b858b3..85def8ed7a 100644 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Keys.java @@ -28,6 +28,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = UniqueKeys0.PK_T_IDENTITY_PK; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = UniqueKeys0.PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = UniqueKeys0.PK_X_TEST_CASE_71; @@ -38,6 +39,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69 = ForeignKeys0.FK_X_TEST_CASE_64_69; @@ -69,6 +71,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.hsqldb.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.hsqldb.generatedclasses.tables.TBooleans.T_BOOLEANS.ID); public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.hsqldb.generatedclasses.tables.TDates.T_DATES, org.jooq.test.hsqldb.generatedclasses.tables.TDates.T_DATES.ID); public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.hsqldb.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.hsqldb.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.hsqldb.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.hsqldb.generatedclasses.tables.TTriggers.T_TRIGGERS.ID_GENERATED); public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.hsqldb.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.hsqldb.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.ID); public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.hsqldb.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.hsqldb.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.ID); @@ -81,6 +84,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.hsqldb.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.hsqldb.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.hsqldb.generatedclasses.Keys.PK_T_LANGUAGE, org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.hsqldb.generatedclasses.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.hsqldb.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.hsqldb.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.hsqldb.generatedclasses.Keys.PK_T_BOOK, org.jooq.test.hsqldb.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.hsqldb.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_ID); public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69 = createForeignKey(org.jooq.test.hsqldb.generatedclasses.Keys.UK_X_UNUSED_ID, org.jooq.test.hsqldb.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.hsqldb.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Public.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Public.java index 8c5ba3b514..145013420b 100644 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Public.java +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Public.java @@ -9,7 +9,7 @@ package org.jooq.test.hsqldb.generatedclasses; @java.lang.SuppressWarnings("all") public class Public extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -2125640467; + private static final long serialVersionUID = -1358759071; /** * The singleton instance of PUBLIC @@ -41,7 +41,6 @@ public class Public extends org.jooq.impl.SchemaImpl { org.jooq.test.hsqldb.generatedclasses.tables.String.STRING, org.jooq.test.hsqldb.generatedclasses.tables.System.SYSTEM, org.jooq.test.hsqldb.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.hsqldb.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.hsqldb.generatedclasses.tables.T_785.T_785, org.jooq.test.hsqldb.generatedclasses.tables.T_937.T_937, @@ -54,6 +53,7 @@ public class Public extends org.jooq.impl.SchemaImpl { org.jooq.test.hsqldb.generatedclasses.tables.TDates.T_DATES, org.jooq.test.hsqldb.generatedclasses.tables.TIdentity.T_IDENTITY, org.jooq.test.hsqldb.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.hsqldb.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.hsqldb.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.hsqldb.generatedclasses.tables.VBook.V_BOOK, diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Tables.java index c2d2276688..2dd4baeff3 100644 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/Tables.java @@ -61,11 +61,6 @@ public final class Tables { */ public static final org.jooq.test.hsqldb.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.hsqldb.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table PUBLIC.T_658_REF - */ - public static final org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table PUBLIC.T_725_LOB_TEST */ @@ -126,6 +121,11 @@ public final class Tables { */ public static final org.jooq.test.hsqldb.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.hsqldb.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * The table PUBLIC.T_LANGUAGE + */ + public static final org.jooq.test.hsqldb.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table PUBLIC.T_TRIGGERS */ diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 56be90fd26..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_LANGUAGE.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column PUBLIC.T_LANGUAGE.CD - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column PUBLIC.T_LANGUAGE.DESCRIPTION - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 2cc1c6930b..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_11.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_12.java deleted file mode 100644 index 18b0505975..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_12.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column PUBLIC.T_658_12.CD - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_21.java deleted file mode 100644 index fa5ef5b4e3..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_21.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 5724aa222d..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_22.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column PUBLIC.T_658_22.CD - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_31.java deleted file mode 100644 index 752ea09273..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_31.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_32.java deleted file mode 100644 index a168f9a8a8..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column PUBLIC.T_658_32.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column PUBLIC.T_658_32.CD - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/TBook.java index 6232303fe0..f5025ab92e 100644 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.hsqldb.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -329842907; + private static final long serialVersionUID = 734959781; /** * The singleton instance of PUBLIC.T_BOOK @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.hsqldb.generatedclasses.enums.TLanguage.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, this); /** * The table column PUBLIC.T_BOOK.CONTENT_TEXT @@ -121,7 +121,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.hsqldb.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.hsqldb.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.hsqldb.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.hsqldb.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.hsqldb.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..9610891064 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/TLanguage.java @@ -0,0 +1,72 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.hsqldb.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 77421189; + + /** + * The singleton instance of PUBLIC.T_LANGUAGE + */ + public static final org.jooq.test.hsqldb.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.hsqldb.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.hsqldb.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column PUBLIC.T_LANGUAGE.CD + */ + public final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, this); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION + */ + public final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public final org.jooq.TableField DESCRIPTION_ENGLISH = createField("DESCRIPTION_ENGLISH", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column PUBLIC.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, this); + + public TLanguage() { + super("T_LANGUAGE", org.jooq.test.hsqldb.generatedclasses.Public.PUBLIC); + } + + public TLanguage(java.lang.String alias) { + super(alias, org.jooq.test.hsqldb.generatedclasses.Public.PUBLIC, org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.hsqldb.generatedclasses.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.hsqldb.generatedclasses.Keys.PK_T_LANGUAGE); + } + + @Override + public org.jooq.test.hsqldb.generatedclasses.tables.TLanguage as(java.lang.String alias) { + return new org.jooq.test.hsqldb.generatedclasses.tables.TLanguage(alias); + } +} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index de5062f2b0..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = -1413652677; - - /** - * The singleton instance of PUBLIC.T_658_REF - */ - public static final org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.hsqldb.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_11 = createField("REF_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.hsqldb.generatedclasses.enums.T_658_11.class), this); - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_21 = createField("REF_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.hsqldb.generatedclasses.enums.T_658_21.class), this); - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_31 = createField("REF_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.hsqldb.generatedclasses.enums.T_658_31.class), this); - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_12 = createField("REF_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.hsqldb.generatedclasses.enums.T_658_12.class), this); - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_22 = createField("REF_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.hsqldb.generatedclasses.enums.T_658_22.class), this); - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_32 = createField("REF_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.hsqldb.generatedclasses.enums.T_658_32.class), this); - - public T_658Ref() { - super("T_658_REF", org.jooq.test.hsqldb.generatedclasses.Public.PUBLIC); - } - - public T_658Ref(java.lang.String alias) { - super(alias, org.jooq.test.hsqldb.generatedclasses.Public.PUBLIC, org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } - - @Override - public org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref as(java.lang.String alias) { - return new org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref(alias); - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/ITBook.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/ITBook.java index 5e436ccebe..1cd3fd0f50 100644 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/ITBook.java +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/ITBook.java @@ -106,7 +106,7 @@ public interface ITBook extends java.io.Serializable { * REFERENCES PUBLIC.T_LANGUAGE (ID) * */ - public void setLanguageId(org.jooq.test.hsqldb.generatedclasses.enums.TLanguage value); + public void setLanguageId(java.lang.Integer value); /** * The table column PUBLIC.T_BOOK.LANGUAGE_ID @@ -117,7 +117,7 @@ public interface ITBook extends java.io.Serializable { * REFERENCES PUBLIC.T_LANGUAGE (ID) * */ - public org.jooq.test.hsqldb.generatedclasses.enums.TLanguage getLanguageId(); + public java.lang.Integer getLanguageId(); /** * The table column PUBLIC.T_BOOK.CONTENT_TEXT diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/ITLanguage.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/ITLanguage.java new file mode 100644 index 0000000000..c77fd5e9a5 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/ITLanguage.java @@ -0,0 +1,55 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.hsqldb.generatedclasses.tables.interfaces; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public interface ITLanguage extends java.io.Serializable { + + /** + * The table column PUBLIC.T_LANGUAGE.CD + */ + public void setCd(java.lang.String value); + + /** + * The table column PUBLIC.T_LANGUAGE.CD + */ + public java.lang.String getCd(); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION + */ + public void setDescription(java.lang.String value); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION + */ + public java.lang.String getDescription(); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public void setDescriptionEnglish(java.lang.String value); + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public java.lang.String getDescriptionEnglish(); + + /** + * The table column PUBLIC.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value); + + /** + * The table column PUBLIC.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId(); +} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/IT_658Ref.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/IT_658Ref.java deleted file mode 100644 index 4b05104c37..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/interfaces/IT_658Ref.java +++ /dev/null @@ -1,143 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.tables.interfaces; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public interface IT_658Ref extends java.io.Serializable { - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - public void setRef_11(org.jooq.test.hsqldb.generatedclasses.enums.T_658_11 value); - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_11 getRef_11(); - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - public void setRef_21(org.jooq.test.hsqldb.generatedclasses.enums.T_658_21 value); - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_21 getRef_21(); - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - public void setRef_31(org.jooq.test.hsqldb.generatedclasses.enums.T_658_31 value); - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_31 getRef_31(); - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - public void setRef_12(org.jooq.test.hsqldb.generatedclasses.enums.T_658_12 value); - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_12 getRef_12(); - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - public void setRef_22(org.jooq.test.hsqldb.generatedclasses.enums.T_658_22 value); - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_22 getRef_22(); - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - public void setRef_32(org.jooq.test.hsqldb.generatedclasses.enums.T_658_32 value); - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_32 getRef_32(); -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/TBookRecord.java index 5d4323b901..36d3bf9d9a 100644 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/TBookRecord.java @@ -9,7 +9,7 @@ package org.jooq.test.hsqldb.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.test.hsqldb.generatedclasses.tables.interfaces.ITBook { - private static final long serialVersionUID = -1408104118; + private static final long serialVersionUID = 7326416; /** * The table column PUBLIC.T_BOOK.ID @@ -215,7 +215,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @Override - public void setLanguageId(org.jooq.test.hsqldb.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value); } @@ -229,10 +229,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @Override - public org.jooq.test.hsqldb.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.hsqldb.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.hsqldb.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value.getValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.ID)); + } + } + + /** + * The table column PUBLIC.T_BOOK.LANGUAGE_ID + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT FK_T_BOOK_LANGUAGE_ID
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES PUBLIC.T_LANGUAGE (ID)
+	 * 
+ */ + public org.jooq.test.hsqldb.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.ID.equal(getValue(org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column PUBLIC.T_BOOK.CONTENT_TEXT */ diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..d2dc08cc70 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,100 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.hsqldb.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl implements org.jooq.test.hsqldb.generatedclasses.tables.interfaces.ITLanguage { + + private static final long serialVersionUID = -1459801959; + + /** + * The table column PUBLIC.T_LANGUAGE.CD + */ + @Override + public void setCd(java.lang.String value) { + setValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.CD, value); + } + + /** + * The table column PUBLIC.T_LANGUAGE.CD + */ + @Override + public java.lang.String getCd() { + return getValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.CD); + } + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION + */ + @Override + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION, value); + } + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION + */ + @Override + public java.lang.String getDescription() { + return getValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION); + } + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @Override + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column PUBLIC.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @Override + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH); + } + + /** + * The table column PUBLIC.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @Override + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.ID, value); + } + + /** + * The table column PUBLIC.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @Override + public java.lang.Integer getId() { + return getValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); + } + + /** + * The table column PUBLIC.T_LANGUAGE.ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.hsqldb.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID.equal(getValue(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.hsqldb.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index 320ae0c95c..0000000000 --- a/jOOQ-test/src/org/jooq/test/hsqldb/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,188 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.hsqldb.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl implements org.jooq.test.hsqldb.generatedclasses.tables.interfaces.IT_658Ref { - - private static final long serialVersionUID = 244495851; - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - @Override - public void setRef_11(org.jooq.test.hsqldb.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_11, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES PUBLIC.T_658_11 (ID)
-	 * 
- */ - @Override - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_11); - } - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - @Override - public void setRef_21(org.jooq.test.hsqldb.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_21, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES PUBLIC.T_658_21 (ID)
-	 * 
- */ - @Override - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_21); - } - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - @Override - public void setRef_31(org.jooq.test.hsqldb.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_31, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES PUBLIC.T_658_31 (ID)
-	 * 
- */ - @Override - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_31); - } - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - @Override - public void setRef_12(org.jooq.test.hsqldb.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_12, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES PUBLIC.T_658_12 (ID)
-	 * 
- */ - @Override - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_12); - } - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - @Override - public void setRef_22(org.jooq.test.hsqldb.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_22, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES PUBLIC.T_658_22 (ID)
-	 * 
- */ - @Override - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_22); - } - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - @Override - public void setRef_32(org.jooq.test.hsqldb.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_32, value); - } - - /** - * The table column PUBLIC.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES PUBLIC.T_658_32 (ID)
-	 * 
- */ - @Override - public org.jooq.test.hsqldb.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.hsqldb.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/hsqldb/reset.sql b/jOOQ-test/src/org/jooq/test/hsqldb/reset.sql index b27b26c795..20c953dff6 100644 --- a/jOOQ-test/src/org/jooq/test/hsqldb/reset.sql +++ b/jOOQ-test/src/org/jooq/test/hsqldb/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_arrays/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ @@ -27,14 +20,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A'), ('B'), ('C')/ -INSERT INTO t_658_21 VALUES (1), (2), (3)/ -INSERT INTO t_658_31 VALUES (1), (2), (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A'), ('B', 'B'), ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author VALUES (next value for s_author_id, 'George', 'Orwell', '1903-06-25', 1903, null)/ INSERT INTO t_author VALUES (next value for s_author_id, 'Paulo', 'Coelho', '1947-08-24', 1947, null)/ diff --git a/jOOQ-test/src/org/jooq/test/ingres/create.sql b/jOOQ-test/src/org/jooq/test/ingres/create.sql index 9a318340ef..68e79c0668 100644 --- a/jOOQ-test/src/org/jooq/test/ingres/create.sql +++ b/jOOQ-test/src/org/jooq/test/ingres/create.sql @@ -18,13 +18,6 @@ DROP TABLE IF EXISTS x_test_case_64_69/ DROP TABLE IF EXISTS x_test_case_85/ DROP TABLE IF EXISTS x_unused/ DROP TABLE IF EXISTS t_639_numbers_table/ -DROP TABLE IF EXISTS t_658_ref/ -DROP TABLE IF EXISTS t_658_11/ -DROP TABLE IF EXISTS t_658_21/ -DROP TABLE IF EXISTS t_658_31/ -DROP TABLE IF EXISTS t_658_12/ -DROP TABLE IF EXISTS t_658_22/ -DROP TABLE IF EXISTS t_658_32/ DROP TABLE IF EXISTS t_725_lob_test/ DROP TABLE IF EXISTS t_785/ DROP TABLE IF EXISTS t_booleans/ @@ -111,67 +104,6 @@ COMMENT ON COLUMN t_language.id IS 'The language ID'/ COMMENT ON COLUMN t_language.cd IS 'The language ISO code'/ COMMENT ON COLUMN t_language.description IS 'The language description'/ -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id bigint NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id bigint NOT NULL, - cd bigint NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Keys.java index 8ff85fb8d3..81b81fe731 100644 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Keys.java @@ -27,6 +27,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = UniqueKeys0.PK_T_IDENTITY_PK; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = UniqueKeys0.PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = UniqueKeys0.PK_X_TEST_CASE_71; @@ -37,6 +38,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = ForeignKeys0.FK_X_TEST_CASE_64_69A; @@ -67,6 +69,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.ingres.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.ingres.generatedclasses.tables.TBooleans.ID); public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.ingres.generatedclasses.tables.TDates.T_DATES, org.jooq.test.ingres.generatedclasses.tables.TDates.ID); public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.ingres.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.ingres.generatedclasses.tables.TIdentityPk.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.ingres.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.ingres.generatedclasses.tables.TLanguage.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.ingres.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.ingres.generatedclasses.tables.TTriggers.ID_GENERATED); public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.ingres.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.ingres.generatedclasses.tables.XTestCase_64_69.ID); public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.ingres.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.ingres.generatedclasses.tables.XTestCase_71.ID); @@ -79,6 +82,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.ingres.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.ingres.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.ingres.generatedclasses.tables.TBook.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.ingres.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.ingres.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.ingres.generatedclasses.tables.TBook.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.ingres.generatedclasses.Keys.PK_T_LANGUAGE, org.jooq.test.ingres.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.ingres.generatedclasses.tables.TBook.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.ingres.generatedclasses.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.ingres.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.ingres.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.ingres.generatedclasses.Keys.PK_T_BOOK, org.jooq.test.ingres.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.ingres.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = createForeignKey(org.jooq.test.ingres.generatedclasses.Keys.UK_X_UNUSED_ID, org.jooq.test.ingres.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.ingres.generatedclasses.tables.XTestCase_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Tables.java index 2d64e5c384..62b189bf8c 100644 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.ingres.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.ingres.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table test.t_658_ref - */ - public static final org.jooq.test.ingres.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.ingres.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table test.t_725_lob_test */ @@ -71,6 +66,11 @@ public final class Tables { */ public static final org.jooq.test.ingres.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.ingres.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * An entity holding language master data + */ + public static final org.jooq.test.ingres.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.ingres.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table test.t_triggers */ diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Test.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Test.java index 3cd54621b1..e259eb1738 100644 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Test.java +++ b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/Test.java @@ -9,7 +9,7 @@ package org.jooq.test.ingres.generatedclasses; @java.lang.SuppressWarnings("all") public class Test extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -331422765; + private static final long serialVersionUID = 574066373; /** * The singleton instance of test @@ -32,7 +32,6 @@ public class Test extends org.jooq.impl.SchemaImpl { public final java.util.List> getTables() { return java.util.Arrays.>asList( org.jooq.test.ingres.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.ingres.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.ingres.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.ingres.generatedclasses.tables.T_785.T_785, org.jooq.test.ingres.generatedclasses.tables.TAuthor.T_AUTHOR, @@ -43,6 +42,7 @@ public class Test extends org.jooq.impl.SchemaImpl { org.jooq.test.ingres.generatedclasses.tables.TDates.T_DATES, org.jooq.test.ingres.generatedclasses.tables.TIdentity.T_IDENTITY, org.jooq.test.ingres.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.ingres.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.ingres.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.ingres.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.ingres.generatedclasses.tables.VBook.V_BOOK, diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/TLanguage.java deleted file mode 100644 index a776319c10..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - * - * An entity holding language master data - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The language ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The language ISO code - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The language description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 10bf873895..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_12.java deleted file mode 100644 index c052937a79..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column test.t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_21.java deleted file mode 100644 index a211fdf1af..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 0f82e7b7f1..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column test.t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_31.java deleted file mode 100644 index e329d7b1bf..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_32.java deleted file mode 100644 index 531e5ba7a8..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column test.t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/TBook.java index efc24cfaf4..4ebed807c7 100644 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/TBook.java @@ -11,7 +11,7 @@ package org.jooq.test.ingres.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 175508654; + private static final long serialVersionUID = -646139050; /** * The singleton instance of test.t_book @@ -79,7 +79,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public static final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.ingres.generatedclasses.enums.TLanguage.class), T_BOOK); + public static final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER, T_BOOK); /** * Some textual content of the book @@ -112,6 +112,6 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.ingres.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.ingres.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.ingres.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.ingres.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.ingres.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } } diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..2086d0ea43 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/TLanguage.java @@ -0,0 +1,68 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.ingres.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = -307948284; + + /** + * The singleton instance of test.t_language + */ + public static final org.jooq.test.ingres.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.ingres.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.ingres.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The language ISO code + */ + public static final org.jooq.TableField CD = createField("cd", org.jooq.impl.SQLDataType.CHAR, T_LANGUAGE); + + /** + * The language description + */ + public static final org.jooq.TableField DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column test.t_language.description_english + */ + public static final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public static final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, T_LANGUAGE); + + /** + * No further instances allowed + */ + private TLanguage() { + super("t_language", org.jooq.test.ingres.generatedclasses.Test.TEST); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.ingres.generatedclasses.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.ingres.generatedclasses.Keys.PK_T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 5045da440a..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 1015327071; - - /** - * The singleton instance of test.t_658_ref - */ - public static final org.jooq.test.ingres.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.ingres.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.ingres.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column test.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test.t_658_11 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.ingres.generatedclasses.enums.T_658_11.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test.t_658_21 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.ingres.generatedclasses.enums.T_658_21.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test.t_658_31 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.ingres.generatedclasses.enums.T_658_31.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test.t_658_12 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.ingres.generatedclasses.enums.T_658_12.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test.t_658_22 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.ingres.generatedclasses.enums.T_658_22.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test.t_658_32 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.ingres.generatedclasses.enums.T_658_32.class), T_658_REF); - - /** - * No further instances allowed - */ - private T_658Ref() { - super("t_658_ref", org.jooq.test.ingres.generatedclasses.Test.TEST); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/TBookRecord.java index 3c5547d154..e144a07f07 100644 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/TBookRecord.java @@ -11,7 +11,7 @@ package org.jooq.test.ingres.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 726850980; + private static final long serialVersionUID = 1647554322; /** * The book ID @@ -204,7 +204,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.ingres.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.ingres.generatedclasses.tables.TBook.LANGUAGE_ID, value); } @@ -217,10 +217,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.ingres.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.ingres.generatedclasses.tables.TBook.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.ingres.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.ingres.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.ingres.generatedclasses.tables.TBook.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.ingres.generatedclasses.tables.TBook.LANGUAGE_ID, value.getValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.ID)); + } + } + + /** + * The language of the book + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT fk_t_book_language_id
+	 * FOREIGN KEY (language_id)
+	 * REFERENCES test.t_language (id)
+	 * 
+ */ + public org.jooq.test.ingres.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.ingres.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.ingres.generatedclasses.tables.TLanguage.ID.equal(getValue(org.jooq.test.ingres.generatedclasses.tables.TBook.LANGUAGE_ID))) + .fetchOne(); + } + /** * Some textual content of the book */ diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..ae8dce5d57 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,94 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.ingres.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = 680159980; + + /** + * The language ISO code + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.CD, value); + } + + /** + * The language ISO code + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.CD); + } + + /** + * The language description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.DESCRIPTION, value); + } + + /** + * The language description + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.DESCRIPTION); + } + + /** + * The table column test.t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column test.t_language.description_english + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.ID, value); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.ID); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.ingres.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.ingres.generatedclasses.tables.TBook.LANGUAGE_ID.equal(getValue(org.jooq.test.ingres.generatedclasses.tables.TLanguage.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.ingres.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index ba925f1220..0000000000 --- a/jOOQ-test/src/org/jooq/test/ingres/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.ingres.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = 527198798; - - /** - * The table column test.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test.t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.ingres.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_11, value); - } - - /** - * The table column test.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test.t_658_11 (id)
-	 * 
- */ - public org.jooq.test.ingres.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_11); - } - - /** - * The table column test.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test.t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.ingres.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_21, value); - } - - /** - * The table column test.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test.t_658_21 (id)
-	 * 
- */ - public org.jooq.test.ingres.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_21); - } - - /** - * The table column test.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test.t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.ingres.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_31, value); - } - - /** - * The table column test.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test.t_658_31 (id)
-	 * 
- */ - public org.jooq.test.ingres.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_31); - } - - /** - * The table column test.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test.t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.ingres.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_12, value); - } - - /** - * The table column test.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test.t_658_12 (id)
-	 * 
- */ - public org.jooq.test.ingres.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_12); - } - - /** - * The table column test.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test.t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.ingres.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_22, value); - } - - /** - * The table column test.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test.t_658_22 (id)
-	 * 
- */ - public org.jooq.test.ingres.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_22); - } - - /** - * The table column test.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test.t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.ingres.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_32, value); - } - - /** - * The table column test.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test.t_658_32 (id)
-	 * 
- */ - public org.jooq.test.ingres.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.ingres.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/ingres/reset.sql b/jOOQ-test/src/org/jooq/test/ingres/reset.sql index 195a70974d..9c532e6c69 100644 --- a/jOOQ-test/src/org/jooq/test/ingres/reset.sql +++ b/jOOQ-test/src/org/jooq/test/ingres/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ DELETE FROM t_book/ @@ -26,25 +19,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A')/ -INSERT INTO t_658_11 VALUES ('B')/ -INSERT INTO t_658_11 VALUES ('C')/ -INSERT INTO t_658_21 VALUES (1)/ -INSERT INTO t_658_21 VALUES (2)/ -INSERT INTO t_658_21 VALUES (3)/ -INSERT INTO t_658_31 VALUES (1)/ -INSERT INTO t_658_31 VALUES (2)/ -INSERT INTO t_658_31 VALUES (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A')/ -INSERT INTO t_658_12 VALUES ('B', 'B')/ -INSERT INTO t_658_12 VALUES ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1)/ -INSERT INTO t_658_22 VALUES (2, 2)/ -INSERT INTO t_658_22 VALUES (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1)/ -INSERT INTO t_658_32 VALUES (2, 2)/ -INSERT INTO t_658_32 VALUES (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ INSERT INTO t_author VALUES (s_author_id.nextval, 'George', 'Orwell', '1903-06-25', 1903, null) / diff --git a/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java b/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java index 7d3e932d17..e8bea75a91 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java @@ -192,7 +192,6 @@ public abstract class jOOQAbstractTest< IPK extends UpdatableRecord, // Various tables related to trac ticket numbers - T658 extends TableRecord, T725 extends UpdatableRecord, T639 extends UpdatableRecord, T785 extends TableRecord> { @@ -536,7 +535,6 @@ public abstract class jOOQAbstractTest< return "/org/jooq/test/" + getDialect().getName().toLowerCase() + "/reset.sql"; } - protected abstract Table T658(); protected abstract Table T725(); protected abstract TableField T725_ID(); protected abstract TableField T725_LOB(); @@ -631,7 +629,7 @@ public abstract class jOOQAbstractTest< protected abstract TableField TBook_ID(); protected abstract TableField TBook_AUTHOR_ID(); protected abstract TableField TBook_TITLE(); - protected abstract TableField TBook_LANGUAGE_ID(); + protected abstract TableField TBook_LANGUAGE_ID(); protected abstract TableField TBook_PUBLISHED_IN(); protected abstract TableField TBook_CONTENT_TEXT(); protected abstract TableField TBook_CONTENT_PDF(); @@ -756,6 +754,12 @@ public abstract class jOOQAbstractTest< return ""; } + @Test + public void testStart() { + // An initial test case to clean up the test database + log.info("STARTING"); + } + // IMPORTANT! Make this the first test, to prevent side-effects @Test public void testInsertIdentity() throws Exception { @@ -1563,11 +1567,6 @@ public abstract class jOOQAbstractTest< new EnumTests(this).testCustomEnums(); } - @Test - public void testMasterData() throws Exception { - new EnumTests(this).testMasterData(); - } - @Test public void testSerialisation() throws Exception { new GeneralTests(this).testSerialisation(); @@ -1799,8 +1798,8 @@ public abstract class jOOQAbstractTest< } @Test - public void testVoid() { + public void testFinish() { // A final test case to clean up the test database - System.out.println("finish"); + log.info("FINISHING"); } } diff --git a/jOOQ-test/src/org/jooq/test/mysql/create.sql b/jOOQ-test/src/org/jooq/test/mysql/create.sql index dba05cd28d..684bbe9c56 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/create.sql +++ b/jOOQ-test/src/org/jooq/test/mysql/create.sql @@ -27,13 +27,6 @@ DROP TABLE IF EXISTS x_test_case_64_69/ DROP TABLE IF EXISTS x_test_case_85/ DROP TABLE IF EXISTS x_unused/ DROP TABLE IF EXISTS t_639_numbers_table/ -DROP TABLE IF EXISTS t_658_ref/ -DROP TABLE IF EXISTS t_658_11/ -DROP TABLE IF EXISTS t_658_21/ -DROP TABLE IF EXISTS t_658_31/ -DROP TABLE IF EXISTS t_658_12/ -DROP TABLE IF EXISTS t_658_22/ -DROP TABLE IF EXISTS t_658_32/ DROP TABLE IF EXISTS t_725_lob_test/ DROP TABLE IF EXISTS t_785/ DROP TABLE IF EXISTS t_unsigned/ @@ -132,67 +125,6 @@ CREATE TABLE t_language ( COMMENT 'An entity holding language master data' / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Keys.java index b9d327440c..278878d711 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Keys.java @@ -26,6 +26,7 @@ public class Keys { public static final org.jooq.UniqueKey KEY_T_BOOLEANS_PRIMARY = UniqueKeys0.KEY_T_BOOLEANS_PRIMARY; public static final org.jooq.UniqueKey KEY_T_DATES_PRIMARY = UniqueKeys0.KEY_T_DATES_PRIMARY; public static final org.jooq.UniqueKey KEY_T_IDENTITY_PK_PRIMARY = UniqueKeys0.KEY_T_IDENTITY_PK_PRIMARY; + public static final org.jooq.UniqueKey KEY_T_LANGUAGE_PRIMARY = UniqueKeys0.KEY_T_LANGUAGE_PRIMARY; public static final org.jooq.UniqueKey KEY_T_TRIGGERS_PRIMARY = UniqueKeys0.KEY_T_TRIGGERS_PRIMARY; public static final org.jooq.UniqueKey KEY_X_TEST_CASE_64_69_PRIMARY = UniqueKeys0.KEY_X_TEST_CASE_64_69_PRIMARY; public static final org.jooq.UniqueKey KEY_X_TEST_CASE_71_PRIMARY = UniqueKeys0.KEY_X_TEST_CASE_71_PRIMARY; @@ -36,6 +37,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = ForeignKeys0.FK_X_TEST_CASE_64_69A; @@ -65,6 +67,7 @@ public class Keys { public static final org.jooq.UniqueKey KEY_T_BOOLEANS_PRIMARY = createUniqueKey(org.jooq.test.mysql.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.mysql.generatedclasses.tables.TBooleans.ID); public static final org.jooq.UniqueKey KEY_T_DATES_PRIMARY = createUniqueKey(org.jooq.test.mysql.generatedclasses.tables.TDates.T_DATES, org.jooq.test.mysql.generatedclasses.tables.TDates.ID); public static final org.jooq.UniqueKey KEY_T_IDENTITY_PK_PRIMARY = createUniqueKey(org.jooq.test.mysql.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.mysql.generatedclasses.tables.TIdentityPk.ID); + public static final org.jooq.UniqueKey KEY_T_LANGUAGE_PRIMARY = createUniqueKey(org.jooq.test.mysql.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.mysql.generatedclasses.tables.TLanguage.ID); public static final org.jooq.UniqueKey KEY_T_TRIGGERS_PRIMARY = createUniqueKey(org.jooq.test.mysql.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.mysql.generatedclasses.tables.TTriggers.ID_GENERATED); public static final org.jooq.UniqueKey KEY_X_TEST_CASE_64_69_PRIMARY = createUniqueKey(org.jooq.test.mysql.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.mysql.generatedclasses.tables.XTestCase_64_69.ID); public static final org.jooq.UniqueKey KEY_X_TEST_CASE_71_PRIMARY = createUniqueKey(org.jooq.test.mysql.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.mysql.generatedclasses.tables.XTestCase_71.ID); @@ -77,6 +80,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.mysql.generatedclasses.Keys.KEY_T_AUTHOR_PRIMARY, org.jooq.test.mysql.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.mysql.generatedclasses.tables.TBook.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.mysql.generatedclasses.Keys.KEY_T_AUTHOR_PRIMARY, org.jooq.test.mysql.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.mysql.generatedclasses.tables.TBook.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.mysql.generatedclasses.Keys.KEY_T_LANGUAGE_PRIMARY, org.jooq.test.mysql.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.mysql.generatedclasses.tables.TBook.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.mysql.generatedclasses.Keys.KEY_T_BOOK_STORE_UK_T_BOOK_STORE_NAME, org.jooq.test.mysql.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.mysql.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.mysql.generatedclasses.Keys.KEY_T_BOOK_PRIMARY, org.jooq.test.mysql.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.mysql.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = createForeignKey(org.jooq.test.mysql.generatedclasses.Keys.KEY_X_UNUSED_PRIMARY, org.jooq.test.mysql.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.mysql.generatedclasses.tables.XTestCase_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Tables.java index e354c16aba..927aafa0df 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.mysql.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.mysql.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table test.t_658_ref - */ - public static final org.jooq.test.mysql.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.mysql.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table test.t_725_lob_test */ @@ -71,6 +66,11 @@ public final class Tables { */ public static final org.jooq.test.mysql.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.mysql.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * An entity holding language master data + */ + public static final org.jooq.test.mysql.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.mysql.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table test.t_triggers */ diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Test.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Test.java index f26a9f474b..ca2e3c73ea 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Test.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Test.java @@ -9,7 +9,7 @@ package org.jooq.test.mysql.generatedclasses; @java.lang.SuppressWarnings("all") public class Test extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = 445658821; + private static final long serialVersionUID = -877524307; /** * The singleton instance of test @@ -27,7 +27,6 @@ public class Test extends org.jooq.impl.SchemaImpl { public final java.util.List> getTables() { return java.util.Arrays.>asList( org.jooq.test.mysql.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.mysql.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.mysql.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.mysql.generatedclasses.tables.T_785.T_785, org.jooq.test.mysql.generatedclasses.tables.T_959.T_959, @@ -38,6 +37,7 @@ public class Test extends org.jooq.impl.SchemaImpl { org.jooq.test.mysql.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.mysql.generatedclasses.tables.TDates.T_DATES, org.jooq.test.mysql.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.mysql.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.mysql.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.mysql.generatedclasses.tables.TUnsigned.T_UNSIGNED, org.jooq.test.mysql.generatedclasses.tables.VAuthor.V_AUTHOR, diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/TLanguage.java deleted file mode 100644 index b66f4b7ef8..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - * - * An entity holding language master data - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The language ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The language ISO code - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The language description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_11.java deleted file mode 100644 index fdba704ea2..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A"), - - /** - * B - */ - B("B"), - - /** - * C - */ - C("C"), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_12.java deleted file mode 100644 index 9c1830fbf7..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A", "A"), - - /** - * B - */ - B("B", "B"), - - /** - * C - */ - C("C", "C"), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column test.t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 58254dea6d..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_22.java deleted file mode 100644 index bb41657e5b..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column test.t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_31.java deleted file mode 100644 index b7a2c76fc6..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_32.java deleted file mode 100644 index b53ef89b30..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column test.t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column test.t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TBook.java index 628d5e5e09..b74c24c953 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TBook.java @@ -11,7 +11,7 @@ package org.jooq.test.mysql.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 2087743895; + private static final long serialVersionUID = -900180183; /** * The singleton instance of test.t_book @@ -79,7 +79,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.mysql.generatedclasses.enums.TLanguage.class), T_BOOK); + public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, T_BOOK); /** * Some textual content of the book @@ -117,6 +117,6 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.mysql.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.mysql.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.mysql.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.mysql.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.mysql.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } } diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..68973ef78e --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TLanguage.java @@ -0,0 +1,68 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 891304432; + + /** + * The singleton instance of test.t_language + */ + public static final org.jooq.test.mysql.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.mysql.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.mysql.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The language ISO code + */ + public static final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, T_LANGUAGE); + + /** + * The language description + */ + public static final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column test.t_language.description_english + */ + public static final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public static final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, T_LANGUAGE); + + /** + * No further instances allowed + */ + private TLanguage() { + super("t_language", org.jooq.test.mysql.generatedclasses.Test.TEST); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.mysql.generatedclasses.Keys.KEY_T_LANGUAGE_PRIMARY; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.mysql.generatedclasses.Keys.KEY_T_LANGUAGE_PRIMARY); + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 6dc5d51b25..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 1214943937; - - /** - * The singleton instance of test.t_658_ref - */ - public static final org.jooq.test.mysql.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.mysql.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.mysql.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column test.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test.t_658_11 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.mysql.generatedclasses.enums.T_658_11.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test.t_658_21 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.mysql.generatedclasses.enums.T_658_21.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test.t_658_31 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.mysql.generatedclasses.enums.T_658_31.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test.t_658_12 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.mysql.generatedclasses.enums.T_658_12.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test.t_658_22 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.mysql.generatedclasses.enums.T_658_22.class), T_658_REF); - - /** - * The table column test.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test.t_658_32 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.mysql.generatedclasses.enums.T_658_32.class), T_658_REF); - - /** - * No further instances allowed - */ - private T_658Ref() { - super("t_658_ref", org.jooq.test.mysql.generatedclasses.Test.TEST); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/daos/TBookDao.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/daos/TBookDao.java index 3371ef750b..1ce3034e1e 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/daos/TBookDao.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/daos/TBookDao.java @@ -82,7 +82,7 @@ public class TBookDao extends org.jooq.impl.DAOImplLANGUAGE_ID IN (values) */ - public java.util.List fetchByLanguageId(org.jooq.test.mysql.generatedclasses.enums.TLanguage... values) { + public java.util.List fetchByLanguageId(java.lang.Integer... values) { return fetch(org.jooq.test.mysql.generatedclasses.tables.TBook.LANGUAGE_ID, values); } diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/daos/TLanguageDao.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/daos/TLanguageDao.java new file mode 100644 index 0000000000..9e81fdebae --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/daos/TLanguageDao.java @@ -0,0 +1,67 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql.generatedclasses.tables.daos; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguageDao extends org.jooq.impl.DAOImpl { + + /** + * Create a new TLanguageDao without any factory + */ + public TLanguageDao() { + super(org.jooq.test.mysql.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.mysql.generatedclasses.tables.pojos.TLanguage.class); + } + + /** + * Create a new TLanguageDao with an attached factory + */ + public TLanguageDao(org.jooq.impl.Factory factory) { + super(org.jooq.test.mysql.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.mysql.generatedclasses.tables.pojos.TLanguage.class, factory); + } + + @Override + protected java.lang.Integer getId(org.jooq.test.mysql.generatedclasses.tables.pojos.TLanguage object) { + return object.getId(); + } + + /** + * Fetch records that have CD IN (values) + */ + public java.util.List fetchByCd(java.lang.String... values) { + return fetch(org.jooq.test.mysql.generatedclasses.tables.TLanguage.CD, values); + } + + /** + * Fetch records that have DESCRIPTION IN (values) + */ + public java.util.List fetchByDescription(java.lang.String... values) { + return fetch(org.jooq.test.mysql.generatedclasses.tables.TLanguage.DESCRIPTION, values); + } + + /** + * Fetch records that have description_english IN (values) + */ + public java.util.List fetchByDescriptionEnglish(java.lang.String... values) { + return fetch(org.jooq.test.mysql.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, values); + } + + /** + * Fetch records that have ID IN (values) + */ + public java.util.List fetchById(java.lang.Integer... values) { + return fetch(org.jooq.test.mysql.generatedclasses.tables.TLanguage.ID, values); + } + + /** + * Fetch a unique that has ID = value + */ + public org.jooq.test.mysql.generatedclasses.tables.pojos.TLanguage fetchOneById(java.lang.Integer value) { + return fetchOne(org.jooq.test.mysql.generatedclasses.tables.TLanguage.ID, value); + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/TBook.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/TBook.java index 52c893242b..df43de93b5 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/TBook.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/TBook.java @@ -11,7 +11,7 @@ package org.jooq.test.mysql.generatedclasses.tables.pojos; @java.lang.SuppressWarnings("all") public class TBook implements java.io.Serializable { - private static final long serialVersionUID = -124526042; + private static final long serialVersionUID = -574305638; private final java.lang.Integer id; private final java.lang.Integer authorId; @@ -19,7 +19,7 @@ public class TBook implements java.io.Serializable { private final java.lang.Integer detailsId; private final java.lang.String title; private final java.lang.Integer publishedIn; - private final org.jooq.test.mysql.generatedclasses.enums.TLanguage languageId; + private final java.lang.Integer languageId; private final java.lang.String contentText; private final byte[] contentPdf; private final org.jooq.test.mysql.generatedclasses.enums.TBookStatus status; @@ -31,7 +31,7 @@ public class TBook implements java.io.Serializable { java.lang.Integer detailsId, java.lang.String title, java.lang.Integer publishedIn, - org.jooq.test.mysql.generatedclasses.enums.TLanguage languageId, + java.lang.Integer languageId, java.lang.String contentText, byte[] contentPdf, org.jooq.test.mysql.generatedclasses.enums.TBookStatus status @@ -72,7 +72,7 @@ public class TBook implements java.io.Serializable { return this.publishedIn; } - public org.jooq.test.mysql.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return this.languageId; } diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/TLanguage.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/TLanguage.java new file mode 100644 index 0000000000..a9879c92af --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/TLanguage.java @@ -0,0 +1,48 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql.generatedclasses.tables.pojos; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguage implements java.io.Serializable { + + private static final long serialVersionUID = -585072942; + + private final java.lang.String cd; + private final java.lang.String description; + private final java.lang.String descriptionEnglish; + private final java.lang.Integer id; + + public TLanguage( + java.lang.String cd, + java.lang.String description, + java.lang.String descriptionEnglish, + java.lang.Integer id + ) { + this.cd = cd; + this.description = description; + this.descriptionEnglish = descriptionEnglish; + this.id = id; + } + + public java.lang.String getCd() { + return this.cd; + } + + public java.lang.String getDescription() { + return this.description; + } + + public java.lang.String getDescriptionEnglish() { + return this.descriptionEnglish; + } + + public java.lang.Integer getId() { + return this.id; + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/T_658Ref.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/T_658Ref.java deleted file mode 100644 index 075a54c4de..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/pojos/T_658Ref.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.tables.pojos; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref implements java.io.Serializable { - - private static final long serialVersionUID = -831162091; - - private final org.jooq.test.mysql.generatedclasses.enums.T_658_11 ref_11; - private final org.jooq.test.mysql.generatedclasses.enums.T_658_21 ref_21; - private final org.jooq.test.mysql.generatedclasses.enums.T_658_31 ref_31; - private final org.jooq.test.mysql.generatedclasses.enums.T_658_12 ref_12; - private final org.jooq.test.mysql.generatedclasses.enums.T_658_22 ref_22; - private final org.jooq.test.mysql.generatedclasses.enums.T_658_32 ref_32; - - public T_658Ref( - org.jooq.test.mysql.generatedclasses.enums.T_658_11 ref_11, - org.jooq.test.mysql.generatedclasses.enums.T_658_21 ref_21, - org.jooq.test.mysql.generatedclasses.enums.T_658_31 ref_31, - org.jooq.test.mysql.generatedclasses.enums.T_658_12 ref_12, - org.jooq.test.mysql.generatedclasses.enums.T_658_22 ref_22, - org.jooq.test.mysql.generatedclasses.enums.T_658_32 ref_32 - ) { - this.ref_11 = ref_11; - this.ref_21 = ref_21; - this.ref_31 = ref_31; - this.ref_12 = ref_12; - this.ref_22 = ref_22; - this.ref_32 = ref_32; - } - - public org.jooq.test.mysql.generatedclasses.enums.T_658_11 getRef_11() { - return this.ref_11; - } - - public org.jooq.test.mysql.generatedclasses.enums.T_658_21 getRef_21() { - return this.ref_21; - } - - public org.jooq.test.mysql.generatedclasses.enums.T_658_31 getRef_31() { - return this.ref_31; - } - - public org.jooq.test.mysql.generatedclasses.enums.T_658_12 getRef_12() { - return this.ref_12; - } - - public org.jooq.test.mysql.generatedclasses.enums.T_658_22 getRef_22() { - return this.ref_22; - } - - public org.jooq.test.mysql.generatedclasses.enums.T_658_32 getRef_32() { - return this.ref_32; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TBookRecord.java index cf50fc2ace..247bad9def 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TBookRecord.java @@ -11,7 +11,7 @@ package org.jooq.test.mysql.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 1024638262; + private static final long serialVersionUID = 1393344354; /** * The book ID @@ -204,7 +204,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.mysql.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.mysql.generatedclasses.tables.TBook.LANGUAGE_ID, value); } @@ -217,10 +217,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.mysql.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.mysql.generatedclasses.tables.TBook.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.mysql.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.mysql.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TBook.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.mysql.generatedclasses.tables.TBook.LANGUAGE_ID, value.getValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.ID)); + } + } + + /** + * The language of the book + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT fk_t_book_language_id
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES test.t_language (ID)
+	 * 
+ */ + public org.jooq.test.mysql.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.mysql.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.mysql.generatedclasses.tables.TLanguage.ID.equal(getValue(org.jooq.test.mysql.generatedclasses.tables.TBook.LANGUAGE_ID))) + .fetchOne(); + } + /** * Some textual content of the book */ diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..41671b9943 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,94 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = 353619208; + + /** + * The language ISO code + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.CD, value); + } + + /** + * The language ISO code + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.CD); + } + + /** + * The language description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.DESCRIPTION, value); + } + + /** + * The language description + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.DESCRIPTION); + } + + /** + * The table column test.t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column test.t_language.description_english + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.ID, value); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.ID); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.mysql.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.mysql.generatedclasses.tables.TBook.LANGUAGE_ID.equal(getValue(org.jooq.test.mysql.generatedclasses.tables.TLanguage.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.mysql.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index c0bd4d8e95..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = 648911234; - - /** - * The table column test.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test.t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.mysql.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_11, value); - } - - /** - * The table column test.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test.t_658_11 (id)
-	 * 
- */ - public org.jooq.test.mysql.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_11); - } - - /** - * The table column test.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test.t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.mysql.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_21, value); - } - - /** - * The table column test.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test.t_658_21 (id)
-	 * 
- */ - public org.jooq.test.mysql.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_21); - } - - /** - * The table column test.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test.t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.mysql.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_31, value); - } - - /** - * The table column test.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test.t_658_31 (id)
-	 * 
- */ - public org.jooq.test.mysql.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_31); - } - - /** - * The table column test.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test.t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.mysql.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_12, value); - } - - /** - * The table column test.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test.t_658_12 (id)
-	 * 
- */ - public org.jooq.test.mysql.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_12); - } - - /** - * The table column test.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test.t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.mysql.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_22, value); - } - - /** - * The table column test.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test.t_658_22 (id)
-	 * 
- */ - public org.jooq.test.mysql.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_22); - } - - /** - * The table column test.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test.t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.mysql.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_32, value); - } - - /** - * The table column test.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test.t_658_32 (id)
-	 * 
- */ - public org.jooq.test.mysql.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.mysql.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql/reset.sql b/jOOQ-test/src/org/jooq/test/mysql/reset.sql index b3ae9290d1..c91b657815 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/reset.sql +++ b/jOOQ-test/src/org/jooq/test/mysql/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ DELETE FROM t_book/ @@ -22,14 +15,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ -INSERT INTO t_658_11 VALUES ('A'), ('B'), ('C')/ -INSERT INTO t_658_21 VALUES (1), (2), (3)/ -INSERT INTO t_658_31 VALUES (1), (2), (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A'), ('B', 'B'), ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author VALUES (1, 'George', 'Orwell', '1903-06-25', 1903, null);/ INSERT INTO t_author VALUES (2, 'Paulo', 'Coelho', '1947-08-24', 1947, null);/ diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Keys.java index af9c385643..9bafa0394e 100644 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Keys.java @@ -26,6 +26,7 @@ public class Keys { public static final org.jooq.UniqueKey KEY_T_BOOLEANS_PRIMARY = UniqueKeys0.KEY_T_BOOLEANS_PRIMARY; public static final org.jooq.UniqueKey KEY_T_DATES_PRIMARY = UniqueKeys0.KEY_T_DATES_PRIMARY; public static final org.jooq.UniqueKey KEY_T_IDENTITY_PK_PRIMARY = UniqueKeys0.KEY_T_IDENTITY_PK_PRIMARY; + public static final org.jooq.UniqueKey KEY_T_LANGUAGE_PRIMARY = UniqueKeys0.KEY_T_LANGUAGE_PRIMARY; public static final org.jooq.UniqueKey KEY_T_TRIGGERS_PRIMARY = UniqueKeys0.KEY_T_TRIGGERS_PRIMARY; public static final org.jooq.UniqueKey KEY_X_TEST_CASE_64_69_PRIMARY = UniqueKeys0.KEY_X_TEST_CASE_64_69_PRIMARY; public static final org.jooq.UniqueKey KEY_X_TEST_CASE_71_PRIMARY = UniqueKeys0.KEY_X_TEST_CASE_71_PRIMARY; @@ -36,6 +37,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = ForeignKeys0.FK_X_TEST_CASE_64_69A; @@ -65,6 +67,7 @@ public class Keys { public static final org.jooq.UniqueKey KEY_T_BOOLEANS_PRIMARY = createUniqueKey(org.jooq.test.mysql2.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.mysql2.generatedclasses.tables.TBooleans.T_BOOLEANS.ID); public static final org.jooq.UniqueKey KEY_T_DATES_PRIMARY = createUniqueKey(org.jooq.test.mysql2.generatedclasses.tables.TDates.T_DATES, org.jooq.test.mysql2.generatedclasses.tables.TDates.T_DATES.ID); public static final org.jooq.UniqueKey KEY_T_IDENTITY_PK_PRIMARY = createUniqueKey(org.jooq.test.mysql2.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.mysql2.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK.ID); + public static final org.jooq.UniqueKey KEY_T_LANGUAGE_PRIMARY = createUniqueKey(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); public static final org.jooq.UniqueKey KEY_T_TRIGGERS_PRIMARY = createUniqueKey(org.jooq.test.mysql2.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.mysql2.generatedclasses.tables.TTriggers.T_TRIGGERS.ID_GENERATED); public static final org.jooq.UniqueKey KEY_X_TEST_CASE_64_69_PRIMARY = createUniqueKey(org.jooq.test.mysql2.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.mysql2.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.ID); public static final org.jooq.UniqueKey KEY_X_TEST_CASE_71_PRIMARY = createUniqueKey(org.jooq.test.mysql2.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.mysql2.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.ID); @@ -77,6 +80,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_AUTHOR_PRIMARY, org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_AUTHOR_PRIMARY, org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_LANGUAGE_PRIMARY, org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_BOOK_STORE_UK_T_BOOK_STORE_NAME, org.jooq.test.mysql2.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.mysql2.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_BOOK_PRIMARY, org.jooq.test.mysql2.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.mysql2.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_ID); public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = createForeignKey(org.jooq.test.mysql2.generatedclasses.Keys.KEY_X_UNUSED_PRIMARY, org.jooq.test.mysql2.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.mysql2.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Tables.java index 5fdeb2ca53..dbc938e00a 100644 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.mysql2.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.mysql2.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table test2.t_658_ref - */ - public static final org.jooq.test.mysql2.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table test2.t_725_lob_test */ @@ -71,6 +66,11 @@ public final class Tables { */ public static final org.jooq.test.mysql2.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.mysql2.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * An entity holding language master data + */ + public static final org.jooq.test.mysql2.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table test2.t_triggers */ diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Test2.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Test2.java index 2f6b4dab89..e2852a8c1d 100644 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Test2.java +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/Test2.java @@ -9,7 +9,7 @@ package org.jooq.test.mysql2.generatedclasses; @java.lang.SuppressWarnings("all") public class Test2 extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -844860553; + private static final long serialVersionUID = -1453462613; /** * The singleton instance of test2 @@ -27,7 +27,6 @@ public class Test2 extends org.jooq.impl.SchemaImpl { public final java.util.List> getTables() { return java.util.Arrays.>asList( org.jooq.test.mysql2.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.mysql2.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.mysql2.generatedclasses.tables.T_785.T_785, org.jooq.test.mysql2.generatedclasses.tables.T_959.T_959, @@ -38,6 +37,7 @@ public class Test2 extends org.jooq.impl.SchemaImpl { org.jooq.test.mysql2.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.mysql2.generatedclasses.tables.TDates.T_DATES, org.jooq.test.mysql2.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.mysql2.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.mysql2.generatedclasses.tables.TUnsigned.T_UNSIGNED, org.jooq.test.mysql2.generatedclasses.tables.VAuthor.V_AUTHOR, diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 57266606f1..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - * - * An entity holding language master data - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The language ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The language ISO code - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The language description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 3238f8c513..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A"), - - /** - * B - */ - B("B"), - - /** - * C - */ - C("C"), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column test2.t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_12.java deleted file mode 100644 index affb14c716..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A", "A"), - - /** - * B - */ - B("B", "B"), - - /** - * C - */ - C("C", "C"), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column test2.t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column test2.t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_21.java deleted file mode 100644 index d460dad5cd..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column test2.t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 531fb49b2d..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column test2.t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column test2.t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_31.java deleted file mode 100644 index 0e889868aa..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column test2.t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_32.java deleted file mode 100644 index 3b678235ef..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column test2.t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column test2.t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/TBook.java index 6c7bff1416..2010d08e6e 100644 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/TBook.java @@ -11,7 +11,7 @@ package org.jooq.test.mysql2.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 785732866; + private static final long serialVersionUID = -1537174890; /** * The singleton instance of test2.t_book @@ -79,7 +79,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.mysql2.generatedclasses.enums.TLanguage.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, this); /** * Some textual content of the book @@ -118,7 +118,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.mysql2.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.mysql2.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.mysql2.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.mysql2.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.mysql2.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..3085ce7026 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/TLanguage.java @@ -0,0 +1,74 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql2.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = -745339804; + + /** + * The singleton instance of test2.t_language + */ + public static final org.jooq.test.mysql2.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.mysql2.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.mysql2.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The language ISO code + */ + public final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, this); + + /** + * The language description + */ + public final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column test2.t_language.description_english + */ + public final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, this); + + public TLanguage() { + super("t_language", org.jooq.test.mysql2.generatedclasses.Test2.TEST2); + } + + public TLanguage(java.lang.String alias) { + super(alias, org.jooq.test.mysql2.generatedclasses.Test2.TEST2, org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_LANGUAGE_PRIMARY; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.mysql2.generatedclasses.Keys.KEY_T_LANGUAGE_PRIMARY); + } + + @Override + public org.jooq.test.mysql2.generatedclasses.tables.TLanguage as(java.lang.String alias) { + return new org.jooq.test.mysql2.generatedclasses.tables.TLanguage(alias); + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 866f0f2cbe..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 1796762242; - - /** - * The singleton instance of test2.t_658_ref - */ - public static final org.jooq.test.mysql2.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.mysql2.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.mysql2.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column test2.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test2.t_658_11 (id)
-	 * 
- */ - public final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.mysql2.generatedclasses.enums.T_658_11.class), this); - - /** - * The table column test2.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test2.t_658_21 (id)
-	 * 
- */ - public final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.mysql2.generatedclasses.enums.T_658_21.class), this); - - /** - * The table column test2.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test2.t_658_31 (id)
-	 * 
- */ - public final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.mysql2.generatedclasses.enums.T_658_31.class), this); - - /** - * The table column test2.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test2.t_658_12 (id)
-	 * 
- */ - public final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.mysql2.generatedclasses.enums.T_658_12.class), this); - - /** - * The table column test2.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test2.t_658_22 (id)
-	 * 
- */ - public final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.mysql2.generatedclasses.enums.T_658_22.class), this); - - /** - * The table column test2.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test2.t_658_32 (id)
-	 * 
- */ - public final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.mysql2.generatedclasses.enums.T_658_32.class), this); - - public T_658Ref() { - super("t_658_ref", org.jooq.test.mysql2.generatedclasses.Test2.TEST2); - } - - public T_658Ref(java.lang.String alias) { - super(alias, org.jooq.test.mysql2.generatedclasses.Test2.TEST2, org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } - - @Override - public org.jooq.test.mysql2.generatedclasses.tables.T_658Ref as(java.lang.String alias) { - return new org.jooq.test.mysql2.generatedclasses.tables.T_658Ref(alias); - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/TBook.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/TBook.java index 5dfc9e1a1a..191614b47d 100644 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/TBook.java +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/TBook.java @@ -13,7 +13,7 @@ package org.jooq.test.mysql2.generatedclasses.tables.pojos; @javax.persistence.Table(name = "t_book", schema = "test2") public class TBook implements java.io.Serializable { - private static final long serialVersionUID = -1320897474; + private static final long serialVersionUID = 1021357356; private java.lang.Integer id; private java.lang.Integer authorId; @@ -21,7 +21,7 @@ public class TBook implements java.io.Serializable { private java.lang.Integer detailsId; private java.lang.String title; private java.lang.Integer publishedIn; - private org.jooq.test.mysql2.generatedclasses.enums.TLanguage languageId; + private java.lang.Integer languageId; private java.lang.String contentText; private byte[] contentPdf; private org.jooq.test.mysql2.generatedclasses.enums.TBookStatus status; @@ -82,11 +82,11 @@ public class TBook implements java.io.Serializable { } @javax.persistence.Column(name = "LANGUAGE_ID", nullable = false, precision = 10) - public org.jooq.test.mysql2.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return this.languageId; } - public void setLanguageId(org.jooq.test.mysql2.generatedclasses.enums.TLanguage languageId) { + public void setLanguageId(java.lang.Integer languageId) { this.languageId = languageId; } diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/TLanguage.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/TLanguage.java new file mode 100644 index 0000000000..0d15b4ffb3 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/TLanguage.java @@ -0,0 +1,59 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql2.generatedclasses.tables.pojos; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "t_language", schema = "test2") +public class TLanguage implements java.io.Serializable { + + private static final long serialVersionUID = 1464041773; + + private java.lang.String cd; + private java.lang.String description; + private java.lang.String descriptionEnglish; + private java.lang.Integer id; + + @javax.persistence.Column(name = "CD", nullable = false, length = 2) + public java.lang.String getCd() { + return this.cd; + } + + public void setCd(java.lang.String cd) { + this.cd = cd; + } + + @javax.persistence.Column(name = "DESCRIPTION", length = 50) + public java.lang.String getDescription() { + return this.description; + } + + public void setDescription(java.lang.String description) { + this.description = description; + } + + @javax.persistence.Column(name = "description_english", length = 50) + public java.lang.String getDescriptionEnglish() { + return this.descriptionEnglish; + } + + public void setDescriptionEnglish(java.lang.String descriptionEnglish) { + this.descriptionEnglish = descriptionEnglish; + } + + @javax.persistence.Id + @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 10) + public java.lang.Integer getId() { + return this.id; + } + + public void setId(java.lang.Integer id) { + this.id = id; + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/T_658Ref.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/T_658Ref.java deleted file mode 100644 index f99e019913..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/pojos/T_658Ref.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.tables.pojos; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "t_658_ref", schema = "test2") -public class T_658Ref implements java.io.Serializable { - - private static final long serialVersionUID = -1852977893; - - private org.jooq.test.mysql2.generatedclasses.enums.T_658_11 ref_11; - private org.jooq.test.mysql2.generatedclasses.enums.T_658_21 ref_21; - private org.jooq.test.mysql2.generatedclasses.enums.T_658_31 ref_31; - private org.jooq.test.mysql2.generatedclasses.enums.T_658_12 ref_12; - private org.jooq.test.mysql2.generatedclasses.enums.T_658_22 ref_22; - private org.jooq.test.mysql2.generatedclasses.enums.T_658_32 ref_32; - - @javax.persistence.Column(name = "ref_11", length = 3) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_11 getRef_11() { - return this.ref_11; - } - - public void setRef_11(org.jooq.test.mysql2.generatedclasses.enums.T_658_11 ref_11) { - this.ref_11 = ref_11; - } - - @javax.persistence.Column(name = "ref_21", precision = 10) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_21 getRef_21() { - return this.ref_21; - } - - public void setRef_21(org.jooq.test.mysql2.generatedclasses.enums.T_658_21 ref_21) { - this.ref_21 = ref_21; - } - - @javax.persistence.Column(name = "ref_31", precision = 19) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_31 getRef_31() { - return this.ref_31; - } - - public void setRef_31(org.jooq.test.mysql2.generatedclasses.enums.T_658_31 ref_31) { - this.ref_31 = ref_31; - } - - @javax.persistence.Column(name = "ref_12", length = 3) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_12 getRef_12() { - return this.ref_12; - } - - public void setRef_12(org.jooq.test.mysql2.generatedclasses.enums.T_658_12 ref_12) { - this.ref_12 = ref_12; - } - - @javax.persistence.Column(name = "ref_22", precision = 10) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_22 getRef_22() { - return this.ref_22; - } - - public void setRef_22(org.jooq.test.mysql2.generatedclasses.enums.T_658_22 ref_22) { - this.ref_22 = ref_22; - } - - @javax.persistence.Column(name = "ref_32", precision = 19) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_32 getRef_32() { - return this.ref_32; - } - - public void setRef_32(org.jooq.test.mysql2.generatedclasses.enums.T_658_32 ref_32) { - this.ref_32 = ref_32; - } -} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/TBookRecord.java index 66fd037860..4bacc3d828 100644 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/TBookRecord.java @@ -13,7 +13,7 @@ package org.jooq.test.mysql2.generatedclasses.tables.records; @javax.persistence.Table(name = "t_book", schema = "test2") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -2116766787; + private static final long serialVersionUID = -1071715845; /** * The book ID @@ -213,7 +213,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.mysql2.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value); } @@ -227,10 +227,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @javax.persistence.Column(name = "LANGUAGE_ID", nullable = false, precision = 10) - public org.jooq.test.mysql2.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.mysql2.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.mysql2.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value.getValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.ID)); + } + } + + /** + * The language of the book + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT fk_t_book_language_id
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES test2.t_language (ID)
+	 * 
+ */ + public org.jooq.test.mysql2.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.ID.equal(getValue(org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * Some textual content of the book */ diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..0463bd84a3 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,101 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql2.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "t_language", schema = "test2") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = -1773484515; + + /** + * The language ISO code + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.CD, value); + } + + /** + * The language ISO code + */ + @javax.persistence.Column(name = "CD", nullable = false, length = 2) + public java.lang.String getCd() { + return getValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.CD); + } + + /** + * The language description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION, value); + } + + /** + * The language description + */ + @javax.persistence.Column(name = "DESCRIPTION", length = 50) + public java.lang.String getDescription() { + return getValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION); + } + + /** + * The table column test2.t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column test2.t_language.description_english + */ + @javax.persistence.Column(name = "description_english", length = 50) + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.ID, value); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @javax.persistence.Id + @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 10) + public java.lang.Integer getId() { + return getValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.mysql2.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID.equal(getValue(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.mysql2.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index 75e233e096..0000000000 --- a/jOOQ-test/src/org/jooq/test/mysql2/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.mysql2.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "t_658_ref", schema = "test2") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -2132436229; - - /** - * The table column test2.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test2.t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.mysql2.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_11, value); - } - - /** - * The table column test2.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES test2.t_658_11 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_11", length = 3) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_11); - } - - /** - * The table column test2.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test2.t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.mysql2.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_21, value); - } - - /** - * The table column test2.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES test2.t_658_21 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_21", precision = 10) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_21); - } - - /** - * The table column test2.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test2.t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.mysql2.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_31, value); - } - - /** - * The table column test2.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES test2.t_658_31 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_31", precision = 19) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_31); - } - - /** - * The table column test2.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test2.t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.mysql2.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_12, value); - } - - /** - * The table column test2.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES test2.t_658_12 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_12", length = 3) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_12); - } - - /** - * The table column test2.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test2.t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.mysql2.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_22, value); - } - - /** - * The table column test2.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES test2.t_658_22 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_22", precision = 10) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_22); - } - - /** - * The table column test2.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test2.t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.mysql2.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_32, value); - } - - /** - * The table column test2.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES test2.t_658_32 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_32", precision = 19) - public org.jooq.test.mysql2.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.mysql2.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/create.sql b/jOOQ-test/src/org/jooq/test/oracle/create.sql index e0ad7f836f..5c583379f1 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/create.sql +++ b/jOOQ-test/src/org/jooq/test/oracle/create.sql @@ -32,13 +32,6 @@ DROP TABLE x_test_case_85/ DROP TABLE x_unused/ DROP TABLE x_many_fields/ DROP TABLE t_639_numbers_table/ -DROP TABLE t_658_ref/ -DROP TABLE t_658_11/ -DROP TABLE t_658_21/ -DROP TABLE t_658_31/ -DROP TABLE t_658_12/ -DROP TABLE t_658_22/ -DROP TABLE t_658_32/ DROP TABLE t_725_lob_test/ DROP TABLE t_785/ DROP TABLE t_booleans/ @@ -421,67 +414,6 @@ COMMENT ON COLUMN t_language.id IS 'The language ID'/ COMMENT ON COLUMN t_language.cd IS 'The language ISO code'/ COMMENT ON COLUMN t_language.description IS 'The language description'/ -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id number(7) NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id number(15) NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id number(7) NOT NULL, - cd number(7) NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id number(15) NOT NULL, - cd number(15) NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 number(7), - ref_31 number(15), - ref_12 char(3), - ref_22 number(7), - ref_32 number(15), - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID NUMBER(7) NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/Keys.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/Keys.java index 6d44cd7eab..6a4a03ed7f 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/Keys.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/Keys.java @@ -22,6 +22,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_T_BOOK_TO_BOOK_STORE = ForeignKeys0.FK_T_BOOK_TO_BOOK_STORE; /** @@ -40,6 +41,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.oracle.generatedclasses.multi_schema.Keys.PK_T_AUTHOR, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.oracle.generatedclasses.multi_schema.Keys.PK_T_AUTHOR, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.oracle.generatedclasses.test.Keys.PK_T_LANGUAGE, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_T_BOOK_TO_BOOK_STORE = createForeignKey(org.jooq.test.oracle.generatedclasses.test.Keys.PK_B2BS, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBookSale.T_BOOK_SALE, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBookSale.T_BOOK_SALE.BOOK_STORE_NAME, org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBookSale.T_BOOK_SALE.BOOK_ID); } } diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/TBook.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/TBook.java index 98f28386cd..5c98de5fbe 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.oracle.generatedclasses.multi_schema.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -89701971; + private static final long serialVersionUID = -651325368; /** * The singleton instance of MULTI_SCHEMA.T_BOOK @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.oracle.generatedclasses.test.enums.TLanguage.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, this); /** * The table column MULTI_SCHEMA.T_BOOK.CONTENT_TEXT @@ -111,7 +111,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.oracle.generatedclasses.multi_schema.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.oracle.generatedclasses.multi_schema.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.oracle.generatedclasses.multi_schema.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.oracle.generatedclasses.multi_schema.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.oracle.generatedclasses.multi_schema.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/daos/TBookDao.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/daos/TBookDao.java index be183cf0d0..908285ce46 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/daos/TBookDao.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/daos/TBookDao.java @@ -80,7 +80,7 @@ public class TBookDao extends org.jooq.impl.DAOImplLANGUAGE_ID IN (values) */ - public java.util.List fetchByLanguageId(org.jooq.test.oracle.generatedclasses.test.enums.TLanguage... values) { + public java.util.List fetchByLanguageId(java.lang.Integer... values) { return fetch(org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.LANGUAGE_ID, values); } diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/pojos/TBook.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/pojos/TBook.java index 7a94e2a1c5..856038e707 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/pojos/TBook.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/pojos/TBook.java @@ -11,28 +11,28 @@ package org.jooq.test.oracle.generatedclasses.multi_schema.tables.pojos; @javax.persistence.Table(name = "T_BOOK", schema = "MULTI_SCHEMA") public class TBook implements java.io.Serializable { - private static final long serialVersionUID = 2065168919; + private static final long serialVersionUID = -1644570779; @javax.validation.constraints.NotNull - private java.lang.Integer id; + private java.lang.Integer id; @javax.validation.constraints.NotNull - private java.lang.Integer authorId; - private java.lang.Integer coAuthorId; - private java.lang.Integer detailsId; + private java.lang.Integer authorId; + private java.lang.Integer coAuthorId; + private java.lang.Integer detailsId; @javax.validation.constraints.NotNull @javax.validation.constraints.Size(max = 400) - private java.lang.String title; + private java.lang.String title; @javax.validation.constraints.NotNull - private java.lang.Integer publishedIn; + private java.lang.Integer publishedIn; @javax.validation.constraints.NotNull - private org.jooq.test.oracle.generatedclasses.test.enums.TLanguage languageId; - private java.lang.String contentText; - private byte[] contentPdf; + private java.lang.Integer languageId; + private java.lang.String contentText; + private byte[] contentPdf; @javax.persistence.Id @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7) @@ -90,11 +90,11 @@ public class TBook implements java.io.Serializable { } @javax.persistence.Column(name = "LANGUAGE_ID", nullable = false, precision = 7) - public org.jooq.test.oracle.generatedclasses.test.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return this.languageId; } - public void setLanguageId(org.jooq.test.oracle.generatedclasses.test.enums.TLanguage languageId) { + public void setLanguageId(java.lang.Integer languageId) { this.languageId = languageId; } diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/records/TBookRecord.java index 0f51898d07..65e0a46748 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/multi_schema/tables/records/TBookRecord.java @@ -11,7 +11,7 @@ package org.jooq.test.oracle.generatedclasses.multi_schema.tables.records; @javax.persistence.Table(name = "T_BOOK", schema = "MULTI_SCHEMA") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 567805745; + private static final long serialVersionUID = 568022891; /** * The table column MULTI_SCHEMA.T_BOOK.ID @@ -199,7 +199,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.oracle.generatedclasses.test.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.LANGUAGE_ID, value); } @@ -213,10 +213,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @javax.persistence.Column(name = "LANGUAGE_ID", nullable = false, precision = 7) - public org.jooq.test.oracle.generatedclasses.test.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.oracle.generatedclasses.test.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.oracle.generatedclasses.test.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.LANGUAGE_ID, value.getValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID)); + } + } + + /** + * The table column MULTI_SCHEMA.T_BOOK.LANGUAGE_ID + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT FK_T_BOOK_LANGUAGE_ID
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES TEST.T_LANGUAGE (ID)
+	 * 
+ */ + public org.jooq.test.oracle.generatedclasses.test.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID.equal(getValue(org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column MULTI_SCHEMA.T_BOOK.CONTENT_TEXT */ diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Keys.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Keys.java index 691196d721..2d22fef60f 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Keys.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Keys.java @@ -23,6 +23,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; public static final org.jooq.UniqueKey PK_T_DIRECTORY = UniqueKeys0.PK_T_DIRECTORY; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; public static final org.jooq.UniqueKey PK_T_639_NUMBERS_TABLE = UniqueKeys0.PK_T_639_NUMBERS_TABLE; public static final org.jooq.UniqueKey PK_T_725_LOB_TEST = UniqueKeys0.PK_T_725_LOB_TEST; @@ -35,6 +36,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey PK_T_DIRECTORY_SELF = ForeignKeys0.PK_T_DIRECTORY_SELF; @@ -58,6 +60,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.oracle.generatedclasses.test.tables.TBooleans.T_BOOLEANS, org.jooq.test.oracle.generatedclasses.test.tables.TBooleans.T_BOOLEANS.ID); public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.oracle.generatedclasses.test.tables.TDates.T_DATES, org.jooq.test.oracle.generatedclasses.test.tables.TDates.T_DATES.ID); public static final org.jooq.UniqueKey PK_T_DIRECTORY = createUniqueKey(org.jooq.test.oracle.generatedclasses.test.tables.TDirectory.T_DIRECTORY, org.jooq.test.oracle.generatedclasses.test.tables.TDirectory.T_DIRECTORY.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE, org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.oracle.generatedclasses.test.tables.TTriggers.T_TRIGGERS, org.jooq.test.oracle.generatedclasses.test.tables.TTriggers.T_TRIGGERS.ID_GENERATED); public static final org.jooq.UniqueKey PK_T_639_NUMBERS_TABLE = createUniqueKey(org.jooq.test.oracle.generatedclasses.test.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, org.jooq.test.oracle.generatedclasses.test.tables.T_639NumbersTable.T_639_NUMBERS_TABLE.ID); public static final org.jooq.UniqueKey PK_T_725_LOB_TEST = createUniqueKey(org.jooq.test.oracle.generatedclasses.test.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.oracle.generatedclasses.test.tables.T_725LobTest.T_725_LOB_TEST.ID); @@ -72,6 +75,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.oracle.generatedclasses.test.Keys.PK_T_AUTHOR, org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK, org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.oracle.generatedclasses.test.Keys.PK_T_AUTHOR, org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK, org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.oracle.generatedclasses.test.Keys.PK_T_LANGUAGE, org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK, org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.oracle.generatedclasses.test.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.oracle.generatedclasses.test.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.oracle.generatedclasses.test.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.oracle.generatedclasses.test.Keys.PK_T_BOOK, org.jooq.test.oracle.generatedclasses.test.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.oracle.generatedclasses.test.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_ID); public static final org.jooq.ForeignKey PK_T_DIRECTORY_SELF = createForeignKey(org.jooq.test.oracle.generatedclasses.test.Keys.PK_T_DIRECTORY, org.jooq.test.oracle.generatedclasses.test.tables.TDirectory.T_DIRECTORY, org.jooq.test.oracle.generatedclasses.test.tables.TDirectory.T_DIRECTORY.PARENT_ID); diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Tables.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Tables.java index b363085cb0..ee4e610c4b 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Tables.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Tables.java @@ -56,6 +56,11 @@ public final class Tables { */ public static final org.jooq.test.oracle.generatedclasses.test.tables.TDirectory T_DIRECTORY = org.jooq.test.oracle.generatedclasses.test.tables.TDirectory.T_DIRECTORY; + /** + * An entity holding language master data + */ + public static final org.jooq.test.oracle.generatedclasses.test.tables.TLanguage T_LANGUAGE = org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE; + /** * The table TEST.T_TRIGGERS */ @@ -66,11 +71,6 @@ public final class Tables { */ public static final org.jooq.test.oracle.generatedclasses.test.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.oracle.generatedclasses.test.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table TEST.T_658_REF - */ - public static final org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref T_658_REF = org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF; - /** * The table TEST.T_725_LOB_TEST */ diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Test.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Test.java index 6eac5d4b8d..4c08879497 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Test.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/Test.java @@ -9,7 +9,7 @@ package org.jooq.test.oracle.generatedclasses.test; @java.lang.SuppressWarnings("all") public class Test extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -37182850; + private static final long serialVersionUID = -2054301366; /** * The singleton instance of TEST @@ -46,9 +46,9 @@ public class Test extends org.jooq.impl.SchemaImpl { org.jooq.test.oracle.generatedclasses.test.tables.TBooleans.T_BOOLEANS, org.jooq.test.oracle.generatedclasses.test.tables.TDates.T_DATES, org.jooq.test.oracle.generatedclasses.test.tables.TDirectory.T_DIRECTORY, + org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE, org.jooq.test.oracle.generatedclasses.test.tables.TTriggers.T_TRIGGERS, org.jooq.test.oracle.generatedclasses.test.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF, org.jooq.test.oracle.generatedclasses.test.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.oracle.generatedclasses.test.tables.T_785.T_785, org.jooq.test.oracle.generatedclasses.test.tables.VAuthor.V_AUTHOR, diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/TLanguage.java deleted file mode 100644 index 5cfac922d8..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/TLanguage.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.enums; - -/** - * This class is generated by jOOQ. - * - * An entity holding language master data - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The language ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The language ISO code - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The language description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_11.java deleted file mode 100644 index 6afe8d8330..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_11.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_12.java deleted file mode 100644 index b4d0e07ae7..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_12.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column TEST.T_658_12.CD - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_21.java deleted file mode 100644 index 56b4c238eb..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_21.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_22.java deleted file mode 100644 index 480cf5e721..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_22.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column TEST.T_658_22.CD - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_31.java deleted file mode 100644 index fe1c683c48..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_31.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_32.java deleted file mode 100644 index b4a8e3580c..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column TEST.T_658_32.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column TEST.T_658_32.CD - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/TBook.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/TBook.java index 36d18bc838..1d58a92086 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/TBook.java @@ -11,7 +11,7 @@ package org.jooq.test.oracle.generatedclasses.test.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 1706835991; + private static final long serialVersionUID = 897320989; /** * The singleton instance of TEST.T_BOOK @@ -79,7 +79,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.oracle.generatedclasses.test.enums.TLanguage.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, this); /** * Some textual content of the book @@ -113,7 +113,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.oracle.generatedclasses.test.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.oracle.generatedclasses.test.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.oracle.generatedclasses.test.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.oracle.generatedclasses.test.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.oracle.generatedclasses.test.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/TLanguage.java new file mode 100644 index 0000000000..ca2d14fd37 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/TLanguage.java @@ -0,0 +1,74 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.oracle.generatedclasses.test.tables; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = -1342782850; + + /** + * The singleton instance of TEST.T_LANGUAGE + */ + public static final org.jooq.test.oracle.generatedclasses.test.tables.TLanguage T_LANGUAGE = new org.jooq.test.oracle.generatedclasses.test.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.oracle.generatedclasses.test.tables.records.TLanguageRecord.class; + } + + /** + * The language ISO code + */ + public final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, this); + + /** + * The language description + */ + public final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public final org.jooq.TableField DESCRIPTION_ENGLISH = createField("DESCRIPTION_ENGLISH", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, this); + + public TLanguage() { + super("T_LANGUAGE", org.jooq.test.oracle.generatedclasses.test.Test.TEST); + } + + public TLanguage(java.lang.String alias) { + super(alias, org.jooq.test.oracle.generatedclasses.test.Test.TEST, org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.oracle.generatedclasses.test.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.oracle.generatedclasses.test.Keys.PK_T_LANGUAGE); + } + + @Override + public org.jooq.test.oracle.generatedclasses.test.tables.TLanguage as(java.lang.String alias) { + return new org.jooq.test.oracle.generatedclasses.test.tables.TLanguage(alias); + } +} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/T_658Ref.java deleted file mode 100644 index e32a1ed507..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/T_658Ref.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 515311900; - - /** - * The singleton instance of TEST.T_658_REF - */ - public static final org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref T_658_REF = new org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.oracle.generatedclasses.test.tables.records.T_658RefRecord.class; - } - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_11 = createField("REF_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.oracle.generatedclasses.test.enums.T_658_11.class), this); - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_21 = createField("REF_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.oracle.generatedclasses.test.enums.T_658_21.class), this); - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_31 = createField("REF_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.oracle.generatedclasses.test.enums.T_658_31.class), this); - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_12 = createField("REF_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.oracle.generatedclasses.test.enums.T_658_12.class), this); - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_22 = createField("REF_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.oracle.generatedclasses.test.enums.T_658_22.class), this); - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_32 = createField("REF_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.oracle.generatedclasses.test.enums.T_658_32.class), this); - - public T_658Ref() { - super("T_658_REF", org.jooq.test.oracle.generatedclasses.test.Test.TEST); - } - - public T_658Ref(java.lang.String alias) { - super(alias, org.jooq.test.oracle.generatedclasses.test.Test.TEST, org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } - - @Override - public org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref as(java.lang.String alias) { - return new org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref(alias); - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/daos/TBookDao.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/daos/TBookDao.java index 86fee29569..4ba396d5e7 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/daos/TBookDao.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/daos/TBookDao.java @@ -82,7 +82,7 @@ public class TBookDao extends org.jooq.impl.DAOImplLANGUAGE_ID IN (values) */ - public java.util.List fetchByLanguageId(org.jooq.test.oracle.generatedclasses.test.enums.TLanguage... values) { + public java.util.List fetchByLanguageId(java.lang.Integer... values) { return fetch(org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.LANGUAGE_ID, values); } diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/daos/TLanguageDao.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/daos/TLanguageDao.java new file mode 100644 index 0000000000..e623d31afd --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/daos/TLanguageDao.java @@ -0,0 +1,67 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.oracle.generatedclasses.test.tables.daos; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguageDao extends org.jooq.impl.DAOImpl { + + /** + * Create a new TLanguageDao without any factory + */ + public TLanguageDao() { + super(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE, org.jooq.test.oracle.generatedclasses.test.tables.pojos.TLanguage.class); + } + + /** + * Create a new TLanguageDao with an attached factory + */ + public TLanguageDao(org.jooq.impl.Factory factory) { + super(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE, org.jooq.test.oracle.generatedclasses.test.tables.pojos.TLanguage.class, factory); + } + + @Override + protected java.lang.Integer getId(org.jooq.test.oracle.generatedclasses.test.tables.pojos.TLanguage object) { + return object.getId(); + } + + /** + * Fetch records that have CD IN (values) + */ + public java.util.List fetchByCd(java.lang.String... values) { + return fetch(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.CD, values); + } + + /** + * Fetch records that have DESCRIPTION IN (values) + */ + public java.util.List fetchByDescription(java.lang.String... values) { + return fetch(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.DESCRIPTION, values); + } + + /** + * Fetch records that have DESCRIPTION_ENGLISH IN (values) + */ + public java.util.List fetchByDescriptionEnglish(java.lang.String... values) { + return fetch(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH, values); + } + + /** + * Fetch records that have ID IN (values) + */ + public java.util.List fetchById(java.lang.Integer... values) { + return fetch(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID, values); + } + + /** + * Fetch a unique that has ID = value + */ + public org.jooq.test.oracle.generatedclasses.test.tables.pojos.TLanguage fetchOneById(java.lang.Integer value) { + return fetchOne(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID, value); + } +} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/TBook.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/TBook.java index 2e02461ccf..23eeb41e30 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/TBook.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/TBook.java @@ -13,28 +13,28 @@ package org.jooq.test.oracle.generatedclasses.test.tables.pojos; @javax.persistence.Table(name = "T_BOOK", schema = "TEST") public class TBook implements java.io.Serializable { - private static final long serialVersionUID = -1596580358; + private static final long serialVersionUID = -2041655710; @javax.validation.constraints.NotNull - private java.lang.Integer id; + private java.lang.Integer id; @javax.validation.constraints.NotNull - private java.lang.Integer authorId; - private java.lang.Integer coAuthorId; - private java.lang.Integer detailsId; + private java.lang.Integer authorId; + private java.lang.Integer coAuthorId; + private java.lang.Integer detailsId; @javax.validation.constraints.NotNull @javax.validation.constraints.Size(max = 400) - private java.lang.String title; + private java.lang.String title; @javax.validation.constraints.NotNull - private java.lang.Integer publishedIn; + private java.lang.Integer publishedIn; @javax.validation.constraints.NotNull - private org.jooq.test.oracle.generatedclasses.test.enums.TLanguage languageId; - private java.lang.String contentText; - private byte[] contentPdf; + private java.lang.Integer languageId; + private java.lang.String contentText; + private byte[] contentPdf; @javax.persistence.Id @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7) @@ -92,11 +92,11 @@ public class TBook implements java.io.Serializable { } @javax.persistence.Column(name = "LANGUAGE_ID", nullable = false, precision = 7) - public org.jooq.test.oracle.generatedclasses.test.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return this.languageId; } - public void setLanguageId(org.jooq.test.oracle.generatedclasses.test.enums.TLanguage languageId) { + public void setLanguageId(java.lang.Integer languageId) { this.languageId = languageId; } diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/TLanguage.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/TLanguage.java new file mode 100644 index 0000000000..20f72efadb --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/TLanguage.java @@ -0,0 +1,68 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.oracle.generatedclasses.test.tables.pojos; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "T_LANGUAGE", schema = "TEST") +public class TLanguage implements java.io.Serializable { + + private static final long serialVersionUID = 239555792; + + + @javax.validation.constraints.NotNull + @javax.validation.constraints.Size(max = 2) + private java.lang.String cd; + + @javax.validation.constraints.Size(max = 50) + private java.lang.String description; + + @javax.validation.constraints.Size(max = 50) + private java.lang.String descriptionEnglish; + + @javax.validation.constraints.NotNull + private java.lang.Integer id; + + @javax.persistence.Column(name = "CD", nullable = false, length = 2) + public java.lang.String getCd() { + return this.cd; + } + + public void setCd(java.lang.String cd) { + this.cd = cd; + } + + @javax.persistence.Column(name = "DESCRIPTION", length = 50) + public java.lang.String getDescription() { + return this.description; + } + + public void setDescription(java.lang.String description) { + this.description = description; + } + + @javax.persistence.Column(name = "DESCRIPTION_ENGLISH", length = 50) + public java.lang.String getDescriptionEnglish() { + return this.descriptionEnglish; + } + + public void setDescriptionEnglish(java.lang.String descriptionEnglish) { + this.descriptionEnglish = descriptionEnglish; + } + + @javax.persistence.Id + @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7) + public java.lang.Integer getId() { + return this.id; + } + + public void setId(java.lang.Integer id) { + this.id = id; + } +} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/T_658Ref.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/T_658Ref.java deleted file mode 100644 index fbebb738b3..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/pojos/T_658Ref.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.tables.pojos; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "T_658_REF", schema = "TEST") -public class T_658Ref implements java.io.Serializable { - - private static final long serialVersionUID = -2055190783; - - private org.jooq.test.oracle.generatedclasses.test.enums.T_658_11 ref_11; - private org.jooq.test.oracle.generatedclasses.test.enums.T_658_21 ref_21; - private org.jooq.test.oracle.generatedclasses.test.enums.T_658_31 ref_31; - private org.jooq.test.oracle.generatedclasses.test.enums.T_658_12 ref_12; - private org.jooq.test.oracle.generatedclasses.test.enums.T_658_22 ref_22; - private org.jooq.test.oracle.generatedclasses.test.enums.T_658_32 ref_32; - - @javax.persistence.Column(name = "REF_11", length = 3) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_11 getRef_11() { - return this.ref_11; - } - - public void setRef_11(org.jooq.test.oracle.generatedclasses.test.enums.T_658_11 ref_11) { - this.ref_11 = ref_11; - } - - @javax.persistence.Column(name = "REF_21", precision = 7) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_21 getRef_21() { - return this.ref_21; - } - - public void setRef_21(org.jooq.test.oracle.generatedclasses.test.enums.T_658_21 ref_21) { - this.ref_21 = ref_21; - } - - @javax.persistence.Column(name = "REF_31", precision = 15) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_31 getRef_31() { - return this.ref_31; - } - - public void setRef_31(org.jooq.test.oracle.generatedclasses.test.enums.T_658_31 ref_31) { - this.ref_31 = ref_31; - } - - @javax.persistence.Column(name = "REF_12", length = 3) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_12 getRef_12() { - return this.ref_12; - } - - public void setRef_12(org.jooq.test.oracle.generatedclasses.test.enums.T_658_12 ref_12) { - this.ref_12 = ref_12; - } - - @javax.persistence.Column(name = "REF_22", precision = 7) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_22 getRef_22() { - return this.ref_22; - } - - public void setRef_22(org.jooq.test.oracle.generatedclasses.test.enums.T_658_22 ref_22) { - this.ref_22 = ref_22; - } - - @javax.persistence.Column(name = "REF_32", precision = 15) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_32 getRef_32() { - return this.ref_32; - } - - public void setRef_32(org.jooq.test.oracle.generatedclasses.test.enums.T_658_32 ref_32) { - this.ref_32 = ref_32; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/TBookRecord.java index e1a2de0819..86f3ae7ed6 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/TBookRecord.java @@ -13,7 +13,7 @@ package org.jooq.test.oracle.generatedclasses.test.tables.records; @javax.persistence.Table(name = "T_BOOK", schema = "TEST") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -1924140917; + private static final long serialVersionUID = 205049097; /** * The book ID @@ -213,7 +213,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.oracle.generatedclasses.test.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.LANGUAGE_ID, value); } @@ -227,10 +227,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @javax.persistence.Column(name = "LANGUAGE_ID", nullable = false, precision = 7) - public org.jooq.test.oracle.generatedclasses.test.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.oracle.generatedclasses.test.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.oracle.generatedclasses.test.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.LANGUAGE_ID, value.getValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID)); + } + } + + /** + * The language of the book + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT FK_T_BOOK_LANGUAGE_ID
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES TEST.T_LANGUAGE (ID)
+	 * 
+ */ + public org.jooq.test.oracle.generatedclasses.test.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID.equal(getValue(org.jooq.test.oracle.generatedclasses.test.tables.TBook.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * Some textual content of the book */ diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..fe8a9452e0 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/TLanguageRecord.java @@ -0,0 +1,101 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.oracle.generatedclasses.test.tables.records; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "T_LANGUAGE", schema = "TEST") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = 825954264; + + /** + * The language ISO code + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.CD, value); + } + + /** + * The language ISO code + */ + @javax.persistence.Column(name = "CD", nullable = false, length = 2) + public java.lang.String getCd() { + return getValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.CD); + } + + /** + * The language description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.DESCRIPTION, value); + } + + /** + * The language description + */ + @javax.persistence.Column(name = "DESCRIPTION", length = 50) + public java.lang.String getDescription() { + return getValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.DESCRIPTION); + } + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @javax.persistence.Column(name = "DESCRIPTION_ENGLISH", length = 50) + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID, value); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @javax.persistence.Id + @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7) + public java.lang.Integer getId() { + return getValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK) + .where(org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook.T_BOOK.LANGUAGE_ID.equal(getValue(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.oracle.generatedclasses.test.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/T_658RefRecord.java deleted file mode 100644 index d88a3d8afc..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle/generatedclasses/test/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle.generatedclasses.test.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "T_658_REF", schema = "TEST") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -1113689091; - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - public void setRef_11(org.jooq.test.oracle.generatedclasses.test.enums.T_658_11 value) { - setValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_11, value); - } - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_11", length = 3) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_11); - } - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - public void setRef_21(org.jooq.test.oracle.generatedclasses.test.enums.T_658_21 value) { - setValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_21, value); - } - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_21", precision = 7) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_21); - } - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - public void setRef_31(org.jooq.test.oracle.generatedclasses.test.enums.T_658_31 value) { - setValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_31, value); - } - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_31", precision = 15) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_31); - } - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - public void setRef_12(org.jooq.test.oracle.generatedclasses.test.enums.T_658_12 value) { - setValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_12, value); - } - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_12", length = 3) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_12); - } - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - public void setRef_22(org.jooq.test.oracle.generatedclasses.test.enums.T_658_22 value) { - setValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_22, value); - } - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_22", precision = 7) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_22); - } - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - public void setRef_32(org.jooq.test.oracle.generatedclasses.test.enums.T_658_32 value) { - setValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_32, value); - } - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_32", precision = 15) - public org.jooq.test.oracle.generatedclasses.test.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.oracle.generatedclasses.test.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle/reset.sql b/jOOQ-test/src/org/jooq/test/oracle/reset.sql index 6f227e7ee5..93eb63cdad 100644 --- a/jOOQ-test/src/org/jooq/test/oracle/reset.sql +++ b/jOOQ-test/src/org/jooq/test/oracle/reset.sql @@ -1,13 +1,6 @@ DELETE FROM multi_schema.t_book_sale/ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_arrays/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ @@ -28,25 +21,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A')/ -INSERT INTO t_658_11 VALUES ('B')/ -INSERT INTO t_658_11 VALUES ('C')/ -INSERT INTO t_658_21 VALUES (1)/ -INSERT INTO t_658_21 VALUES (2)/ -INSERT INTO t_658_21 VALUES (3)/ -INSERT INTO t_658_31 VALUES (1)/ -INSERT INTO t_658_31 VALUES (2)/ -INSERT INTO t_658_31 VALUES (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A')/ -INSERT INTO t_658_12 VALUES ('B', 'B')/ -INSERT INTO t_658_12 VALUES ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1)/ -INSERT INTO t_658_22 VALUES (2, 2)/ -INSERT INTO t_658_22 VALUES (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1)/ -INSERT INTO t_658_32 VALUES (2, 2)/ -INSERT INTO t_658_32 VALUES (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ INSERT INTO t_author VALUES (s_author_id.nextval, 'George', 'Orwell', TO_DATE('1903-06-25', 'YYYY-MM-DD'), 1903, u_address_type(u_street_type('Parliament Hill', '77', u_number_array(1, 2, 3), hextoraw('7070'), 'aabb'), 'NW31A9', 'Hampstead', 'England', TO_DATE('1980-01-01', 'YYYY-MM-DD'), null, hextoraw('7171'), 'xxyy'))/ INSERT INTO t_author VALUES (s_author_id.nextval, 'Paulo', 'Coelho', TO_DATE('1947-08-24', 'YYYY-MM-DD'), 1947, u_address_type(u_street_type('Caixa Postal', '43.003', null, null, null), null, 'Rio de Janeiro', 'Brazil', TO_DATE('1940-01-01', 'YYYY-MM-DD'), 2, null, null))/ diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/Keys.java index 9f8b958811..684919279f 100644 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/Keys.java @@ -23,6 +23,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; public static final org.jooq.UniqueKey PK_T_DIRECTORY = UniqueKeys0.PK_T_DIRECTORY; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; public static final org.jooq.UniqueKey PK_T_639_NUMBERS_TABLE = UniqueKeys0.PK_T_639_NUMBERS_TABLE; public static final org.jooq.UniqueKey PK_T_725_LOB_TEST = UniqueKeys0.PK_T_725_LOB_TEST; @@ -35,6 +36,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey PK_T_DIRECTORY_SELF = ForeignKeys0.PK_T_DIRECTORY_SELF; @@ -58,6 +60,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.oracle3.generatedclasses.tables.T_BOOLEANS.T_BOOLEANS, org.jooq.test.oracle3.generatedclasses.tables.T_BOOLEANS.T_BOOLEANS.ID); public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.oracle3.generatedclasses.tables.T_DATES.T_DATES, org.jooq.test.oracle3.generatedclasses.tables.T_DATES.T_DATES.ID); public static final org.jooq.UniqueKey PK_T_DIRECTORY = createUniqueKey(org.jooq.test.oracle3.generatedclasses.tables.T_DIRECTORY.T_DIRECTORY, org.jooq.test.oracle3.generatedclasses.tables.T_DIRECTORY.T_DIRECTORY.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE, org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.oracle3.generatedclasses.tables.T_TRIGGERS.T_TRIGGERS, org.jooq.test.oracle3.generatedclasses.tables.T_TRIGGERS.T_TRIGGERS.ID_GENERATED); public static final org.jooq.UniqueKey PK_T_639_NUMBERS_TABLE = createUniqueKey(org.jooq.test.oracle3.generatedclasses.tables.T_639_NUMBERS_TABLE.T_639_NUMBERS_TABLE, org.jooq.test.oracle3.generatedclasses.tables.T_639_NUMBERS_TABLE.T_639_NUMBERS_TABLE.ID); public static final org.jooq.UniqueKey PK_T_725_LOB_TEST = createUniqueKey(org.jooq.test.oracle3.generatedclasses.tables.T_725_LOB_TEST.T_725_LOB_TEST, org.jooq.test.oracle3.generatedclasses.tables.T_725_LOB_TEST.T_725_LOB_TEST.ID); @@ -72,6 +75,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.oracle3.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.oracle3.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.oracle3.generatedclasses.Keys.PK_T_LANGUAGE, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.oracle3.generatedclasses.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK_TO_BOOK_STORE.T_BOOK_TO_BOOK_STORE, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK_TO_BOOK_STORE.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.oracle3.generatedclasses.Keys.PK_T_BOOK, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK_TO_BOOK_STORE.T_BOOK_TO_BOOK_STORE, org.jooq.test.oracle3.generatedclasses.tables.T_BOOK_TO_BOOK_STORE.T_BOOK_TO_BOOK_STORE.BOOK_ID); public static final org.jooq.ForeignKey PK_T_DIRECTORY_SELF = createForeignKey(org.jooq.test.oracle3.generatedclasses.Keys.PK_T_DIRECTORY, org.jooq.test.oracle3.generatedclasses.tables.T_DIRECTORY.T_DIRECTORY, org.jooq.test.oracle3.generatedclasses.tables.T_DIRECTORY.T_DIRECTORY.PARENT_ID); diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/TEST.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/TEST.java index 309020d343..9cfe9f73c9 100644 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/TEST.java +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/TEST.java @@ -9,7 +9,7 @@ package org.jooq.test.oracle3.generatedclasses; @java.lang.SuppressWarnings("all") public class TEST extends org.jooq.impl.SchemaImpl implements java.lang.Cloneable { - private static final long serialVersionUID = -1848905141; + private static final long serialVersionUID = 857324291; /** * The singleton instance of TEST @@ -46,9 +46,9 @@ public class TEST extends org.jooq.impl.SchemaImpl implements java.lang.Cloneabl org.jooq.test.oracle3.generatedclasses.tables.T_BOOLEANS.T_BOOLEANS, org.jooq.test.oracle3.generatedclasses.tables.T_DATES.T_DATES, org.jooq.test.oracle3.generatedclasses.tables.T_DIRECTORY.T_DIRECTORY, + org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE, org.jooq.test.oracle3.generatedclasses.tables.T_TRIGGERS.T_TRIGGERS, org.jooq.test.oracle3.generatedclasses.tables.T_639_NUMBERS_TABLE.T_639_NUMBERS_TABLE, - org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF, org.jooq.test.oracle3.generatedclasses.tables.T_725_LOB_TEST.T_725_LOB_TEST, org.jooq.test.oracle3.generatedclasses.tables.T_785.T_785, org.jooq.test.oracle3.generatedclasses.tables.V_AUTHOR.V_AUTHOR, diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/Tables.java index 8ce202cfec..1ee69e82b2 100644 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/Tables.java @@ -56,6 +56,11 @@ public final class Tables { */ public static final org.jooq.test.oracle3.generatedclasses.tables.T_DIRECTORY T_DIRECTORY = org.jooq.test.oracle3.generatedclasses.tables.T_DIRECTORY.T_DIRECTORY; + /** + * An entity holding language master data + */ + public static final org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE T_LANGUAGE = org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE; + /** * The table TEST.T_TRIGGERS */ @@ -66,11 +71,6 @@ public final class Tables { */ public static final org.jooq.test.oracle3.generatedclasses.tables.T_639_NUMBERS_TABLE T_639_NUMBERS_TABLE = org.jooq.test.oracle3.generatedclasses.tables.T_639_NUMBERS_TABLE.T_639_NUMBERS_TABLE; - /** - * The table TEST.T_658_REF - */ - public static final org.jooq.test.oracle3.generatedclasses.tables.T_658_REF T_658_REF = org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF; - /** * The table TEST.T_725_LOB_TEST */ diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_11.java deleted file mode 100644 index ba440d663d..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements java.lang.Cloneable, org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String ID; - - private T_658_11(java.lang.String ID) { - this.ID = ID; - } - - @Override - public java.lang.String getPrimaryKey() { - return ID; - } - - /** - * The table column TEST.T_658_11.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getID() { - return ID; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_12.java deleted file mode 100644 index d838fc46da..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements java.lang.Cloneable, org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String ID; - private final java.lang.String CD; - - private T_658_12(java.lang.String ID, java.lang.String CD) { - this.ID = ID; - this.CD = CD; - } - - @Override - public java.lang.String getPrimaryKey() { - return ID; - } - - /** - * The table column TEST.T_658_12.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getID() { - return ID; - } - - /** - * The table column TEST.T_658_12.CD - */ - public final java.lang.String getCD() { - return CD; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 37bcbd5242..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements java.lang.Cloneable, org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer ID; - - private T_658_21(java.lang.Integer ID) { - this.ID = ID; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return ID; - } - - /** - * The table column TEST.T_658_21.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getID() { - return ID; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_22.java deleted file mode 100644 index a6992dce45..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements java.lang.Cloneable, org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer ID; - private final java.lang.Integer CD; - - private T_658_22(java.lang.Integer ID, java.lang.Integer CD) { - this.ID = ID; - this.CD = CD; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return ID; - } - - /** - * The table column TEST.T_658_22.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getID() { - return ID; - } - - /** - * The table column TEST.T_658_22.CD - */ - public final java.lang.Integer getCD() { - return CD; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_31.java deleted file mode 100644 index 1f26cc43c7..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements java.lang.Cloneable, org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long ID; - - private T_658_31(java.lang.Long ID) { - this.ID = ID; - } - - @Override - public java.lang.Long getPrimaryKey() { - return ID; - } - - /** - * The table column TEST.T_658_31.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getID() { - return ID; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_32.java deleted file mode 100644 index 50e7b9fa81..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements java.lang.Cloneable, org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long ID; - private final java.lang.Long CD; - - private T_658_32(java.lang.Long ID, java.lang.Long CD) { - this.ID = ID; - this.CD = CD; - } - - @Override - public java.lang.Long getPrimaryKey() { - return ID; - } - - /** - * The table column TEST.T_658_32.ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getID() { - return ID; - } - - /** - * The table column TEST.T_658_32.CD - */ - public final java.lang.Long getCD() { - return CD; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_LANGUAGE.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_LANGUAGE.java deleted file mode 100644 index fe9aaefce3..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/enums/T_LANGUAGE.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - * - * An entity holding language master data - */ -@java.lang.SuppressWarnings("all") -public enum T_LANGUAGE implements java.lang.Cloneable, org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer ID; - private final java.lang.String CD; - private final java.lang.String DESCRIPTION; - - private T_LANGUAGE(java.lang.Integer ID, java.lang.String CD, java.lang.String DESCRIPTION) { - this.ID = ID; - this.CD = CD; - this.DESCRIPTION = DESCRIPTION; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return ID; - } - - /** - * The language ID - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getID() { - return ID; - } - - /** - * The language ISO code - */ - public final java.lang.String getCD() { - return CD; - } - - /** - * The language description - */ - public final java.lang.String getDESCRIPTION() { - return DESCRIPTION; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_658_REF.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_658_REF.java deleted file mode 100644 index c3210b1608..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_658_REF.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658_REF extends org.jooq.impl.TableImpl implements java.lang.Cloneable { - - private static final long serialVersionUID = 2135154562; - - /** - * The singleton instance of TEST.T_658_REF - */ - public static final org.jooq.test.oracle3.generatedclasses.tables.T_658_REF T_658_REF = new org.jooq.test.oracle3.generatedclasses.tables.T_658_REF(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.oracle3.generatedclasses.tables.records.T_658_REF.class; - } - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_11 = createField("REF_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.oracle3.generatedclasses.enums.T_658_11.class), this); - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_21 = createField("REF_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.oracle3.generatedclasses.enums.T_658_21.class), this); - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_31 = createField("REF_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.oracle3.generatedclasses.enums.T_658_31.class), this); - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_12 = createField("REF_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.oracle3.generatedclasses.enums.T_658_12.class), this); - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_22 = createField("REF_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.oracle3.generatedclasses.enums.T_658_22.class), this); - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - public final org.jooq.TableField REF_32 = createField("REF_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.oracle3.generatedclasses.enums.T_658_32.class), this); - - public T_658_REF() { - super("T_658_REF", org.jooq.test.oracle3.generatedclasses.TEST.TEST); - } - - public T_658_REF(java.lang.String alias) { - super(alias, org.jooq.test.oracle3.generatedclasses.TEST.TEST, org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } - - @Override - public org.jooq.test.oracle3.generatedclasses.tables.T_658_REF as(java.lang.String alias) { - return new org.jooq.test.oracle3.generatedclasses.tables.T_658_REF(alias); - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_BOOK.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_BOOK.java index 7a698e09d6..3581b08106 100644 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_BOOK.java +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_BOOK.java @@ -11,7 +11,7 @@ package org.jooq.test.oracle3.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class T_BOOK extends org.jooq.impl.UpdatableTableImpl implements java.lang.Cloneable { - private static final long serialVersionUID = 786365177; + private static final long serialVersionUID = 815925870; /** * The singleton instance of TEST.T_BOOK @@ -79,7 +79,7 @@ public class T_BOOK extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.oracle3.generatedclasses.enums.T_LANGUAGE.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, this); /** * Some textual content of the book @@ -113,7 +113,7 @@ public class T_BOOK extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.oracle3.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.oracle3.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.oracle3.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.oracle3.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.oracle3.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_LANGUAGE.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_LANGUAGE.java new file mode 100644 index 0000000000..dc3a1f0bba --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/T_LANGUAGE.java @@ -0,0 +1,74 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.oracle3.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class T_LANGUAGE extends org.jooq.impl.UpdatableTableImpl implements java.lang.Cloneable { + + private static final long serialVersionUID = 1756476923; + + /** + * The singleton instance of TEST.T_LANGUAGE + */ + public static final org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE T_LANGUAGE = new org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.oracle3.generatedclasses.tables.records.T_LANGUAGE.class; + } + + /** + * The language ISO code + */ + public final org.jooq.TableField CD = createField("CD", org.jooq.impl.SQLDataType.CHAR, this); + + /** + * The language description + */ + public final org.jooq.TableField DESCRIPTION = createField("DESCRIPTION", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public final org.jooq.TableField DESCRIPTION_ENGLISH = createField("DESCRIPTION_ENGLISH", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER, this); + + public T_LANGUAGE() { + super("T_LANGUAGE", org.jooq.test.oracle3.generatedclasses.TEST.TEST); + } + + public T_LANGUAGE(java.lang.String alias) { + super(alias, org.jooq.test.oracle3.generatedclasses.TEST.TEST, org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.oracle3.generatedclasses.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.oracle3.generatedclasses.Keys.PK_T_LANGUAGE); + } + + @Override + public org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE as(java.lang.String alias) { + return new org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE(alias); + } +} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_658_REF_INTERFACE.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_658_REF_INTERFACE.java deleted file mode 100644 index 16a44ed19f..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_658_REF_INTERFACE.java +++ /dev/null @@ -1,151 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.tables.interfaces; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "T_658_REF", schema = "TEST") -public interface T_658_REF_INTERFACE extends java.lang.Cloneable, java.io.Serializable { - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - public void setREF_11(org.jooq.test.oracle3.generatedclasses.enums.T_658_11 value); - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_11", length = 3) - public org.jooq.test.oracle3.generatedclasses.enums.T_658_11 getREF_11(); - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - public void setREF_21(org.jooq.test.oracle3.generatedclasses.enums.T_658_21 value); - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_21", precision = 7) - public org.jooq.test.oracle3.generatedclasses.enums.T_658_21 getREF_21(); - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - public void setREF_31(org.jooq.test.oracle3.generatedclasses.enums.T_658_31 value); - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_31", precision = 15) - public org.jooq.test.oracle3.generatedclasses.enums.T_658_31 getREF_31(); - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - public void setREF_12(org.jooq.test.oracle3.generatedclasses.enums.T_658_12 value); - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_12", length = 3) - public org.jooq.test.oracle3.generatedclasses.enums.T_658_12 getREF_12(); - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - public void setREF_22(org.jooq.test.oracle3.generatedclasses.enums.T_658_22 value); - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_22", precision = 7) - public org.jooq.test.oracle3.generatedclasses.enums.T_658_22 getREF_22(); - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - public void setREF_32(org.jooq.test.oracle3.generatedclasses.enums.T_658_32 value); - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_32", precision = 15) - public org.jooq.test.oracle3.generatedclasses.enums.T_658_32 getREF_32(); -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_BOOK_INTERFACE.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_BOOK_INTERFACE.java index 0fe1e4b464..05e4f30bee 100644 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_BOOK_INTERFACE.java +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_BOOK_INTERFACE.java @@ -117,7 +117,7 @@ public interface T_BOOK_INTERFACE extends java.lang.Cloneable, java.io.Serializa * REFERENCES TEST.T_LANGUAGE (ID) * */ - public void setLANGUAGE_ID(org.jooq.test.oracle3.generatedclasses.enums.T_LANGUAGE value); + public void setLANGUAGE_ID(java.lang.Integer value); /** * The language of the book @@ -129,7 +129,7 @@ public interface T_BOOK_INTERFACE extends java.lang.Cloneable, java.io.Serializa * */ @javax.persistence.Column(name = "LANGUAGE_ID", nullable = false, precision = 7) - public org.jooq.test.oracle3.generatedclasses.enums.T_LANGUAGE getLANGUAGE_ID(); + public java.lang.Integer getLANGUAGE_ID(); /** * Some textual content of the book diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_LANGUAGE_INTERFACE.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_LANGUAGE_INTERFACE.java new file mode 100644 index 0000000000..37f4b9b3db --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/interfaces/T_LANGUAGE_INTERFACE.java @@ -0,0 +1,64 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.oracle3.generatedclasses.tables.interfaces; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "T_LANGUAGE", schema = "TEST") +public interface T_LANGUAGE_INTERFACE extends java.lang.Cloneable, java.io.Serializable { + + /** + * The language ISO code + */ + public void setCD(java.lang.String value); + + /** + * The language ISO code + */ + @javax.persistence.Column(name = "CD", nullable = false, length = 2) + public java.lang.String getCD(); + + /** + * The language description + */ + public void setDESCRIPTION(java.lang.String value); + + /** + * The language description + */ + @javax.persistence.Column(name = "DESCRIPTION", length = 50) + public java.lang.String getDESCRIPTION(); + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + public void setDESCRIPTION_ENGLISH(java.lang.String value); + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @javax.persistence.Column(name = "DESCRIPTION_ENGLISH", length = 50) + public java.lang.String getDESCRIPTION_ENGLISH(); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setID(java.lang.Integer value); + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @javax.persistence.Id + @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7) + public java.lang.Integer getID(); +} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_658_REF_POJO.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_658_REF_POJO.java deleted file mode 100644 index 0f0f508a3e..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_658_REF_POJO.java +++ /dev/null @@ -1,88 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.tables.pojos; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "T_658_REF", schema = "TEST") -public class T_658_REF_POJO extends java.lang.ThreadDeath implements java.lang.Cloneable, org.jooq.test.oracle3.generatedclasses.tables.interfaces.T_658_REF_INTERFACE { - - private static final long serialVersionUID = 232132865; - - private org.jooq.test.oracle3.generatedclasses.enums.T_658_11 REF_11; - private org.jooq.test.oracle3.generatedclasses.enums.T_658_21 REF_21; - private org.jooq.test.oracle3.generatedclasses.enums.T_658_31 REF_31; - private org.jooq.test.oracle3.generatedclasses.enums.T_658_12 REF_12; - private org.jooq.test.oracle3.generatedclasses.enums.T_658_22 REF_22; - private org.jooq.test.oracle3.generatedclasses.enums.T_658_32 REF_32; - - @javax.persistence.Column(name = "REF_11", length = 3) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_11 getREF_11() { - return this.REF_11; - } - - @Override - public void setREF_11(org.jooq.test.oracle3.generatedclasses.enums.T_658_11 REF_11) { - this.REF_11 = REF_11; - } - - @javax.persistence.Column(name = "REF_21", precision = 7) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_21 getREF_21() { - return this.REF_21; - } - - @Override - public void setREF_21(org.jooq.test.oracle3.generatedclasses.enums.T_658_21 REF_21) { - this.REF_21 = REF_21; - } - - @javax.persistence.Column(name = "REF_31", precision = 15) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_31 getREF_31() { - return this.REF_31; - } - - @Override - public void setREF_31(org.jooq.test.oracle3.generatedclasses.enums.T_658_31 REF_31) { - this.REF_31 = REF_31; - } - - @javax.persistence.Column(name = "REF_12", length = 3) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_12 getREF_12() { - return this.REF_12; - } - - @Override - public void setREF_12(org.jooq.test.oracle3.generatedclasses.enums.T_658_12 REF_12) { - this.REF_12 = REF_12; - } - - @javax.persistence.Column(name = "REF_22", precision = 7) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_22 getREF_22() { - return this.REF_22; - } - - @Override - public void setREF_22(org.jooq.test.oracle3.generatedclasses.enums.T_658_22 REF_22) { - this.REF_22 = REF_22; - } - - @javax.persistence.Column(name = "REF_32", precision = 15) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_32 getREF_32() { - return this.REF_32; - } - - @Override - public void setREF_32(org.jooq.test.oracle3.generatedclasses.enums.T_658_32 REF_32) { - this.REF_32 = REF_32; - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_BOOK_POJO.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_BOOK_POJO.java index 83262218f0..1971fdc9c4 100644 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_BOOK_POJO.java +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_BOOK_POJO.java @@ -13,17 +13,17 @@ package org.jooq.test.oracle3.generatedclasses.tables.pojos; @javax.persistence.Table(name = "T_BOOK", schema = "TEST") public class T_BOOK_POJO extends java.lang.Object implements java.io.Serializable, org.jooq.test.oracle3.generatedclasses.tables.interfaces.T_BOOK_INTERFACE { - private static final long serialVersionUID = 812340756; + private static final long serialVersionUID = -668987488; - private java.lang.Integer ID; - private java.lang.Integer AUTHOR_ID; - private java.lang.Integer CO_AUTHOR_ID; - private java.lang.Integer DETAILS_ID; - private java.lang.String TITLE; - private java.lang.Integer PUBLISHED_IN; - private org.jooq.test.oracle3.generatedclasses.enums.T_LANGUAGE LANGUAGE_ID; - private java.lang.String CONTENT_TEXT; - private byte[] CONTENT_PDF; + private java.lang.Integer ID; + private java.lang.Integer AUTHOR_ID; + private java.lang.Integer CO_AUTHOR_ID; + private java.lang.Integer DETAILS_ID; + private java.lang.String TITLE; + private java.lang.Integer PUBLISHED_IN; + private java.lang.Integer LANGUAGE_ID; + private java.lang.String CONTENT_TEXT; + private byte[] CONTENT_PDF; @javax.persistence.Id @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7) @@ -94,12 +94,12 @@ public class T_BOOK_POJO extends java.lang.Object implements java.io.Serializabl @javax.persistence.Column(name = "LANGUAGE_ID", nullable = false, precision = 7) @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_LANGUAGE getLANGUAGE_ID() { + public java.lang.Integer getLANGUAGE_ID() { return this.LANGUAGE_ID; } @Override - public void setLANGUAGE_ID(org.jooq.test.oracle3.generatedclasses.enums.T_LANGUAGE LANGUAGE_ID) { + public void setLANGUAGE_ID(java.lang.Integer LANGUAGE_ID) { this.LANGUAGE_ID = LANGUAGE_ID; } diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_LANGUAGE_POJO.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_LANGUAGE_POJO.java new file mode 100644 index 0000000000..bba0d6fa5d --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/pojos/T_LANGUAGE_POJO.java @@ -0,0 +1,67 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.oracle3.generatedclasses.tables.pojos; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "T_LANGUAGE", schema = "TEST") +public class T_LANGUAGE_POJO extends java.lang.ThreadDeath implements java.lang.Cloneable, org.jooq.test.oracle3.generatedclasses.tables.interfaces.T_LANGUAGE_INTERFACE { + + private static final long serialVersionUID = 322423491; + + private java.lang.String CD; + private java.lang.String DESCRIPTION; + private java.lang.String DESCRIPTION_ENGLISH; + private java.lang.Integer ID; + + @javax.persistence.Column(name = "CD", nullable = false, length = 2) + @Override + public java.lang.String getCD() { + return this.CD; + } + + @Override + public void setCD(java.lang.String CD) { + this.CD = CD; + } + + @javax.persistence.Column(name = "DESCRIPTION", length = 50) + @Override + public java.lang.String getDESCRIPTION() { + return this.DESCRIPTION; + } + + @Override + public void setDESCRIPTION(java.lang.String DESCRIPTION) { + this.DESCRIPTION = DESCRIPTION; + } + + @javax.persistence.Column(name = "DESCRIPTION_ENGLISH", length = 50) + @Override + public java.lang.String getDESCRIPTION_ENGLISH() { + return this.DESCRIPTION_ENGLISH; + } + + @Override + public void setDESCRIPTION_ENGLISH(java.lang.String DESCRIPTION_ENGLISH) { + this.DESCRIPTION_ENGLISH = DESCRIPTION_ENGLISH; + } + + @javax.persistence.Id + @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7) + @Override + public java.lang.Integer getID() { + return this.ID; + } + + @Override + public void setID(java.lang.Integer ID) { + this.ID = ID; + } +} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_658_REF.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_658_REF.java deleted file mode 100644 index 07d359e3e6..0000000000 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_658_REF.java +++ /dev/null @@ -1,196 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.oracle3.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "T_658_REF", schema = "TEST") -public class T_658_REF extends org.jooq.impl.TableRecordImpl implements java.lang.Cloneable, org.jooq.test.oracle3.generatedclasses.tables.interfaces.T_658_REF_INTERFACE { - - private static final long serialVersionUID = -181382978; - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - @Override - public void setREF_11(org.jooq.test.oracle3.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_11, value); - } - - /** - * The table column TEST.T_658_REF.REF_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_11
-	 * FOREIGN KEY (REF_11)
-	 * REFERENCES TEST.T_658_11 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_11", length = 3) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_11 getREF_11() { - return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_11); - } - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - @Override - public void setREF_21(org.jooq.test.oracle3.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_21, value); - } - - /** - * The table column TEST.T_658_REF.REF_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_21
-	 * FOREIGN KEY (REF_21)
-	 * REFERENCES TEST.T_658_21 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_21", precision = 7) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_21 getREF_21() { - return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_21); - } - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - @Override - public void setREF_31(org.jooq.test.oracle3.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_31, value); - } - - /** - * The table column TEST.T_658_REF.REF_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_31
-	 * FOREIGN KEY (REF_31)
-	 * REFERENCES TEST.T_658_31 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_31", precision = 15) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_31 getREF_31() { - return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_31); - } - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - @Override - public void setREF_12(org.jooq.test.oracle3.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_12, value); - } - - /** - * The table column TEST.T_658_REF.REF_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_12
-	 * FOREIGN KEY (REF_12)
-	 * REFERENCES TEST.T_658_12 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_12", length = 3) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_12 getREF_12() { - return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_12); - } - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - @Override - public void setREF_22(org.jooq.test.oracle3.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_22, value); - } - - /** - * The table column TEST.T_658_REF.REF_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_22
-	 * FOREIGN KEY (REF_22)
-	 * REFERENCES TEST.T_658_22 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_22", precision = 7) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_22 getREF_22() { - return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_22); - } - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - @Override - public void setREF_32(org.jooq.test.oracle3.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_32, value); - } - - /** - * The table column TEST.T_658_REF.REF_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT FK_T_658_32
-	 * FOREIGN KEY (REF_32)
-	 * REFERENCES TEST.T_658_32 (ID)
-	 * 
- */ - @javax.persistence.Column(name = "REF_32", precision = 15) - @Override - public org.jooq.test.oracle3.generatedclasses.enums.T_658_32 getREF_32() { - return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF.REF_32); - } - - /** - * Create a detached T_658_REF - */ - public T_658_REF() { - super(org.jooq.test.oracle3.generatedclasses.tables.T_658_REF.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_BOOK.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_BOOK.java index 481ff5f9e3..12dc555f3a 100644 --- a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_BOOK.java +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_BOOK.java @@ -13,7 +13,7 @@ package org.jooq.test.oracle3.generatedclasses.tables.records; @javax.persistence.Table(name = "T_BOOK", schema = "TEST") public class T_BOOK extends org.jooq.impl.UpdatableRecordImpl implements java.lang.Cloneable, org.jooq.test.oracle3.generatedclasses.tables.interfaces.T_BOOK_INTERFACE { - private static final long serialVersionUID = -1556639858; + private static final long serialVersionUID = 1496241171; /** * The book ID @@ -226,7 +226,7 @@ public class T_BOOK extends org.jooq.impl.UpdatableRecordImpl */ @Override - public void setLANGUAGE_ID(org.jooq.test.oracle3.generatedclasses.enums.T_LANGUAGE value) { + public void setLANGUAGE_ID(java.lang.Integer value) { setValue(org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK.LANGUAGE_ID, value); } @@ -241,10 +241,39 @@ public class T_BOOK extends org.jooq.impl.UpdatableRecordImpl + * This column is part of a FOREIGN KEY:
+	 * CONSTRAINT FK_T_BOOK_LANGUAGE_ID
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES TEST.T_LANGUAGE (ID)
+	 * 
+ */ + public org.jooq.test.oracle3.generatedclasses.tables.records.T_LANGUAGE fetchT_LANGUAGE() { + return create() + .selectFrom(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE) + .where(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.ID.equal(getValue(org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * Some textual content of the book */ diff --git a/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_LANGUAGE.java b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_LANGUAGE.java new file mode 100644 index 0000000000..23a72da566 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/oracle3/generatedclasses/tables/records/T_LANGUAGE.java @@ -0,0 +1,109 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.oracle3.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "T_LANGUAGE", schema = "TEST") +public class T_LANGUAGE extends org.jooq.impl.UpdatableRecordImpl implements java.lang.Cloneable, org.jooq.test.oracle3.generatedclasses.tables.interfaces.T_LANGUAGE_INTERFACE { + + private static final long serialVersionUID = 438477141; + + /** + * The language ISO code + */ + @Override + public void setCD(java.lang.String value) { + setValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.CD, value); + } + + /** + * The language ISO code + */ + @javax.persistence.Column(name = "CD", nullable = false, length = 2) + @Override + public java.lang.String getCD() { + return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.CD); + } + + /** + * The language description + */ + @Override + public void setDESCRIPTION(java.lang.String value) { + setValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.DESCRIPTION, value); + } + + /** + * The language description + */ + @javax.persistence.Column(name = "DESCRIPTION", length = 50) + @Override + public java.lang.String getDESCRIPTION() { + return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.DESCRIPTION); + } + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @Override + public void setDESCRIPTION_ENGLISH(java.lang.String value) { + setValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column TEST.T_LANGUAGE.DESCRIPTION_ENGLISH + */ + @javax.persistence.Column(name = "DESCRIPTION_ENGLISH", length = 50) + @Override + public java.lang.String getDESCRIPTION_ENGLISH() { + return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.DESCRIPTION_ENGLISH); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @Override + public void setID(java.lang.Integer value) { + setValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.ID, value); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + @javax.persistence.Id + @javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7) + @Override + public java.lang.Integer getID() { + return getValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.ID); + } + + /** + * The language ID + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchT_BOOKList() { + return create() + .selectFrom(org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK) + .where(org.jooq.test.oracle3.generatedclasses.tables.T_BOOK.T_BOOK.LANGUAGE_ID.equal(getValue(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE.ID))) + .fetch(); + } + + /** + * Create a detached T_LANGUAGE + */ + public T_LANGUAGE() { + super(org.jooq.test.oracle3.generatedclasses.tables.T_LANGUAGE.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/postgres/create.sql b/jOOQ-test/src/org/jooq/test/postgres/create.sql index 265c8183f6..d15d89aba8 100644 --- a/jOOQ-test/src/org/jooq/test/postgres/create.sql +++ b/jOOQ-test/src/org/jooq/test/postgres/create.sql @@ -46,13 +46,6 @@ DROP TABLE IF EXISTS t_986_1/ DROP TABLE IF EXISTS t_986_2/ DROP TABLE IF EXISTS x_unused/ DROP TABLE IF EXISTS t_639_numbers_table/ -DROP TABLE IF EXISTS t_658_ref/ -DROP TABLE IF EXISTS t_658_11/ -DROP TABLE IF EXISTS t_658_21/ -DROP TABLE IF EXISTS t_658_31/ -DROP TABLE IF EXISTS t_658_12/ -DROP TABLE IF EXISTS t_658_22/ -DROP TABLE IF EXISTS t_658_32/ DROP TABLE IF EXISTS t_725_lob_test/ DROP TABLE IF EXISTS t_785/ DROP TABLE IF EXISTS t_959/ @@ -190,67 +183,6 @@ COMMENT ON COLUMN t_language.cd IS 'The language ISO code' COMMENT ON COLUMN t_language.description IS 'The language description' / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Keys.java index d92040a1f8..29064ca32d 100644 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Keys.java @@ -28,6 +28,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = UniqueKeys0.PK_T_IDENTITY_PK; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = UniqueKeys0.PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = UniqueKeys0.PK_X_TEST_CASE_71; @@ -40,6 +41,7 @@ public class Keys { public static final org.jooq.ForeignKey T_986_2__FK_986 = ForeignKeys0.T_986_2__FK_986; public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_AUTHOR_ID; public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID; + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID; public static final org.jooq.ForeignKey X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A = ForeignKeys0.X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A; @@ -71,6 +73,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.postgres.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.postgres.generatedclasses.tables.TBooleans.T_BOOLEANS.ID); public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.postgres.generatedclasses.tables.TDates.T_DATES, org.jooq.test.postgres.generatedclasses.tables.TDates.T_DATES.ID); public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.postgres.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.postgres.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.postgres.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.postgres.generatedclasses.tables.TTriggers.T_TRIGGERS.ID_GENERATED); public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.postgres.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.postgres.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.ID); public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.postgres.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.postgres.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.ID); @@ -85,6 +88,7 @@ public class Keys { public static final org.jooq.ForeignKey T_986_2__FK_986 = createForeignKey(org.jooq.test.postgres.generatedclasses.Keys.UK_X_UNUSED_ID, org.jooq.test.postgres.generatedclasses.tables.T_986_2.T_986_2, org.jooq.test.postgres.generatedclasses.tables.T_986_2.T_986_2.REF, org.jooq.test.postgres.generatedclasses.tables.T_986_2.T_986_2.REF); public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.postgres.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.postgres.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.postgres.generatedclasses.Keys.PK_T_LANGUAGE, org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.postgres.generatedclasses.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.postgres.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.postgres.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = createForeignKey(org.jooq.test.postgres.generatedclasses.Keys.PK_T_BOOK, org.jooq.test.postgres.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.postgres.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_ID); public static final org.jooq.ForeignKey X_TEST_CASE_64_69__FK_X_TEST_CASE_64_69A = createForeignKey(org.jooq.test.postgres.generatedclasses.Keys.UK_X_UNUSED_ID, org.jooq.test.postgres.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.postgres.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Public.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Public.java index 22bb8b0403..f2cbc5aa4c 100644 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Public.java +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Public.java @@ -9,7 +9,7 @@ package org.jooq.test.postgres.generatedclasses; @java.lang.SuppressWarnings("all") public class Public extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -140811606; + private static final long serialVersionUID = -1536728010; /** * The singleton instance of public @@ -32,7 +32,6 @@ public class Public extends org.jooq.impl.SchemaImpl { public final java.util.List> getTables() { return java.util.Arrays.>asList( org.jooq.test.postgres.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.postgres.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.postgres.generatedclasses.tables.T_785.T_785, org.jooq.test.postgres.generatedclasses.tables.T_959.T_959, @@ -47,6 +46,7 @@ public class Public extends org.jooq.impl.SchemaImpl { org.jooq.test.postgres.generatedclasses.tables.TDates.T_DATES, org.jooq.test.postgres.generatedclasses.tables.TIdentity.T_IDENTITY, org.jooq.test.postgres.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.postgres.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.postgres.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.postgres.generatedclasses.tables.VBook.V_BOOK, diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Tables.java index 94456e97fb..58bcf89f50 100644 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.postgres.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.postgres.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table public.t_658_ref - */ - public static final org.jooq.test.postgres.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table public.t_725_lob_test */ @@ -91,6 +86,11 @@ public final class Tables { */ public static final org.jooq.test.postgres.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.postgres.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * The table public.t_language + */ + public static final org.jooq.test.postgres.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table public.t_triggers */ diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 8733985331..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column public.t_language.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column public.t_language.cd - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column public.t_language.description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 6830bd3a07..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column public.t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_12.java deleted file mode 100644 index 946cffdd38..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column public.t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column public.t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 61ecaff58a..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column public.t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_22.java deleted file mode 100644 index c97da69e64..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column public.t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column public.t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_31.java deleted file mode 100644 index 8f6286dc11..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column public.t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_32.java deleted file mode 100644 index d0bfb32a21..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column public.t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column public.t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/TBook.java index 7e9d119951..371a51603d 100644 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.postgres.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 2096870446; + private static final long serialVersionUID = 476311199; /** * The singleton instance of public.t_book @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.postgres.generatedclasses.enums.TLanguage.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.INTEGER, this); /** * The table column public.t_book.content_text @@ -116,7 +116,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.postgres.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.postgres.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.postgres.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.postgres.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.postgres.generatedclasses.Keys.T_BOOK__FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..395f1d4b82 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/TLanguage.java @@ -0,0 +1,72 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.postgres.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 1251323013; + + /** + * The singleton instance of public.t_language + */ + public static final org.jooq.test.postgres.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.postgres.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.postgres.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column public.t_language.cd + */ + public final org.jooq.TableField CD = createField("cd", org.jooq.impl.SQLDataType.CHAR, this); + + /** + * The table column public.t_language.description + */ + public final org.jooq.TableField DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column public.t_language.description_english + */ + public final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column public.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, this); + + public TLanguage() { + super("t_language", org.jooq.test.postgres.generatedclasses.Public.PUBLIC); + } + + public TLanguage(java.lang.String alias) { + super(alias, org.jooq.test.postgres.generatedclasses.Public.PUBLIC, org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.postgres.generatedclasses.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.postgres.generatedclasses.Keys.PK_T_LANGUAGE); + } + + @Override + public org.jooq.test.postgres.generatedclasses.tables.TLanguage as(java.lang.String alias) { + return new org.jooq.test.postgres.generatedclasses.tables.TLanguage(alias); + } +} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index fb4dd7a978..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = -1668001214; - - /** - * The singleton instance of public.t_658_ref - */ - public static final org.jooq.test.postgres.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.postgres.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.postgres.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column public.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES public.t_658_11 (id)
-	 * 
- */ - public final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.postgres.generatedclasses.enums.T_658_11.class), this); - - /** - * The table column public.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES public.t_658_21 (id)
-	 * 
- */ - public final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.postgres.generatedclasses.enums.T_658_21.class), this); - - /** - * The table column public.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES public.t_658_31 (id)
-	 * 
- */ - public final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.postgres.generatedclasses.enums.T_658_31.class), this); - - /** - * The table column public.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES public.t_658_12 (id)
-	 * 
- */ - public final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.postgres.generatedclasses.enums.T_658_12.class), this); - - /** - * The table column public.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES public.t_658_22 (id)
-	 * 
- */ - public final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.postgres.generatedclasses.enums.T_658_22.class), this); - - /** - * The table column public.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES public.t_658_32 (id)
-	 * 
- */ - public final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.postgres.generatedclasses.enums.T_658_32.class), this); - - public T_658Ref() { - super("t_658_ref", org.jooq.test.postgres.generatedclasses.Public.PUBLIC); - } - - public T_658Ref(java.lang.String alias) { - super(alias, org.jooq.test.postgres.generatedclasses.Public.PUBLIC, org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } - - @Override - public org.jooq.test.postgres.generatedclasses.tables.T_658Ref as(java.lang.String alias) { - return new org.jooq.test.postgres.generatedclasses.tables.T_658Ref(alias); - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/TBook.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/TBook.java index c4853770f3..62f42141d3 100644 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/TBook.java +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/TBook.java @@ -11,7 +11,7 @@ package org.jooq.test.postgres.generatedclasses.tables.pojos; @javax.persistence.Table(name = "t_book", schema = "public") public class TBook implements java.io.Serializable { - private static final long serialVersionUID = -626739950; + private static final long serialVersionUID = -1192359689; private final java.lang.Integer id; private final java.lang.Integer authorId; @@ -19,7 +19,7 @@ public class TBook implements java.io.Serializable { private final java.lang.Integer detailsId; private final java.lang.String title; private final java.lang.Integer publishedIn; - private final org.jooq.test.postgres.generatedclasses.enums.TLanguage languageId; + private final java.lang.Integer languageId; private final java.lang.String contentText; private final byte[] contentPdf; private final org.jooq.test.postgres.generatedclasses.enums.UBookStatus status; @@ -31,7 +31,7 @@ public class TBook implements java.io.Serializable { java.lang.Integer detailsId, java.lang.String title, java.lang.Integer publishedIn, - org.jooq.test.postgres.generatedclasses.enums.TLanguage languageId, + java.lang.Integer languageId, java.lang.String contentText, byte[] contentPdf, org.jooq.test.postgres.generatedclasses.enums.UBookStatus status @@ -80,7 +80,7 @@ public class TBook implements java.io.Serializable { } @javax.persistence.Column(name = "language_id", nullable = false, precision = 32) - public org.jooq.test.postgres.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return this.languageId; } diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/TLanguage.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/TLanguage.java new file mode 100644 index 0000000000..b7f619c826 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/TLanguage.java @@ -0,0 +1,53 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.postgres.generatedclasses.tables.pojos; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "t_language", schema = "public") +public class TLanguage implements java.io.Serializable { + + private static final long serialVersionUID = -1302543125; + + private final java.lang.String cd; + private final java.lang.String description; + private final java.lang.String descriptionEnglish; + private final java.lang.Integer id; + + public TLanguage( + java.lang.String cd, + java.lang.String description, + java.lang.String descriptionEnglish, + java.lang.Integer id + ) { + this.cd = cd; + this.description = description; + this.descriptionEnglish = descriptionEnglish; + this.id = id; + } + + @javax.persistence.Column(name = "cd", nullable = false, length = 2) + public java.lang.String getCd() { + return this.cd; + } + + @javax.persistence.Column(name = "description", length = 50) + public java.lang.String getDescription() { + return this.description; + } + + @javax.persistence.Column(name = "description_english", length = 50) + public java.lang.String getDescriptionEnglish() { + return this.descriptionEnglish; + } + + @javax.persistence.Id + @javax.persistence.Column(name = "id", unique = true, nullable = false, precision = 32) + public java.lang.Integer getId() { + return this.id; + } +} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/T_658Ref.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/T_658Ref.java deleted file mode 100644 index d52be8be10..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/pojos/T_658Ref.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.tables.pojos; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "t_658_ref", schema = "public") -public class T_658Ref implements java.io.Serializable { - - private static final long serialVersionUID = -1148412898; - - private final org.jooq.test.postgres.generatedclasses.enums.T_658_11 ref_11; - private final org.jooq.test.postgres.generatedclasses.enums.T_658_21 ref_21; - private final org.jooq.test.postgres.generatedclasses.enums.T_658_31 ref_31; - private final org.jooq.test.postgres.generatedclasses.enums.T_658_12 ref_12; - private final org.jooq.test.postgres.generatedclasses.enums.T_658_22 ref_22; - private final org.jooq.test.postgres.generatedclasses.enums.T_658_32 ref_32; - - public T_658Ref( - org.jooq.test.postgres.generatedclasses.enums.T_658_11 ref_11, - org.jooq.test.postgres.generatedclasses.enums.T_658_21 ref_21, - org.jooq.test.postgres.generatedclasses.enums.T_658_31 ref_31, - org.jooq.test.postgres.generatedclasses.enums.T_658_12 ref_12, - org.jooq.test.postgres.generatedclasses.enums.T_658_22 ref_22, - org.jooq.test.postgres.generatedclasses.enums.T_658_32 ref_32 - ) { - this.ref_11 = ref_11; - this.ref_21 = ref_21; - this.ref_31 = ref_31; - this.ref_12 = ref_12; - this.ref_22 = ref_22; - this.ref_32 = ref_32; - } - - @javax.persistence.Column(name = "ref_11", length = 3) - public org.jooq.test.postgres.generatedclasses.enums.T_658_11 getRef_11() { - return this.ref_11; - } - - @javax.persistence.Column(name = "ref_21", precision = 32) - public org.jooq.test.postgres.generatedclasses.enums.T_658_21 getRef_21() { - return this.ref_21; - } - - @javax.persistence.Column(name = "ref_31", precision = 64) - public org.jooq.test.postgres.generatedclasses.enums.T_658_31 getRef_31() { - return this.ref_31; - } - - @javax.persistence.Column(name = "ref_12", length = 3) - public org.jooq.test.postgres.generatedclasses.enums.T_658_12 getRef_12() { - return this.ref_12; - } - - @javax.persistence.Column(name = "ref_22", precision = 32) - public org.jooq.test.postgres.generatedclasses.enums.T_658_22 getRef_22() { - return this.ref_22; - } - - @javax.persistence.Column(name = "ref_32", precision = 64) - public org.jooq.test.postgres.generatedclasses.enums.T_658_32 getRef_32() { - return this.ref_32; - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/TBookRecord.java index a48eba5bb7..67f1414687 100644 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/TBookRecord.java @@ -11,7 +11,7 @@ package org.jooq.test.postgres.generatedclasses.tables.records; @javax.persistence.Table(name = "t_book", schema = "public") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 1649915497; + private static final long serialVersionUID = 1452415014; /** * The table column public.t_book.id @@ -211,7 +211,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.postgres.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value); } @@ -225,10 +225,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ @javax.persistence.Column(name = "language_id", nullable = false, precision = 32) - public org.jooq.test.postgres.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.postgres.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.postgres.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value.getValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.ID)); + } + } + + /** + * The table column public.t_book.language_id + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT t_book__fk_t_book_language_id
+	 * FOREIGN KEY (language_id)
+	 * REFERENCES public.t_language (id)
+	 * 
+ */ + public org.jooq.test.postgres.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.ID.equal(getValue(org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column public.t_book.content_text */ diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..81a64217d1 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,99 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.postgres.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +@javax.persistence.Entity +@javax.persistence.Table(name = "t_language", schema = "public") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = -839249139; + + /** + * The table column public.t_language.cd + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.CD, value); + } + + /** + * The table column public.t_language.cd + */ + @javax.persistence.Column(name = "cd", nullable = false, length = 2) + public java.lang.String getCd() { + return getValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.CD); + } + + /** + * The table column public.t_language.description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION, value); + } + + /** + * The table column public.t_language.description + */ + @javax.persistence.Column(name = "description", length = 50) + public java.lang.String getDescription() { + return getValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION); + } + + /** + * The table column public.t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column public.t_language.description_english + */ + @javax.persistence.Column(name = "description_english", length = 50) + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH); + } + + /** + * The table column public.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.ID, value); + } + + /** + * The table column public.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + @javax.persistence.Id + @javax.persistence.Column(name = "id", unique = true, nullable = false, precision = 32) + public java.lang.Integer getId() { + return getValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); + } + + /** + * The table column public.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.postgres.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID.equal(getValue(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.postgres.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index 60e16d1eaa..0000000000 --- a/jOOQ-test/src/org/jooq/test/postgres/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,184 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.postgres.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -@javax.persistence.Entity -@javax.persistence.Table(name = "t_658_ref", schema = "public") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -733702237; - - /** - * The table column public.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES public.t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.postgres.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_11, value); - } - - /** - * The table column public.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES public.t_658_11 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_11", length = 3) - public org.jooq.test.postgres.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_11); - } - - /** - * The table column public.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES public.t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.postgres.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_21, value); - } - - /** - * The table column public.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES public.t_658_21 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_21", precision = 32) - public org.jooq.test.postgres.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_21); - } - - /** - * The table column public.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES public.t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.postgres.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_31, value); - } - - /** - * The table column public.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES public.t_658_31 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_31", precision = 64) - public org.jooq.test.postgres.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_31); - } - - /** - * The table column public.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES public.t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.postgres.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_12, value); - } - - /** - * The table column public.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES public.t_658_12 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_12", length = 3) - public org.jooq.test.postgres.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_12); - } - - /** - * The table column public.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES public.t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.postgres.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_22, value); - } - - /** - * The table column public.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES public.t_658_22 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_22", precision = 32) - public org.jooq.test.postgres.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_22); - } - - /** - * The table column public.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES public.t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.postgres.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_32, value); - } - - /** - * The table column public.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES public.t_658_32 (id)
-	 * 
- */ - @javax.persistence.Column(name = "ref_32", precision = 64) - public org.jooq.test.postgres.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.postgres.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/postgres/reset.sql b/jOOQ-test/src/org/jooq/test/postgres/reset.sql index 7037bee777..663bab3aad 100644 --- a/jOOQ-test/src/org/jooq/test/postgres/reset.sql +++ b/jOOQ-test/src/org/jooq/test/postgres/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_arrays/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ @@ -27,13 +20,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A'), ('B'), ('C')/ -INSERT INTO t_658_21 VALUES (1), (2), (3)/ -INSERT INTO t_658_31 VALUES (1), (2), (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A'), ('B', 'B'), ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ INSERT INTO t_author VALUES (nextval('s_author_id'), 'George', 'Orwell', TO_DATE('1903-06-25', 'YYYY-MM-DD'), 1903, ROW(ROW('Parliament Hill', '77', '{1, 2, 3}', E'\\x7070'), 'NW31A9', 'Hampstead', 'England', '1980-01-01', null, E'\\x7171')) / diff --git a/jOOQ-test/src/org/jooq/test/sqlite/create.sql b/jOOQ-test/src/org/jooq/test/sqlite/create.sql index dae767ae73..6e7eed723e 100644 --- a/jOOQ-test/src/org/jooq/test/sqlite/create.sql +++ b/jOOQ-test/src/org/jooq/test/sqlite/create.sql @@ -17,13 +17,6 @@ DROP TABLE IF EXISTS t_986_1/ DROP TABLE IF EXISTS t_986_2/ DROP TABLE IF EXISTS x_unused/ DROP TABLE IF EXISTS t_639_numbers_table/ -DROP TABLE IF EXISTS t_658_ref/ -DROP TABLE IF EXISTS t_658_11/ -DROP TABLE IF EXISTS t_658_21/ -DROP TABLE IF EXISTS t_658_31/ -DROP TABLE IF EXISTS t_658_12/ -DROP TABLE IF EXISTS t_658_22/ -DROP TABLE IF EXISTS t_658_32/ DROP TABLE IF EXISTS t_725_lob_test/ DROP TABLE IF EXISTS t_785/ DROP TABLE IF EXISTS t_booleans/ @@ -86,67 +79,6 @@ CREATE TABLE t_language ( ) / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id int8 NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id int8 NOT NULL, - cd int8 NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 int8, - ref_12 char(3), - ref_22 int, - ref_32 int8, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/Keys.java index 9de6856219..18405058e3 100644 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/Keys.java @@ -26,6 +26,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOK_TO_BOOK_STORE_BOOK_ID = UniqueKeys0.PK_T_BOOK_TO_BOOK_STORE_BOOK_ID; public static final org.jooq.UniqueKey PK_T_BOOLEANS_ID = UniqueKeys0.PK_T_BOOLEANS_ID; public static final org.jooq.UniqueKey PK_T_DATES_ID = UniqueKeys0.PK_T_DATES_ID; + public static final org.jooq.UniqueKey PK_T_LANGUAGE_ID = UniqueKeys0.PK_T_LANGUAGE_ID; public static final org.jooq.UniqueKey PK_T_TRIGGERS_ID_GENERATED = UniqueKeys0.PK_T_TRIGGERS_ID_GENERATED; public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69_ID = UniqueKeys0.PK_X_TEST_CASE_64_69_ID; public static final org.jooq.UniqueKey PK_X_TEST_CASE_71_ID = UniqueKeys0.PK_X_TEST_CASE_71_ID; @@ -38,6 +39,7 @@ public class Keys { public static final org.jooq.ForeignKey FK_T_986_2_X_UNUSED_1 = ForeignKeys0.FK_T_986_2_X_UNUSED_1; public static final org.jooq.ForeignKey FK_T_BOOK_T_AUTHOR_2 = ForeignKeys0.FK_T_BOOK_T_AUTHOR_2; public static final org.jooq.ForeignKey FK_T_BOOK_T_AUTHOR_1 = ForeignKeys0.FK_T_BOOK_T_AUTHOR_1; + public static final org.jooq.ForeignKey FK_T_BOOK_T_LANGUAGE_1 = ForeignKeys0.FK_T_BOOK_T_LANGUAGE_1; public static final org.jooq.ForeignKey FK_T_BOOK_TO_BOOK_STORE_T_BOOK_STORE_1 = ForeignKeys0.FK_T_BOOK_TO_BOOK_STORE_T_BOOK_STORE_1; public static final org.jooq.ForeignKey FK_T_BOOK_TO_BOOK_STORE_T_BOOK_1 = ForeignKeys0.FK_T_BOOK_TO_BOOK_STORE_T_BOOK_1; public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69_X_UNUSED_1 = ForeignKeys0.FK_X_TEST_CASE_64_69_X_UNUSED_1; @@ -63,6 +65,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOK_TO_BOOK_STORE_BOOK_ID = createUniqueKey(org.jooq.test.sqlite.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.sqlite.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.UniqueKey PK_T_BOOLEANS_ID = createUniqueKey(org.jooq.test.sqlite.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.sqlite.generatedclasses.tables.TBooleans.ID); public static final org.jooq.UniqueKey PK_T_DATES_ID = createUniqueKey(org.jooq.test.sqlite.generatedclasses.tables.TDates.T_DATES, org.jooq.test.sqlite.generatedclasses.tables.TDates.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE_ID = createUniqueKey(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.sqlite.generatedclasses.tables.TLanguage.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS_ID_GENERATED = createUniqueKey(org.jooq.test.sqlite.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.sqlite.generatedclasses.tables.TTriggers.ID_GENERATED); public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69_ID = createUniqueKey(org.jooq.test.sqlite.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.sqlite.generatedclasses.tables.XTestCase_64_69.ID); public static final org.jooq.UniqueKey PK_X_TEST_CASE_71_ID = createUniqueKey(org.jooq.test.sqlite.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.sqlite.generatedclasses.tables.XTestCase_71.ID); @@ -77,6 +80,7 @@ public class Keys { public static final org.jooq.ForeignKey FK_T_986_2_X_UNUSED_1 = createForeignKey(org.jooq.test.sqlite.generatedclasses.Keys.PK_X_UNUSED_ID, org.jooq.test.sqlite.generatedclasses.tables.T_986_2.T_986_2, org.jooq.test.sqlite.generatedclasses.tables.T_986_2.REF); public static final org.jooq.ForeignKey FK_T_BOOK_T_AUTHOR_2 = createForeignKey(org.jooq.test.sqlite.generatedclasses.Keys.PK_T_AUTHOR_ID, org.jooq.test.sqlite.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sqlite.generatedclasses.tables.TBook.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_T_AUTHOR_1 = createForeignKey(org.jooq.test.sqlite.generatedclasses.Keys.PK_T_AUTHOR_ID, org.jooq.test.sqlite.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sqlite.generatedclasses.tables.TBook.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_T_LANGUAGE_1 = createForeignKey(org.jooq.test.sqlite.generatedclasses.Keys.PK_T_LANGUAGE_ID, org.jooq.test.sqlite.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sqlite.generatedclasses.tables.TBook.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_T_BOOK_TO_BOOK_STORE_T_BOOK_STORE_1 = createForeignKey(org.jooq.test.sqlite.generatedclasses.Keys.PK_T_BOOK_STORE_NAME, org.jooq.test.sqlite.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.sqlite.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_T_BOOK_TO_BOOK_STORE_T_BOOK_1 = createForeignKey(org.jooq.test.sqlite.generatedclasses.Keys.PK_T_BOOK_ID, org.jooq.test.sqlite.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.sqlite.generatedclasses.tables.TBookToBookStore.BOOK_ID); public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69_X_UNUSED_1 = createForeignKey(org.jooq.test.sqlite.generatedclasses.Keys.PK_X_UNUSED_ID, org.jooq.test.sqlite.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.sqlite.generatedclasses.tables.XTestCase_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/Tables.java index ae15428aeb..05b9273d2e 100644 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/Tables.java @@ -21,11 +21,6 @@ public final class Tables { */ public static final org.jooq.test.sqlite.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.sqlite.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table t_658_ref - */ - public static final org.jooq.test.sqlite.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table t_725_lob_test */ @@ -76,6 +71,11 @@ public final class Tables { */ public static final org.jooq.test.sqlite.generatedclasses.tables.TDates T_DATES = org.jooq.test.sqlite.generatedclasses.tables.TDates.T_DATES; + /** + * The table t_language + */ + public static final org.jooq.test.sqlite.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.sqlite.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table t_triggers */ diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 999bc25083..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column t_language.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column t_language.cd - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column t_language.description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 6021cc57d6..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A"), - - /** - * B - */ - B("B"), - - /** - * C - */ - C("C"), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_12.java deleted file mode 100644 index e0a01af175..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A", "A"), - - /** - * B - */ - B("B", "B"), - - /** - * C - */ - C("C", "C"), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 4bd2a0495c..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_22.java deleted file mode 100644 index b48572a485..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_31.java deleted file mode 100644 index ee089aadce..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_32.java deleted file mode 100644 index eb3d33cbda..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/TBook.java index 1c3f1732db..822a901a6a 100644 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.sqlite.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -1234234472; + private static final long serialVersionUID = -145459489; /** * The singleton instance of t_book @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sqlite.generatedclasses.enums.TLanguage.class), T_BOOK); + public static final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, T_BOOK); /** * The table column t_book.CONTENT_TEXT @@ -110,6 +110,6 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.sqlite.generatedclasses.Keys.FK_T_BOOK_T_AUTHOR_2, org.jooq.test.sqlite.generatedclasses.Keys.FK_T_BOOK_T_AUTHOR_1); + return java.util.Arrays.>asList(org.jooq.test.sqlite.generatedclasses.Keys.FK_T_BOOK_T_AUTHOR_2, org.jooq.test.sqlite.generatedclasses.Keys.FK_T_BOOK_T_AUTHOR_1, org.jooq.test.sqlite.generatedclasses.Keys.FK_T_BOOK_T_LANGUAGE_1); } } diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..2b1d5a042a --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/TLanguage.java @@ -0,0 +1,66 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.sqlite.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 300681676; + + /** + * The singleton instance of t_language + */ + public static final org.jooq.test.sqlite.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.sqlite.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.sqlite.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column t_language.cd + */ + public static final org.jooq.TableField CD = createField("cd", org.jooq.impl.SQLDataType.CHAR, T_LANGUAGE); + + /** + * The table column t_language.description + */ + public static final org.jooq.TableField DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column t_language.description_english + */ + public static final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, T_LANGUAGE); + + /** + * The table column t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public static final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, T_LANGUAGE); + + /** + * No further instances allowed + */ + private TLanguage() { + super("t_language"); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.sqlite.generatedclasses.Keys.PK_T_LANGUAGE_ID; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.sqlite.generatedclasses.Keys.PK_T_LANGUAGE_ID); + } +} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 16919707cf..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = -1234682001; - - /** - * The singleton instance of t_658_ref - */ - public static final org.jooq.test.sqlite.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.sqlite.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.sqlite.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_11_1
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES t_658_11 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.sqlite.generatedclasses.enums.T_658_11.class), T_658_REF); - - /** - * The table column t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_21_1
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES t_658_21 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sqlite.generatedclasses.enums.T_658_21.class), T_658_REF); - - /** - * The table column t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_31_1
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES t_658_31 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.sqlite.generatedclasses.enums.T_658_31.class), T_658_REF); - - /** - * The table column t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_12_1
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES t_658_12 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.sqlite.generatedclasses.enums.T_658_12.class), T_658_REF); - - /** - * The table column t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_22_1
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES t_658_22 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sqlite.generatedclasses.enums.T_658_22.class), T_658_REF); - - /** - * The table column t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_32_1
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES t_658_32 (id)
-	 * 
- */ - public static final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.sqlite.generatedclasses.enums.T_658_32.class), T_658_REF); - - /** - * No further instances allowed - */ - private T_658Ref() { - super("t_658_ref"); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/TBookRecord.java index 06598636d7..237596c4a2 100644 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/TBookRecord.java @@ -9,7 +9,7 @@ package org.jooq.test.sqlite.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 605033356; + private static final long serialVersionUID = -24682335; /** * The table column t_book.ID @@ -202,7 +202,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.sqlite.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.sqlite.generatedclasses.tables.TBook.LANGUAGE_ID, value); } @@ -215,10 +215,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.sqlite.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.sqlite.generatedclasses.tables.TBook.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.sqlite.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.sqlite.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.sqlite.generatedclasses.tables.TBook.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.sqlite.generatedclasses.tables.TBook.LANGUAGE_ID, value.getValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.ID)); + } + } + + /** + * The table column t_book.LANGUAGE_ID + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT fk_t_book_T_LANGUAGE_1
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES t_language (id)
+	 * 
+ */ + public org.jooq.test.sqlite.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.ID.equal(getValue(org.jooq.test.sqlite.generatedclasses.tables.TBook.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column t_book.CONTENT_TEXT */ diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..2582654819 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,92 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.sqlite.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = 833603051; + + /** + * The table column t_language.cd + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.CD, value); + } + + /** + * The table column t_language.cd + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.CD); + } + + /** + * The table column t_language.description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.DESCRIPTION, value); + } + + /** + * The table column t_language.description + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.DESCRIPTION); + } + + /** + * The table column t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column t_language.description_english + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.DESCRIPTION_ENGLISH); + } + + /** + * The table column t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.ID, value); + } + + /** + * The table column t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.ID); + } + + /** + * The table column t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.sqlite.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.sqlite.generatedclasses.tables.TBook.LANGUAGE_ID.equal(getValue(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.sqlite.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index e4d4d1eb40..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlite/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlite.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -643072428; - - /** - * The table column t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_11_1
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.sqlite.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_11, value); - } - - /** - * The table column t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_11_1
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES t_658_11 (id)
-	 * 
- */ - public org.jooq.test.sqlite.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_11); - } - - /** - * The table column t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_21_1
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.sqlite.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_21, value); - } - - /** - * The table column t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_21_1
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES t_658_21 (id)
-	 * 
- */ - public org.jooq.test.sqlite.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_21); - } - - /** - * The table column t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_31_1
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.sqlite.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_31, value); - } - - /** - * The table column t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_31_1
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES t_658_31 (id)
-	 * 
- */ - public org.jooq.test.sqlite.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_31); - } - - /** - * The table column t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_12_1
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.sqlite.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_12, value); - } - - /** - * The table column t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_12_1
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES t_658_12 (id)
-	 * 
- */ - public org.jooq.test.sqlite.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_12); - } - - /** - * The table column t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_22_1
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.sqlite.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_22, value); - } - - /** - * The table column t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_22_1
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES t_658_22 (id)
-	 * 
- */ - public org.jooq.test.sqlite.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_22); - } - - /** - * The table column t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_32_1
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.sqlite.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_32, value); - } - - /** - * The table column t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_ref_t_658_32_1
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES t_658_32 (id)
-	 * 
- */ - public org.jooq.test.sqlite.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.sqlite.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlite/reset.sql b/jOOQ-test/src/org/jooq/test/sqlite/reset.sql index ca048c1815..40ebdfad90 100644 --- a/jOOQ-test/src/org/jooq/test/sqlite/reset.sql +++ b/jOOQ-test/src/org/jooq/test/sqlite/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ DELETE FROM t_book/ @@ -21,25 +14,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A')/ -INSERT INTO t_658_11 VALUES ('B')/ -INSERT INTO t_658_11 VALUES ('C')/ -INSERT INTO t_658_21 VALUES (1)/ -INSERT INTO t_658_21 VALUES (2)/ -INSERT INTO t_658_21 VALUES (3)/ -INSERT INTO t_658_31 VALUES (1)/ -INSERT INTO t_658_31 VALUES (2)/ -INSERT INTO t_658_31 VALUES (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A')/ -INSERT INTO t_658_12 VALUES ('B', 'B')/ -INSERT INTO t_658_12 VALUES ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1)/ -INSERT INTO t_658_22 VALUES (2, 2)/ -INSERT INTO t_658_22 VALUES (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1)/ -INSERT INTO t_658_32 VALUES (2, 2)/ -INSERT INTO t_658_32 VALUES (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ INSERT INTO t_author VALUES (1, 'George', 'Orwell', '1903-06-25', 1903, null); / diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/create.sql b/jOOQ-test/src/org/jooq/test/sqlserver/create.sql index 0fca9de1db..10bf791356 100644 --- a/jOOQ-test/src/org/jooq/test/sqlserver/create.sql +++ b/jOOQ-test/src/org/jooq/test/sqlserver/create.sql @@ -43,13 +43,6 @@ DROP TABLE x_test_case_85/ DROP TABLE x_unused/ DROP TABLE x_many_fields/ DROP TABLE t_639_numbers_table/ -DROP TABLE t_658_ref/ -DROP TABLE t_658_11/ -DROP TABLE t_658_21/ -DROP TABLE t_658_31/ -DROP TABLE t_658_12/ -DROP TABLE t_658_22/ -DROP TABLE t_658_32/ DROP TABLE t_725_lob_test/ DROP TABLE t_785/ DROP TABLE t_booleans/ @@ -127,67 +120,6 @@ CREATE TABLE t_language ( ) / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Dbo.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Dbo.java index 3b5d823e46..c1e56332ab 100644 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Dbo.java +++ b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Dbo.java @@ -9,7 +9,7 @@ package org.jooq.test.sqlserver.generatedclasses; @java.lang.SuppressWarnings("all") public class Dbo extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = 274752685; + private static final long serialVersionUID = 1114819479; /** * The singleton instance of dbo @@ -27,7 +27,6 @@ public class Dbo extends org.jooq.impl.SchemaImpl { public final java.util.List> getTables() { return java.util.Arrays.>asList( org.jooq.test.sqlserver.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE, - org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF, org.jooq.test.sqlserver.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.sqlserver.generatedclasses.tables.T_785.T_785, org.jooq.test.sqlserver.generatedclasses.tables.TAuthor.T_AUTHOR, @@ -38,6 +37,7 @@ public class Dbo extends org.jooq.impl.SchemaImpl { org.jooq.test.sqlserver.generatedclasses.tables.TDates.T_DATES, org.jooq.test.sqlserver.generatedclasses.tables.TIdentity.T_IDENTITY, org.jooq.test.sqlserver.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, + org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.sqlserver.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.sqlserver.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.sqlserver.generatedclasses.tables.VBook.V_BOOK, diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Keys.java index 365f75e6d2..5557fa5189 100644 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Keys.java @@ -27,6 +27,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = UniqueKeys0.PK_T_BOOLEANS; public static final org.jooq.UniqueKey PK_T_DATES = UniqueKeys0.PK_T_DATES; public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = UniqueKeys0.PK_T_IDENTITY_PK; + public static final org.jooq.UniqueKey PK_T_LANGUAGE = UniqueKeys0.PK_T_LANGUAGE; public static final org.jooq.UniqueKey PK_T_TRIGGERS = UniqueKeys0.PK_T_TRIGGERS; public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = UniqueKeys0.PK_X_TEST_CASE_64_69; public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = UniqueKeys0.PK_X_TEST_CASE_71; @@ -37,6 +38,7 @@ public class Keys { // 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; + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = ForeignKeys0.FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey FK_B2BS_B_ID = ForeignKeys0.FK_B2BS_B_ID; public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = ForeignKeys0.FK_X_TEST_CASE_64_69A; @@ -67,6 +69,7 @@ public class Keys { public static final org.jooq.UniqueKey PK_T_BOOLEANS = createUniqueKey(org.jooq.test.sqlserver.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.sqlserver.generatedclasses.tables.TBooleans.T_BOOLEANS.ID); public static final org.jooq.UniqueKey PK_T_DATES = createUniqueKey(org.jooq.test.sqlserver.generatedclasses.tables.TDates.T_DATES, org.jooq.test.sqlserver.generatedclasses.tables.TDates.T_DATES.ID); public static final org.jooq.UniqueKey PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.sqlserver.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.sqlserver.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK.ID); + public static final org.jooq.UniqueKey PK_T_LANGUAGE = createUniqueKey(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); public static final org.jooq.UniqueKey PK_T_TRIGGERS = createUniqueKey(org.jooq.test.sqlserver.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.sqlserver.generatedclasses.tables.TTriggers.T_TRIGGERS.ID_GENERATED); public static final org.jooq.UniqueKey PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.sqlserver.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.sqlserver.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.ID); public static final org.jooq.UniqueKey PK_X_TEST_CASE_71 = createUniqueKey(org.jooq.test.sqlserver.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.sqlserver.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71.ID); @@ -79,6 +82,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.sqlserver.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.sqlserver.generatedclasses.Keys.PK_T_AUTHOR, org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.sqlserver.generatedclasses.Keys.PK_T_LANGUAGE, org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.sqlserver.generatedclasses.Keys.UK_T_BOOK_STORE_NAME, org.jooq.test.sqlserver.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.sqlserver.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.ForeignKey FK_B2BS_B_ID = createForeignKey(org.jooq.test.sqlserver.generatedclasses.Keys.PK_T_BOOK, org.jooq.test.sqlserver.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.sqlserver.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_ID); public static final org.jooq.ForeignKey FK_X_TEST_CASE_64_69A = createForeignKey(org.jooq.test.sqlserver.generatedclasses.Keys.UK_X_UNUSED_ID, org.jooq.test.sqlserver.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.sqlserver.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69.UNUSED_ID); diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Tables.java index f30d7dd0eb..b9f59a3d7f 100644 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/Tables.java @@ -16,11 +16,6 @@ public final class Tables { */ public static final org.jooq.test.sqlserver.generatedclasses.tables.T_639NumbersTable T_639_NUMBERS_TABLE = org.jooq.test.sqlserver.generatedclasses.tables.T_639NumbersTable.T_639_NUMBERS_TABLE; - /** - * The table dbo.t_658_ref - */ - public static final org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF; - /** * The table dbo.t_725_lob_test */ @@ -71,6 +66,11 @@ public final class Tables { */ public static final org.jooq.test.sqlserver.generatedclasses.tables.TIdentityPk T_IDENTITY_PK = org.jooq.test.sqlserver.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK; + /** + * The table dbo.t_language + */ + public static final org.jooq.test.sqlserver.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE; + /** * The table dbo.t_triggers */ diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/TLanguage.java deleted file mode 100644 index 1f3efd7251..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_language.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column dbo.t_language.cd - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column dbo.t_language.description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_11.java deleted file mode 100644 index e408887efe..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A "), - - /** - * B - */ - B__("B "), - - /** - * C - */ - C__("C "), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_12.java deleted file mode 100644 index be31249b2f..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A__("A ", "A "), - - /** - * B - */ - B__("B ", "B "), - - /** - * C - */ - C__("C ", "C "), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column dbo.t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 910b8a5a76..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 8ef96d75f9..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column dbo.t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_31.java deleted file mode 100644 index b7d9ceef3e..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_32.java deleted file mode 100644 index 88bd3f3f42..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column dbo.t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column dbo.t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/TBook.java index 9d55436367..c3d55a29bc 100644 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/TBook.java @@ -9,7 +9,7 @@ package org.jooq.test.sqlserver.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -762247197; + private static final long serialVersionUID = 1880873304; /** * The singleton instance of dbo.t_book @@ -77,7 +77,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sqlserver.generatedclasses.enums.TLanguage.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, this); /** * The table column dbo.t_book.CONTENT_TEXT @@ -111,7 +111,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.sqlserver.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.sqlserver.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.sqlserver.generatedclasses.Keys.FK_T_BOOK_AUTHOR_ID, org.jooq.test.sqlserver.generatedclasses.Keys.FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.sqlserver.generatedclasses.Keys.FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..87fd7515b7 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/TLanguage.java @@ -0,0 +1,72 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.sqlserver.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 856326097; + + /** + * The singleton instance of dbo.t_language + */ + public static final org.jooq.test.sqlserver.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.sqlserver.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.sqlserver.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column dbo.t_language.cd + */ + public final org.jooq.TableField CD = createField("cd", org.jooq.impl.SQLDataType.CHAR, this); + + /** + * The table column dbo.t_language.description + */ + public final org.jooq.TableField DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column dbo.t_language.description_english + */ + public final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column dbo.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, this); + + public TLanguage() { + super("t_language", org.jooq.test.sqlserver.generatedclasses.Dbo.DBO); + } + + public TLanguage(java.lang.String alias) { + super(alias, org.jooq.test.sqlserver.generatedclasses.Dbo.DBO, org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.sqlserver.generatedclasses.Keys.PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.sqlserver.generatedclasses.Keys.PK_T_LANGUAGE); + } + + @Override + public org.jooq.test.sqlserver.generatedclasses.tables.TLanguage as(java.lang.String alias) { + return new org.jooq.test.sqlserver.generatedclasses.tables.TLanguage(alias); + } +} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index b955d53134..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = -1493311098; - - /** - * The singleton instance of dbo.t_658_ref - */ - public static final org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.sqlserver.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column dbo.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES dbo.t_658_11 (id)
-	 * 
- */ - public final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.sqlserver.generatedclasses.enums.T_658_11.class), this); - - /** - * The table column dbo.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES dbo.t_658_21 (id)
-	 * 
- */ - public final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sqlserver.generatedclasses.enums.T_658_21.class), this); - - /** - * The table column dbo.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES dbo.t_658_31 (id)
-	 * 
- */ - public final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.sqlserver.generatedclasses.enums.T_658_31.class), this); - - /** - * The table column dbo.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES dbo.t_658_12 (id)
-	 * 
- */ - public final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.sqlserver.generatedclasses.enums.T_658_12.class), this); - - /** - * The table column dbo.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES dbo.t_658_22 (id)
-	 * 
- */ - public final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sqlserver.generatedclasses.enums.T_658_22.class), this); - - /** - * The table column dbo.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES dbo.t_658_32 (id)
-	 * 
- */ - public final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.sqlserver.generatedclasses.enums.T_658_32.class), this); - - public T_658Ref() { - super("t_658_ref", org.jooq.test.sqlserver.generatedclasses.Dbo.DBO); - } - - public T_658Ref(java.lang.String alias) { - super(alias, org.jooq.test.sqlserver.generatedclasses.Dbo.DBO, org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } - - @Override - public org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref as(java.lang.String alias) { - return new org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref(alias); - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/TBookRecord.java index 567cd0f681..26618472dc 100644 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/TBookRecord.java @@ -9,7 +9,7 @@ package org.jooq.test.sqlserver.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 1646241278; + private static final long serialVersionUID = 419461611; /** * The table column dbo.t_book.ID @@ -202,7 +202,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.sqlserver.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value); } @@ -215,10 +215,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.sqlserver.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.sqlserver.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.sqlserver.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value.getValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.ID)); + } + } + + /** + * The table column dbo.t_book.LANGUAGE_ID + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT fk_t_book_language_id
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES dbo.t_language (id)
+	 * 
+ */ + public org.jooq.test.sqlserver.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.ID.equal(getValue(org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column dbo.t_book.CONTENT_TEXT */ diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..d40fa63112 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,92 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.sqlserver.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = -1924915238; + + /** + * The table column dbo.t_language.cd + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.CD, value); + } + + /** + * The table column dbo.t_language.cd + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.CD); + } + + /** + * The table column dbo.t_language.description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION, value); + } + + /** + * The table column dbo.t_language.description + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION); + } + + /** + * The table column dbo.t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column dbo.t_language.description_english + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH); + } + + /** + * The table column dbo.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.ID, value); + } + + /** + * The table column dbo.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); + } + + /** + * The table column dbo.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.sqlserver.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID.equal(getValue(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.sqlserver.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index ff961dc580..0000000000 --- a/jOOQ-test/src/org/jooq/test/sqlserver/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sqlserver.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -160257561; - - /** - * The table column dbo.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES dbo.t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.sqlserver.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_11, value); - } - - /** - * The table column dbo.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES dbo.t_658_11 (id)
-	 * 
- */ - public org.jooq.test.sqlserver.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_11); - } - - /** - * The table column dbo.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES dbo.t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.sqlserver.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_21, value); - } - - /** - * The table column dbo.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES dbo.t_658_21 (id)
-	 * 
- */ - public org.jooq.test.sqlserver.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_21); - } - - /** - * The table column dbo.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES dbo.t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.sqlserver.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_31, value); - } - - /** - * The table column dbo.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES dbo.t_658_31 (id)
-	 * 
- */ - public org.jooq.test.sqlserver.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_31); - } - - /** - * The table column dbo.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES dbo.t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.sqlserver.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_12, value); - } - - /** - * The table column dbo.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES dbo.t_658_12 (id)
-	 * 
- */ - public org.jooq.test.sqlserver.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_12); - } - - /** - * The table column dbo.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES dbo.t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.sqlserver.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_22, value); - } - - /** - * The table column dbo.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES dbo.t_658_22 (id)
-	 * 
- */ - public org.jooq.test.sqlserver.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_22); - } - - /** - * The table column dbo.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES dbo.t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.sqlserver.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_32, value); - } - - /** - * The table column dbo.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES dbo.t_658_32 (id)
-	 * 
- */ - public org.jooq.test.sqlserver.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.sqlserver.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/sqlserver/reset.sql b/jOOQ-test/src/org/jooq/test/sqlserver/reset.sql index 92566319a0..00a0659c12 100644 --- a/jOOQ-test/src/org/jooq/test/sqlserver/reset.sql +++ b/jOOQ-test/src/org/jooq/test/sqlserver/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ DELETE FROM t_book/ @@ -23,14 +16,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A'), ('B'), ('C')/ -INSERT INTO t_658_21 VALUES (1), (2), (3)/ -INSERT INTO t_658_31 VALUES (1), (2), (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A'), ('B', 'B'), ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ - INSERT INTO t_author (id, first_name, last_name, date_of_birth, year_of_birth, address) VALUES (1, 'George', 'Orwell', '1903-06-25', 1903, null), (2, 'Paulo', 'Coelho', '1947-08-24', 1947, null) diff --git a/jOOQ-test/src/org/jooq/test/sybase/create.sql b/jOOQ-test/src/org/jooq/test/sybase/create.sql index 71ddae3061..67b4d67911 100644 --- a/jOOQ-test/src/org/jooq/test/sybase/create.sql +++ b/jOOQ-test/src/org/jooq/test/sybase/create.sql @@ -29,13 +29,6 @@ DROP TABLE IF EXISTS t_986_1/ DROP TABLE IF EXISTS t_986_2/ DROP TABLE IF EXISTS x_unused/ DROP TABLE IF EXISTS t_639_numbers_table/ -DROP TABLE IF EXISTS t_658_ref/ -DROP TABLE IF EXISTS t_658_11/ -DROP TABLE IF EXISTS t_658_21/ -DROP TABLE IF EXISTS t_658_31/ -DROP TABLE IF EXISTS t_658_12/ -DROP TABLE IF EXISTS t_658_22/ -DROP TABLE IF EXISTS t_658_32/ DROP TABLE IF EXISTS t_725_lob_test/ DROP TABLE IF EXISTS t_785/ DROP TABLE IF EXISTS t_booleans/ @@ -122,67 +115,6 @@ COMMENT ON COLUMN t_language.cd IS 'The language ISO code' / COMMENT ON COLUMN t_language.description IS 'The language description' / -CREATE TABLE t_658_11 ( - id CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_11 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_21 ( - id INT NOT NULL, - - CONSTRAINT pk_t_658_21 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_31 ( - id BIGINT NOT NULL, - - CONSTRAINT pk_t_658_31 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_12 ( - id CHAR(3) NOT NULL, - cd CHAR(3) NOT NULL, - - CONSTRAINT pk_t_658_12 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_22 ( - id INT NOT NULL, - cd INT NOT NULL, - - CONSTRAINT pk_t_658_22 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_32 ( - id BIGINT NOT NULL, - cd BIGINT NOT NULL, - - CONSTRAINT pk_t_658_32 PRIMARY KEY (id) -) -/ - -CREATE TABLE t_658_ref ( - ref_11 char(3), - ref_21 int, - ref_31 bigint, - ref_12 char(3), - ref_22 int, - ref_32 bigint, - - CONSTRAINT fk_t_658_11 FOREIGN KEY (ref_11) REFERENCES t_658_11(id), - CONSTRAINT fk_t_658_21 FOREIGN KEY (ref_21) REFERENCES t_658_21(id), - CONSTRAINT fk_t_658_31 FOREIGN KEY (ref_31) REFERENCES t_658_31(id), - CONSTRAINT fk_t_658_12 FOREIGN KEY (ref_12) REFERENCES t_658_12(id), - CONSTRAINT fk_t_658_22 FOREIGN KEY (ref_22) REFERENCES t_658_22(id), - CONSTRAINT fk_t_658_32 FOREIGN KEY (ref_32) REFERENCES t_658_32(id) -) -/ CREATE TABLE t_725_lob_test ( ID int NOT NULL, diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Dba.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Dba.java index 09d1721d4b..1ce6d18991 100644 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Dba.java +++ b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Dba.java @@ -9,7 +9,7 @@ package org.jooq.test.sybase.generatedclasses; @java.lang.SuppressWarnings("all") public class Dba extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = -885244230; + private static final long serialVersionUID = -427397434; /** * The singleton instance of DBA @@ -36,7 +36,7 @@ public class Dba extends org.jooq.impl.SchemaImpl { org.jooq.test.sybase.generatedclasses.tables.TDates.T_DATES, org.jooq.test.sybase.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.sybase.generatedclasses.tables.TTriggers.T_TRIGGERS, - org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF, + org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.sybase.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.sybase.generatedclasses.tables.T_785.T_785, org.jooq.test.sybase.generatedclasses.tables.TAuthor.T_AUTHOR, diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Keys.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Keys.java index 55abb5ebee..b3412e1db3 100644 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Keys.java +++ b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Keys.java @@ -22,6 +22,7 @@ public class Keys { public static final org.jooq.UniqueKey T_DATES__PK_T_DATES = UniqueKeys0.T_DATES__PK_T_DATES; public static final org.jooq.UniqueKey T_BOOLEANS__PK_T_BOOLEANS = UniqueKeys0.T_BOOLEANS__PK_T_BOOLEANS; public static final org.jooq.UniqueKey T_TRIGGERS__PK_T_TRIGGERS = UniqueKeys0.T_TRIGGERS__PK_T_TRIGGERS; + public static final org.jooq.UniqueKey T_LANGUAGE__PK_T_LANGUAGE = UniqueKeys0.T_LANGUAGE__PK_T_LANGUAGE; public static final org.jooq.UniqueKey T_725_LOB_TEST__PK_T_725_LOB_TEST = UniqueKeys0.T_725_LOB_TEST__PK_T_725_LOB_TEST; public static final org.jooq.UniqueKey T_AUTHOR__PK_T_AUTHOR = UniqueKeys0.T_AUTHOR__PK_T_AUTHOR; public static final org.jooq.UniqueKey T_BOOK__PK_T_BOOK = UniqueKeys0.T_BOOK__PK_T_BOOK; @@ -41,6 +42,7 @@ public class Keys { // FOREIGN KEY definitions public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_AUTHOR_ID; public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID; + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = ForeignKeys0.T_BOOK__FK_T_BOOK_LANGUAGE_ID; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME; public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = ForeignKeys0.T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID; public static final org.jooq.ForeignKey X_UNUSED__FK_X_UNUSED_SELF = ForeignKeys0.X_UNUSED__FK_X_UNUSED_SELF; @@ -68,6 +70,7 @@ public class Keys { public static final org.jooq.UniqueKey T_DATES__PK_T_DATES = createUniqueKey(org.jooq.test.sybase.generatedclasses.tables.TDates.T_DATES, org.jooq.test.sybase.generatedclasses.tables.TDates.T_DATES.ID); public static final org.jooq.UniqueKey T_BOOLEANS__PK_T_BOOLEANS = createUniqueKey(org.jooq.test.sybase.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.sybase.generatedclasses.tables.TBooleans.T_BOOLEANS.ID); public static final org.jooq.UniqueKey T_TRIGGERS__PK_T_TRIGGERS = createUniqueKey(org.jooq.test.sybase.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.sybase.generatedclasses.tables.TTriggers.T_TRIGGERS.ID_GENERATED); + public static final org.jooq.UniqueKey T_LANGUAGE__PK_T_LANGUAGE = createUniqueKey(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE, org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); public static final org.jooq.UniqueKey T_725_LOB_TEST__PK_T_725_LOB_TEST = createUniqueKey(org.jooq.test.sybase.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST, org.jooq.test.sybase.generatedclasses.tables.T_725LobTest.T_725_LOB_TEST.ID); public static final org.jooq.UniqueKey T_AUTHOR__PK_T_AUTHOR = createUniqueKey(org.jooq.test.sybase.generatedclasses.tables.TAuthor.T_AUTHOR, org.jooq.test.sybase.generatedclasses.tables.TAuthor.T_AUTHOR.ID); public static final org.jooq.UniqueKey T_BOOK__PK_T_BOOK = createUniqueKey(org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.ID); @@ -89,6 +92,7 @@ public class Keys { private static class ForeignKeys0 extends org.jooq.impl.AbstractKeys { public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_AUTHOR_ID = createForeignKey(org.jooq.test.sybase.generatedclasses.Keys.T_AUTHOR__PK_T_AUTHOR, org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.AUTHOR_ID); public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(org.jooq.test.sybase.generatedclasses.Keys.T_AUTHOR__PK_T_AUTHOR, org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.CO_AUTHOR_ID); + public static final org.jooq.ForeignKey T_BOOK__FK_T_BOOK_LANGUAGE_ID = createForeignKey(org.jooq.test.sybase.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE, org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = createForeignKey(org.jooq.test.sybase.generatedclasses.Keys.T_BOOK_STORE__UK_T_BOOK_STORE_NAME, org.jooq.test.sybase.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.sybase.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_STORE_NAME); public static final org.jooq.ForeignKey T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = createForeignKey(org.jooq.test.sybase.generatedclasses.Keys.T_BOOK__PK_T_BOOK, org.jooq.test.sybase.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.sybase.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE.BOOK_ID); public static final org.jooq.ForeignKey X_UNUSED__FK_X_UNUSED_SELF = createForeignKey(org.jooq.test.sybase.generatedclasses.Keys.X_UNUSED__PK_X_UNUSED, org.jooq.test.sybase.generatedclasses.tables.XUnused.X_UNUSED, org.jooq.test.sybase.generatedclasses.tables.XUnused.X_UNUSED.ID_REF, org.jooq.test.sybase.generatedclasses.tables.XUnused.X_UNUSED.NAME_REF); diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Tables.java index 0162832d8b..ce90de6182 100644 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/Tables.java @@ -37,9 +37,9 @@ public final class Tables { public static final org.jooq.test.sybase.generatedclasses.tables.TTriggers T_TRIGGERS = org.jooq.test.sybase.generatedclasses.tables.TTriggers.T_TRIGGERS; /** - * The table DBA.t_658_ref + * An entity holding language master data */ - public static final org.jooq.test.sybase.generatedclasses.tables.T_658Ref T_658_REF = org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF; + public static final org.jooq.test.sybase.generatedclasses.tables.TLanguage T_LANGUAGE = org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE; /** * The table DBA.t_725_lob_test diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/TLanguage.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/TLanguage.java deleted file mode 100644 index e678211160..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/TLanguage.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - * - * An entity holding language master data - */ -@java.lang.SuppressWarnings("all") -public enum TLanguage implements org.jooq.MasterDataType { - - /** - * English - */ - en(1, "en", "English"), - - /** - * Deutsch - */ - de(2, "de", "Deutsch"), - - /** - * Français - */ - fr(3, "fr", "Français"), - pt(4, "pt", null), - ; - - private final java.lang.Integer id; - private final java.lang.String cd; - private final java.lang.String description; - - private TLanguage(java.lang.Integer id, java.lang.String cd, java.lang.String description) { - this.id = id; - this.cd = cd; - this.description = description; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_language.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column DBA.t_language.cd - */ - public final java.lang.String getCd() { - return cd; - } - - /** - * The table column DBA.t_language.description - */ - public final java.lang.String getDescription() { - return description; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_11.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_11.java deleted file mode 100644 index 561ea69655..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_11.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_11 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A"), - - /** - * B - */ - B("B"), - - /** - * C - */ - C("C"), - ; - - private final java.lang.String id; - - private T_658_11(java.lang.String id) { - this.id = id; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_11.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_12.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_12.java deleted file mode 100644 index 8614a43d8d..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_12.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_12 implements org.jooq.MasterDataType { - - /** - * A - */ - A("A", "A"), - - /** - * B - */ - B("B", "B"), - - /** - * C - */ - C("C", "C"), - ; - - private final java.lang.String id; - private final java.lang.String cd; - - private T_658_12(java.lang.String id, java.lang.String cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.String getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_12.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.String getId() { - return id; - } - - /** - * The table column DBA.t_658_12.cd - */ - public final java.lang.String getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_21.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_21.java deleted file mode 100644 index 73516948e2..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_21.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_21 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1), - - /** - * 2 - */ - _2(2), - - /** - * 3 - */ - _3(3), - ; - - private final java.lang.Integer id; - - private T_658_21(java.lang.Integer id) { - this.id = id; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_21.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_22.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_22.java deleted file mode 100644 index 9c2052b218..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_22.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_22 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1, 1), - - /** - * 2 - */ - _2(2, 2), - - /** - * 3 - */ - _3(3, 3), - ; - - private final java.lang.Integer id; - private final java.lang.Integer cd; - - private T_658_22(java.lang.Integer id, java.lang.Integer cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Integer getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_22.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Integer getId() { - return id; - } - - /** - * The table column DBA.t_658_22.cd - */ - public final java.lang.Integer getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_31.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_31.java deleted file mode 100644 index bff538b431..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_31.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_31 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L), - - /** - * 2 - */ - _2(2L), - - /** - * 3 - */ - _3(3L), - ; - - private final java.lang.Long id; - - private T_658_31(java.lang.Long id) { - this.id = id; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_31.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_32.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_32.java deleted file mode 100644 index fbf7d99bec..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/enums/T_658_32.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.enums; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public enum T_658_32 implements org.jooq.MasterDataType { - - /** - * 1 - */ - _1(1L, 1L), - - /** - * 2 - */ - _2(2L, 2L), - - /** - * 3 - */ - _3(3L, 3L), - ; - - private final java.lang.Long id; - private final java.lang.Long cd; - - private T_658_32(java.lang.Long id, java.lang.Long cd) { - this.id = id; - this.cd = cd; - } - - @Override - public java.lang.Long getPrimaryKey() { - return id; - } - - /** - * The table column DBA.t_658_32.id - *

- * This column is part of the table's PRIMARY KEY - */ - public final java.lang.Long getId() { - return id; - } - - /** - * The table column DBA.t_658_32.cd - */ - public final java.lang.Long getCd() { - return cd; - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/TBook.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/TBook.java index 830e2f56c7..a2f7b5ca9f 100644 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/TBook.java +++ b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/TBook.java @@ -11,7 +11,7 @@ package org.jooq.test.sybase.generatedclasses.tables; @java.lang.SuppressWarnings("all") public class TBook extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -5430233; + private static final long serialVersionUID = -1502877862; /** * The singleton instance of DBA.t_book @@ -79,7 +79,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sybase.generatedclasses.enums.TLanguage.class), this); + public final org.jooq.TableField LANGUAGE_ID = createField("LANGUAGE_ID", org.jooq.impl.SQLDataType.INTEGER, this); /** * The table column DBA.t_book.CONTENT_TEXT @@ -113,7 +113,7 @@ public class TBook extends org.jooq.impl.UpdatableTableImpl> getReferences() { - return java.util.Arrays.>asList(org.jooq.test.sybase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.sybase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID); + return java.util.Arrays.>asList(org.jooq.test.sybase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_AUTHOR_ID, org.jooq.test.sybase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_CO_AUTHOR_ID, org.jooq.test.sybase.generatedclasses.Keys.T_BOOK__FK_T_BOOK_LANGUAGE_ID); } @Override diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/TLanguage.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/TLanguage.java new file mode 100644 index 0000000000..ffd6178794 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/TLanguage.java @@ -0,0 +1,74 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.sybase.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguage extends org.jooq.impl.UpdatableTableImpl { + + private static final long serialVersionUID = 1592634742; + + /** + * The singleton instance of DBA.t_language + */ + public static final org.jooq.test.sybase.generatedclasses.tables.TLanguage T_LANGUAGE = new org.jooq.test.sybase.generatedclasses.tables.TLanguage(); + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord.class; + } + + /** + * The table column DBA.t_language.cd + */ + public final org.jooq.TableField CD = createField("cd", org.jooq.impl.SQLDataType.CHAR, this); + + /** + * The table column DBA.t_language.description + */ + public final org.jooq.TableField DESCRIPTION = createField("description", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column DBA.t_language.description_english + */ + public final org.jooq.TableField DESCRIPTION_ENGLISH = createField("description_english", org.jooq.impl.SQLDataType.VARCHAR, this); + + /** + * The table column DBA.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public final org.jooq.TableField ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, this); + + public TLanguage() { + super("t_language", org.jooq.test.sybase.generatedclasses.Dba.DBA); + } + + public TLanguage(java.lang.String alias) { + super(alias, org.jooq.test.sybase.generatedclasses.Dba.DBA, org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE); + } + + @Override + public org.jooq.UniqueKey getMainKey() { + return org.jooq.test.sybase.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE; + } + + @Override + @SuppressWarnings("unchecked") + public java.util.List> getKeys() { + return java.util.Arrays.>asList(org.jooq.test.sybase.generatedclasses.Keys.T_LANGUAGE__PK_T_LANGUAGE); + } + + @Override + public org.jooq.test.sybase.generatedclasses.tables.TLanguage as(java.lang.String alias) { + return new org.jooq.test.sybase.generatedclasses.tables.TLanguage(alias); + } +} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/T_658Ref.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/T_658Ref.java deleted file mode 100644 index 2317f03f03..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/T_658Ref.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.tables; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658Ref extends org.jooq.impl.TableImpl { - - private static final long serialVersionUID = 23249546; - - /** - * The singleton instance of DBA.t_658_ref - */ - public static final org.jooq.test.sybase.generatedclasses.tables.T_658Ref T_658_REF = new org.jooq.test.sybase.generatedclasses.tables.T_658Ref(); - - /** - * The class holding records for this type - */ - @Override - public java.lang.Class getRecordType() { - return org.jooq.test.sybase.generatedclasses.tables.records.T_658RefRecord.class; - } - - /** - * The table column DBA.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES DBA.t_658_11 (id)
-	 * 
- */ - public final org.jooq.TableField REF_11 = createField("ref_11", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.sybase.generatedclasses.enums.T_658_11.class), this); - - /** - * The table column DBA.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES DBA.t_658_21 (id)
-	 * 
- */ - public final org.jooq.TableField REF_21 = createField("ref_21", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sybase.generatedclasses.enums.T_658_21.class), this); - - /** - * The table column DBA.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES DBA.t_658_31 (id)
-	 * 
- */ - public final org.jooq.TableField REF_31 = createField("ref_31", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.sybase.generatedclasses.enums.T_658_31.class), this); - - /** - * The table column DBA.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES DBA.t_658_12 (id)
-	 * 
- */ - public final org.jooq.TableField REF_12 = createField("ref_12", org.jooq.impl.SQLDataType.CHAR.asMasterDataType(org.jooq.test.sybase.generatedclasses.enums.T_658_12.class), this); - - /** - * The table column DBA.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES DBA.t_658_22 (id)
-	 * 
- */ - public final org.jooq.TableField REF_22 = createField("ref_22", org.jooq.impl.SQLDataType.INTEGER.asMasterDataType(org.jooq.test.sybase.generatedclasses.enums.T_658_22.class), this); - - /** - * The table column DBA.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES DBA.t_658_32 (id)
-	 * 
- */ - public final org.jooq.TableField REF_32 = createField("ref_32", org.jooq.impl.SQLDataType.BIGINT.asMasterDataType(org.jooq.test.sybase.generatedclasses.enums.T_658_32.class), this); - - public T_658Ref() { - super("t_658_ref", org.jooq.test.sybase.generatedclasses.Dba.DBA); - } - - public T_658Ref(java.lang.String alias) { - super(alias, org.jooq.test.sybase.generatedclasses.Dba.DBA, org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF); - } - - @Override - @SuppressWarnings("unchecked") - public java.util.List> getReferences() { - return java.util.Arrays.>asList(); - } - - @Override - public org.jooq.test.sybase.generatedclasses.tables.T_658Ref as(java.lang.String alias) { - return new org.jooq.test.sybase.generatedclasses.tables.T_658Ref(alias); - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TBookRecord.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TBookRecord.java index e8e72bbe14..cee2bcc7c2 100644 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TBookRecord.java +++ b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TBookRecord.java @@ -11,7 +11,7 @@ package org.jooq.test.sybase.generatedclasses.tables.records; @java.lang.SuppressWarnings("all") public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 1418043787; + private static final long serialVersionUID = -107498314; /** * The table column DBA.t_book.ID @@ -204,7 +204,7 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(org.jooq.test.sybase.generatedclasses.enums.TLanguage value) { + public void setLanguageId(java.lang.Integer value) { setValue(org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value); } @@ -217,10 +217,39 @@ public class TBookRecord extends org.jooq.impl.UpdatableRecordImpl */ - public org.jooq.test.sybase.generatedclasses.enums.TLanguage getLanguageId() { + public java.lang.Integer getLanguageId() { return getValue(org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID); } + /** + * Link this record to a given {@link org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord + * TLanguageRecord} + */ + public void setLanguageId(org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord value) { + if (value == null) { + setValue(org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, null); + } + else { + setValue(org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID, value.getValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.ID)); + } + } + + /** + * The table column DBA.t_book.LANGUAGE_ID + *

+ * This column is part of a FOREIGN KEY:

+	 * CONSTRAINT t_book__fk_t_book_language_id
+	 * FOREIGN KEY (LANGUAGE_ID)
+	 * REFERENCES DBA.t_language (id)
+	 * 
+ */ + public org.jooq.test.sybase.generatedclasses.tables.records.TLanguageRecord fetchTLanguage() { + return create() + .selectFrom(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE) + .where(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.ID.equal(getValue(org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID))) + .fetchOne(); + } + /** * The table column DBA.t_book.CONTENT_TEXT */ diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TLanguageRecord.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TLanguageRecord.java new file mode 100644 index 0000000000..bcd1808829 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/TLanguageRecord.java @@ -0,0 +1,94 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.sybase.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + * + * An entity holding language master data + */ +@java.lang.SuppressWarnings("all") +public class TLanguageRecord extends org.jooq.impl.UpdatableRecordImpl { + + private static final long serialVersionUID = 686129071; + + /** + * The table column DBA.t_language.cd + */ + public void setCd(java.lang.String value) { + setValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.CD, value); + } + + /** + * The table column DBA.t_language.cd + */ + public java.lang.String getCd() { + return getValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.CD); + } + + /** + * The table column DBA.t_language.description + */ + public void setDescription(java.lang.String value) { + setValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION, value); + } + + /** + * The table column DBA.t_language.description + */ + public java.lang.String getDescription() { + return getValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION); + } + + /** + * The table column DBA.t_language.description_english + */ + public void setDescriptionEnglish(java.lang.String value) { + setValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH, value); + } + + /** + * The table column DBA.t_language.description_english + */ + public java.lang.String getDescriptionEnglish() { + return getValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.DESCRIPTION_ENGLISH); + } + + /** + * The table column DBA.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public void setId(java.lang.Integer value) { + setValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.ID, value); + } + + /** + * The table column DBA.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.lang.Integer getId() { + return getValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.ID); + } + + /** + * The table column DBA.t_language.id + *

+ * This column is part of the table's PRIMARY KEY + */ + public java.util.List fetchTBookList() { + return create() + .selectFrom(org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK) + .where(org.jooq.test.sybase.generatedclasses.tables.TBook.T_BOOK.LANGUAGE_ID.equal(getValue(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE.ID))) + .fetch(); + } + + /** + * Create a detached TLanguageRecord + */ + public TLanguageRecord() { + super(org.jooq.test.sybase.generatedclasses.tables.TLanguage.T_LANGUAGE); + } +} diff --git a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/T_658RefRecord.java b/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/T_658RefRecord.java deleted file mode 100644 index 4a409ea3f7..0000000000 --- a/jOOQ-test/src/org/jooq/test/sybase/generatedclasses/tables/records/T_658RefRecord.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This class is generated by jOOQ - */ -package org.jooq.test.sybase.generatedclasses.tables.records; - -/** - * This class is generated by jOOQ. - */ -@java.lang.SuppressWarnings("all") -public class T_658RefRecord extends org.jooq.impl.TableRecordImpl { - - private static final long serialVersionUID = -417413039; - - /** - * The table column DBA.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES DBA.t_658_11 (id)
-	 * 
- */ - public void setRef_11(org.jooq.test.sybase.generatedclasses.enums.T_658_11 value) { - setValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_11, value); - } - - /** - * The table column DBA.t_658_ref.ref_11 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_11
-	 * FOREIGN KEY (ref_11)
-	 * REFERENCES DBA.t_658_11 (id)
-	 * 
- */ - public org.jooq.test.sybase.generatedclasses.enums.T_658_11 getRef_11() { - return getValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_11); - } - - /** - * The table column DBA.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES DBA.t_658_21 (id)
-	 * 
- */ - public void setRef_21(org.jooq.test.sybase.generatedclasses.enums.T_658_21 value) { - setValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_21, value); - } - - /** - * The table column DBA.t_658_ref.ref_21 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_21
-	 * FOREIGN KEY (ref_21)
-	 * REFERENCES DBA.t_658_21 (id)
-	 * 
- */ - public org.jooq.test.sybase.generatedclasses.enums.T_658_21 getRef_21() { - return getValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_21); - } - - /** - * The table column DBA.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES DBA.t_658_31 (id)
-	 * 
- */ - public void setRef_31(org.jooq.test.sybase.generatedclasses.enums.T_658_31 value) { - setValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_31, value); - } - - /** - * The table column DBA.t_658_ref.ref_31 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_31
-	 * FOREIGN KEY (ref_31)
-	 * REFERENCES DBA.t_658_31 (id)
-	 * 
- */ - public org.jooq.test.sybase.generatedclasses.enums.T_658_31 getRef_31() { - return getValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_31); - } - - /** - * The table column DBA.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES DBA.t_658_12 (id)
-	 * 
- */ - public void setRef_12(org.jooq.test.sybase.generatedclasses.enums.T_658_12 value) { - setValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_12, value); - } - - /** - * The table column DBA.t_658_ref.ref_12 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_12
-	 * FOREIGN KEY (ref_12)
-	 * REFERENCES DBA.t_658_12 (id)
-	 * 
- */ - public org.jooq.test.sybase.generatedclasses.enums.T_658_12 getRef_12() { - return getValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_12); - } - - /** - * The table column DBA.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES DBA.t_658_22 (id)
-	 * 
- */ - public void setRef_22(org.jooq.test.sybase.generatedclasses.enums.T_658_22 value) { - setValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_22, value); - } - - /** - * The table column DBA.t_658_ref.ref_22 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_22
-	 * FOREIGN KEY (ref_22)
-	 * REFERENCES DBA.t_658_22 (id)
-	 * 
- */ - public org.jooq.test.sybase.generatedclasses.enums.T_658_22 getRef_22() { - return getValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_22); - } - - /** - * The table column DBA.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES DBA.t_658_32 (id)
-	 * 
- */ - public void setRef_32(org.jooq.test.sybase.generatedclasses.enums.T_658_32 value) { - setValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_32, value); - } - - /** - * The table column DBA.t_658_ref.ref_32 - *

- * This column is part of a FOREIGN KEY:

-	 * CONSTRAINT t_658_ref__fk_t_658_32
-	 * FOREIGN KEY (ref_32)
-	 * REFERENCES DBA.t_658_32 (id)
-	 * 
- */ - public org.jooq.test.sybase.generatedclasses.enums.T_658_32 getRef_32() { - return getValue(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF.REF_32); - } - - /** - * Create a detached T_658RefRecord - */ - public T_658RefRecord() { - super(org.jooq.test.sybase.generatedclasses.tables.T_658Ref.T_658_REF); - } -} diff --git a/jOOQ-test/src/org/jooq/test/sybase/reset.sql b/jOOQ-test/src/org/jooq/test/sybase/reset.sql index 195f85d8aa..db7d1740dc 100644 --- a/jOOQ-test/src/org/jooq/test/sybase/reset.sql +++ b/jOOQ-test/src/org/jooq/test/sybase/reset.sql @@ -1,11 +1,4 @@ DELETE FROM t_639_numbers_table/ -DELETE FROM t_658_ref/ -DELETE FROM t_658_11/ -DELETE FROM t_658_21/ -DELETE FROM t_658_31/ -DELETE FROM t_658_12/ -DELETE FROM t_658_22/ -DELETE FROM t_658_32/ DELETE FROM t_book_to_book_store/ DELETE FROM t_book_store/ DELETE FROM t_book/ @@ -26,13 +19,6 @@ INSERT INTO t_language (id, cd, description, description_english) VALUES (3, 'fr INSERT INTO t_language (id, cd, description, description_english) VALUES (4, 'pt', null, null)/ / -INSERT INTO t_658_11 VALUES ('A'), ('B'), ('C')/ -INSERT INTO t_658_21 VALUES (1), (2), (3)/ -INSERT INTO t_658_31 VALUES (1), (2), (3)/ -INSERT INTO t_658_12 VALUES ('A', 'A'), ('B', 'B'), ('C', 'C')/ -INSERT INTO t_658_22 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_32 VALUES (1, 1), (2, 2), (3, 3)/ -INSERT INTO t_658_ref VALUES ('A', 1, 1, 'B', 2, 2)/ INSERT INTO t_author VALUES (s_author_id.nextval, 'George', 'Orwell', '1903-06-25', 1903, null); / diff --git a/jOOQ-website/src/main/resources/manual-3.0.xml b/jOOQ-website/src/main/resources/manual-3.0.xml new file mode 100644 index 0000000000..8f5ee09d4b --- /dev/null +++ b/jOOQ-website/src/main/resources/manual-3.0.xml @@ -0,0 +1,9079 @@ + + + +
+ The jOOQ User Manual. Multiple Pages + +

# Overview

+

This manual is divided into six main sections:

+ +
    +
  • + +

    + This section will get you started with jOOQ quickly. It contains + simple explanations about what jOOQ is, what jOOQ isn't and how + to set it up for the first time +

    +
  • +
  • + +

    + This section explains all about the jOOQ syntax used for building + queries. It explains the central factories, the supported SQL + statements and various other syntax elements +

    +
  • +
  • + +

    + This section explains how to configure and use the built-in source code + generator +

    +
  • +
  • + +

    + This section will get you through the specifics of what can be done + with jOOQ at runtime, in order to execute queries, perform CRUD + operations, import and export data, and hook into the jOOQ execution + lifecycle for debugging +

    +
  • +
  • + +

    + This section is dedicated to tools that ship with jOOQ, such as the + jOOQ console +

    +
  • +
  • + +

    + This section is a reference for elements in this manual +

    +
  • +
+
+ + +
+ Preface + +

jOOQ's reason of being - compared to JPA

+

+ Java and SQL have come a long way. SQL is an "ancient", yet established and well-understood technology. Java is a legacy too, although its platform JVM allows for many new and contemporary languages built on top of it. Yet, after all these years, libraries dealing with the interface between SQL and Java have come and gone, leaving JPA to be a standard that is accepted only with doubts, short of any surviving options. +

+

+ So far, there had been only few database abstraction frameworks or libraries, that truly respected SQL as a first class citizen among languages. Most frameworks, including the industry standards JPA, EJB, Hibernate, JDO, Criteria Query, and many others try to hide SQL itself, minimising its scope to things called JPQL, HQL, JDOQL and various other inferior query languages +

+

+ jOOQ has come to fill this gap. +

+ +

jOOQ's reason of being - compared to LINQ

+

+ Other platforms incorporate ideas such as LINQ (with LINQ-to-SQL), or Scala's SLICK, or also Java's QueryDSL to better integrate querying as a concept into their respective language. By querying, they understand querying of arbitrary targets, such as SQL, XML, Collections and other heterogeneous data stores. jOOQ claims that this is going the wrong way too. +

+

+ In more advanced querying use-cases (more than simple CRUD and the occasional JOIN), people will want to profit from the expressivity of SQL. Due to the relational nature of SQL, this is quite different from what object-oriented and partially functional languages such as C#, Scala, or Java can offer. +

+

+ It is very hard to formally express and validate joins and the ad-hoc table expression types they create. It gets even harder when you want support for more advanced table expressions, such as pivot tables, unnested cursors, or just arbitrary projections from derived tables. With a very strong object-oriented typing model, these features will probably stay out of scope. +

+

+ In essence, the decision of creating an API that looks like SQL or one that looks like C#, Scala, Java is a definite decision in favour of one or the other platform. While it will be easier to evolve SLICK in similar ways as LINQ (or QueryDSL in the Java world), SQL feature scope that clearly communicates its underlying intent will be very hard to add, later on (e.g. how would you model Oracle's partitioned outer join syntax? How would you model ANSI/ISO SQL:1999 grouping sets? How can you support scalar subquery caching? etc...). +

+

+ jOOQ has come to fill this gap. +

+ +

jOOQ is different

+

+ SQL was never meant to be abstracted. To be confined in the narrow boundaries of heavy mappers, hiding the beauty and simplicity of relational data. SQL was never meant to be object-oriented. SQL was never meant to be anything other than... SQL! +

+
+
+ + + +
+ Getting started with jOOQ + +

+ These chapters contain a quick overview of how to get started with this manual and with jOOQ. While the subsequent chapters contain a lot of reference information, this chapter here just wraps up the essentials. +

+
+ + +
+ How to read this manual + +

+ This section helps you correctly interpret this manual in the context of jOOQ. +

+ +

Code blocks

+

+ The following are code blocks: +

+ + + + + + +]]> + + + +

+ These are useful to provide examples in code. Often, with jOOQ, it is even more useful to compare SQL code with its corresponding Java/jOOQ code. When this is done, the blocks are aligned side-by-side, with SQL usually being on the left, and Java usually being on the right: +

+ + + + + + +

Code block contents

+

+ The contents of code blocks follow conventions, too. If nothing else is mentioned next to any given code block, then the following can be assumed: +

+ + + + + + +

Settings

+

+ jOOQ allows to override runtime behaviour using . If nothing is specified, the default runtime settings are assumed. +

+ +

Sample database

+

+ See the manual's section about to learn more about the sample database. +

+
+
+ +
+ The sample database used in this manual + +

+ For the examples in this manual, the same database will always be referred to. It essentially consists of these entities created using the Oracle dialect +

+CREATE TABLE language ( + id NUMBER(7) NOT NULL PRIMARY KEY, + cd CHAR(2) NOT NULL, + description VARCHAR2(50) +) + +CREATE TABLE author ( + id NUMBER(7) NOT NULL PRIMARY KEY, + first_name VARCHAR2(50), + last_name VARCHAR2(50) NOT NULL, + date_of_birth DATE, + year_of_birth NUMBER(7) +) + +CREATE TABLE book ( + id NUMBER(7) NOT NULL PRIMARY KEY, + author_id NUMBER(7) NOT NULL, + title VARCHAR2(400) NOT NULL, + published_in NUMBER(7) NOT NULL, + language_id NUMBER(7) NOT NULL, + FOREIGN KEY (AUTHOR_ID) REFERENCES author(ID), + FOREIGN KEY (LANGUAGE_ID) REFERENCES language(ID) +) + +CREATE TABLE book_store ( + name VARCHAR2(400) NOT NULL UNIQUE +) + +CREATE TABLE book_to_book_store ( + book_store_name VARCHAR2(400) NOT NULL, + book_id INTEGER NOT NULL, + stock INTEGER, + PRIMARY KEY(book_store_name, book_id), + CONSTRAINT b2bs_book_store_id + FOREIGN KEY (book_store_name) + REFERENCES book_store (name) + ON DELETE CASCADE, + CONSTRAINT b2bs_book_id + FOREIGN KEY (book_id) + REFERENCES book (id) + ON DELETE CASCADE +) +

+ More entities, types (e.g. UDT's, ARRAY types, ENUM types, etc), stored procedures and packages are introduced for specific examples +

+
+
+ +
+ Different use cases for jOOQ + +

+ jOOQ has originally been created as a library for complete abstraction of JDBC and all database interaction. Various best practices that are frequently encountered in pre-existing software products are applied to this library. This includes: +

+
    +
  • Typesafe database object referencing through generated schema, table, column, record, procedure, type, dao, pojo artefacts (see the chapter about )
  • +
  • Typesafe SQL construction through a complete API modelling SQL as a domain specific language in Java (see the chapter about )
  • +
  • Convenient query execution through an improved API for result fetching (see the chapters about )
  • +
  • SQL dialect abstraction and SQL clause simulation to improve cross-database compatibility and to enable missing features in simpler databases (see the chapter about )
  • +
  • SQL logging and debugging using jOOQ as an integral part of your development process (see the chapters about and about the )
  • +
+

+ Effectively, jOOQ was originally designed to replace any other database abstraction framework short of the ones handling connection pooling and transaction management (see also the ) +

+ +

Use jOOQ the way you prefer

+

+ ... but open source is community-driven. And the community has shown various ways of using jOOQ that diverge from its original intent. Some use cases encountered are: +

+
    +
  • Using Hibernate for 70% of the queries (i.e. ) and jOOQ for the remaining 30% where SQL is really needed
  • +
  • Using jOOQ for SQL building and JDBC for SQL execution
  • +
  • Using jOOQ for SQL building and Spring Data for SQL execution
  • +
  • Using jOOQ without the to build the basis of a framework for dynamic SQL execution.
  • +
+ +

+ The following sections explain about various use cases for using jOOQ in your application. +

+
+ + +
+ jOOQ as a SQL builder + +

+ This is the most simple of all use cases, allowing for construction of valid SQL for any database. In this use case, you will not use and probably not even . Instead, you'll use jOOQ to wrap strings, literals and other user-defined objects into an object-oriented, type-safe AST modelling your SQL statements. An example is given here: +

+ + + +

+ The SQL string that you can generate as such can then be executed using JDBC directly, using Spring's JdbcTemplate, using Apache DbUtils and many other tools. +

+

+ If you wish to use jOOQ only as a SQL builder, the following sections of the manual will be of interest to you: +

+
    +
  • : This section contains a lot of information about creating SQL statements using the jOOQ API
  • +
  • : This section contains information useful in particular to those that want to supply , , etc. as plain SQL to jOOQ, rather than through generated artefacts
  • +
+
+
+ +
+ jOOQ as a SQL builder with code generation + +

+ In addition to using jOOQ as a , you can also use jOOQ's code generation features in order to compile your SQL statements using a Java compiler against an actual database schema. This adds a lot of power and expressiveness to just simply constructing SQL using custom strings and literals, as you can be sure that all database artefacts actually exist in the database, and that their type is correct. An example is given here: +

+ + + +

+ The SQL string that you can generate as such can then be executed using JDBC directly, using Spring's JdbcTemplate, using Apache DbUtils and many other tools. +

+

+ If you wish to use jOOQ only as a SQL builder with code generation, the following sections of the manual will be of interest to you: +

+
    +
  • : This section contains a lot of information about creating SQL statements using the jOOQ API
  • +
  • : This section contains the necessary information to run jOOQ's code generator against your developer database
  • +
+
+
+ +
+ jOOQ as a SQL executor + +

+ Instead of any tool mentioned in the previous chapters, you can also use jOOQ directly to execute your jOOQ-generated SQL statements. This will add a lot of convenience on top of the previously discussed API for typesafe SQL construction, when you can re-use the information from generated classes to fetch records and custom data types. An example is given here: +

+ + result = create.select(BOOK.TITLE, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) + .from(BOOK) + .join(AUTHOR) + .on(BOOK.AUTHOR_ID.equal(AUTHOR.ID)) + .where(BOOK.PUBLISHED_IN.equal(1948)) + .fetch();]]> + +

+ jOOQ doesn't stop here, though! You can execute any SQL with jOOQ. In other words, you can use any other SQL building tool and run the SQL statements with jOOQ. An example is given here: +

+ + result = create.fetch(sql); + +// Or execute that SQL with JDBC, fetching the ResultSet with jOOQ: +ResultSet rs = connection.createStatement().executeQuery(sql); +Result result = create.fetch(rs);]]> + +

+ If you wish to use jOOQ as a SQL executor with (or without) code generation, the following sections of the manual will be of interest to you: +

+
    +
  • : This section contains a lot of information about creating SQL statements using the jOOQ API
  • +
  • : This section contains the necessary information to run jOOQ's code generator against your developer database
  • +
  • : This section contains a lot of information about executing SQL statements using the jOOQ API
  • +
  • : This section contains some useful information about the various ways of fetching data with jOOQ
  • +
+
+
+ +
+ jOOQ for CRUD + +

+ This is probably the most complete use-case for jOOQ: Use all of jOOQ's features. Apart from jOOQ's fluent API for query construction, jOOQ can also help you execute everyday CRUD operations. An example is given here: +

+ + 5) { + + // Congratulate the author by email: + if (author.getMailSent()) { + sendCongratulationMail(author); + + // Don't send the mail twice, so store that flag in the database + author.setMailSent(true); + author.store(); + } + } +}]]> + +

+ If you wish to use all of jOOQ's features, the following sections of the manual will be of interest to you (including all sub-sections): +

+
    +
  • : This section contains a lot of information about creating SQL statements using the jOOQ API
  • +
  • : This section contains the necessary information to run jOOQ's code generator against your developer database
  • +
  • : This section contains a lot of information about executing SQL statements using the jOOQ API
  • +
+
+
+ +
+ jOOQ for PROs + +

+ jOOQ isn't just a library that helps you and SQL against your . jOOQ ships with a lot of tools. Here are some of the most important tools shipped with jOOQ: +

+
    +
  • : This small application hooks into jOOQ's execute listener support to allow for tracing, debugging and introspecting any SQL statement executed through the jOOQ API. This includes setting breakpoints, introspecting bind values, running probe SQL statements, ad-hoc patching of SQL, measuring execution times, exporting stack traces. Use this tool to better know your SQL!
  • +
  • : jOOQ allows you to hook your custom execute listeners into jOOQ's SQL statement execution lifecycle in order to centrally coordinate any arbitrary operation performed on SQL being executed. Use this for logging, identity generation, SQL tracing, performance measurements, etc.
  • +
  • : jOOQ has a standard DEBUG logger built-in, for logging and tracing all your executed SQL statements and fetched result sets
  • +
  • : jOOQ supports stored procedures and functions of your favourite database. All routines and user-defined types are generated and can be included in jOOQ's SQL building API as function references.
  • +
  • and : jOOQ ships with an API to easily export/import data in various formats
  • +
+

+ If you're a power user of your favourite, feature-rich database, jOOQ will help you access all of your database's vendor-specific features, such as OLAP features, stored procedures, user-defined types, vendor-specific SQL, functions, etc. Examples are given throughout this manual. +

+
+
+
+
+ +
+ Tutorials + +

+ Don't have time to read the full manual? Here are a couple of tutorials that will get you into the most essential parts of jOOQ as quick as possible. +

+
+ + +
+ jOOQ in 7 easy steps + +

+ This manual section is intended for new users, to help them get a running application with jOOQ, quickly. +

+
+ + +
+ Step 1: Preparation + +

+ If you haven't already downloaded it, download jOOQ:
+ https://sourceforge.net/projects/jooq/files/Release/ +

+ +

+ Alternatively, you can create a Maven dependency: +

+ + org.jooq + + jooq + {jooq-version} +]]> + +

+ For this example, we'll be using MySQL. If you haven't already downloaded MySQL Connector/J, download it here:
+ http://dev.mysql.com/downloads/connector/j/ +

+ +

+ If you don't have a MySQL instance up and running yet, get XAMPP now! XAMPP is a simple installation bundle for Apache, MySQL, PHP and Perl +

+
+
+ +
+ Step 2: Your database + +

+ We're going to create a database called "guestbook" and a corresponding "posts" table. Connect to MySQL via your command line client and type the following: +

+ +CREATE DATABASE guestbook; + +CREATE TABLE `posts` ( + `id` bigint(20) NOT NULL, + `body` varchar(255) DEFAULT NULL, + `timestamp` datetime DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +); + +
+
+ +
+ Step 3: Code generation + +

+ In this step, we're going to use jOOQ's command line tools to generate classes that map to the Posts table we just created. More detailed information about how to set up the jOOQ code generator can be found here:
+ +

+ +

+ The easiest way to generate a schema is to copy the jOOQ jar files (there should be 3) and the MySQL Connector jar file to a temporary directory. Then, create a guestbook.xml that looks like this: +

+ + + + + + com.mysql.jdbc.Driver + jdbc:mysql://localhost:3306/guestbook + root + + + + + + org.jooq.util.DefaultGenerator + + + + org.jooq.util.mysql.MySQLDatabase + + + guestbook + + + .* + + + + + + + + test.generated + + + C:/workspace/MySQLTest/src + + +]]> +

+ Replace the username with whatever user has the appropriate privileges to query the database meta data. You'll also want to look at the other values and replace as necessary. Here are the two interesting properties: +

+

+ generator.target.package - set this to the parent package you want to create for the generated classes. The setting of test.generated will cause the test.generated.Posts and test.generated.PostsRecord to be created +

+

+ generator.target.directory - the directory to output to. +

+ +

+ Once you have the JAR files and guestbook.xml in your temp directory, type this (use colons instead of semi-colons on UNIX/Linux systems): +

+ +java -classpath jooq-{jooq-version}.jar;jooq-meta-{jooq-version}.jar;jooq-codegen-{jooq-version}.jar;mysql-connector-java-5.1.18-bin.jar;. + org.jooq.util.GenerationTool /guestbook.xml + + +

+ Note the prefix slash before guestbook.xml. Even though it's in our working directory, we need to prepend a slash, as the configuration file is loaded from the classpath. Replace the filenames with your filenames. In this example, jOOQ {jooq-version} is being used. If everything has worked, you should see this in your console output: +

+ +Nov 1, 2011 7:25:06 PM org.jooq.impl.JooqLogger info +INFO: Initialising properties : /guestbook.xml +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Database parameters +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: ---------------------------------------------------------- +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: dialect : MYSQL +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: schema : guestbook +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: target dir : /Users/jOOQ/Documents/workspace/MySQLTest/src +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: target package : test.generated +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: ---------------------------------------------------------- +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Emptying : /Users/jOOQ/workspace/MySQLTest/src/test/generated +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Generating classes in : /Users/jOOQ/workspace/MySQLTest/src/test/generated +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Generating schema : Guestbook.java +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Schema generated : Total: 122.18ms +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Sequences fetched : 0 (0 included, 0 excluded) +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Tables fetched : 5 (5 included, 0 excluded) +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Generating tables : /Users/jOOQ/workspace/MySQLTest/src/test/generated/tables +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: ARRAYs fetched : 0 (0 included, 0 excluded) +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Enums fetched : 0 (0 included, 0 excluded) +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: UDTs fetched : 0 (0 included, 0 excluded) +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Generating table : Posts.java +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Tables generated : Total: 680.464ms, +558.284ms +Nov 1, 2011 7:25:07 PM org.jooq.impl.JooqLogger info +INFO: Generating Keys : /Users/jOOQ/workspace/MySQLTest/src/test/generated/tables +Nov 1, 2011 7:25:08 PM org.jooq.impl.JooqLogger info +INFO: Keys generated : Total: 718.621ms, +38.157ms +Nov 1, 2011 7:25:08 PM org.jooq.impl.JooqLogger info +INFO: Generating records : /Users/jOOQ/workspace/MySQLTest/src/test/generated/tables/records +Nov 1, 2011 7:25:08 PM org.jooq.impl.JooqLogger info +INFO: Generating record : PostsRecord.java +Nov 1, 2011 7:25:08 PM org.jooq.impl.JooqLogger info +INFO: Table records generated : Total: 782.545ms, +63.924ms +Nov 1, 2011 7:25:08 PM org.jooq.impl.JooqLogger info +INFO: Routines fetched : 0 (0 included, 0 excluded) +Nov 1, 2011 7:25:08 PM org.jooq.impl.JooqLogger info +INFO: Packages fetched : 0 (0 included, 0 excluded) +Nov 1, 2011 7:25:08 PM org.jooq.impl.JooqLogger info +INFO: GENERATION FINISHED! : Total: 791.688ms, +9.143ms + + +
+
+ +
+ Step 4: Connect to your database + +

+ Let's just write a vanilla main class in the project containing the generated classes: +

+ + + +

+ This is pretty standard code for establishing a MySQL connection. +

+
+
+ +
+ Step 5: Querying + +

+ Let's add a simple query: +

+ + result = create.select().from(POSTS).fetch();]]> + +

+ First get an instance of Factory so we can write a simple SELECT query. We pass an instance of the MySQL connection to Factory. Note that the factory doesn't close the connection. We'll have to do that ourselves. +

+

+ We then use jOOQ's DSL to return an instance of Result. We'll be using this result in the next step. +

+
+
+ +
+ Step 6: Iterating + +

+ After the line where we retrieve the results, let's iterate over the results and print out the data: +

+ + + +

+ The full program should now look like this: +

+ + +
+
+ +
+ Step 7: Explore! + +

+ jOOQ has grown to be a comprehensive SQL library. For more information, please consider the manual:
+ http://www.jooq.org/manual/ +

+

+ ... explore the Javadoc:
+ http://www.jooq.org/javadoc/latest/ +

+

+ ... or join the news group:
+ https://groups.google.com/forum/#!forum/jooq-user +

+

+ This tutorial is the courtesy of Ikai Lan. See the original source here:
+ http://ikaisays.com/2011/11/01/getting-started-with-jooq-a-tutorial/ +

+
+
+
+
+ +
+ Using jOOQ in modern IDEs + +

Feel free to contribute a tutorial!

+
+
+ +
+ Using jOOQ with Spring + +

Feel free to contribute a tutorial!

+
+
+ +
+ A simple web application with jOOQ + +

Feel free to contribute a tutorial!

+
+
+
+
+ +
+ jOOQ and Scala + +

+ As any other library, jOOQ can be easily used in Scala, taking advantage of the many Scala language features such as for example: +

+
    +
  • Optional "." to dereference methods from expressions
  • +
  • Optional "(" and ")" to delimit method argument lists
  • +
  • Optioanl ";" at the end of a Scala statement
  • +
  • Type inference using "var" and "val" keywords
  • +
+ +

+ But jOOQ also leverages other useful Scala features, such as +

+
    +
  • implicit defs for operator overloading
  • +
  • Scala Macros (soon to come)
  • +
+ +

+ A short example jOOQ application in Scala might look like this: +

+ + 2) // Using the olerloaded "<>" operator + or (T_BOOK.TITLE in ("O Alquimista", "Brida")) // Neat IN predicate expression + fetch // + ) { // + println(r) // + } // + } // +}]]> + +

+ For more details about jOOQ's Scala integration, please refer to the manual's section about . +

+
+
+ +
+ Dependencies + +

+ jOOQ has no dependencies on any third-party libraries. This rule has some exceptions: +

+
    +
  • are referenced as "optional dependencies". jOOQ tries to find slf4j or log4j on the classpath. If it fails, it will use the
  • +
  • Oracle ojdbc types used for array creation are loaded using reflection.
  • +
  • Small libraries with compatible licenses are incorporated into jOOQ (jOOR, jOOU, OpenCSV, json simple, commons-lang)
  • +
  • javax.persistence and javax.validation will be needed if you activate the relevant
  • +
+ +

Build your own

+

+ In order to build jOOQ, please download the sources from https://github.com/jOOQ/jOOQ and use Maven to build it, preferably in Eclipse. +

+
+
+
+
+ +
+ SQL building + +

+ SQL is a declarative language that is hard to integrate into procedural, object-oriented, functional or any other type of programming languages. jOOQ's philosophy is to give SQL the credit it deserves and integrate SQL itself as an "internal domain specific language" directly into Java. +

+

+ With this philosophy in mind, SQL building is the main feature of jOOQ. All other features (such as and ) are mere convenience built on top of jOOQ's SQL building capabilities. +

+

+ This section explains all about the various syntax elements involved with jOOQ's SQL building capabilities. For a complete overview of all syntax elements, please refer to the manual's section about +

+
+ + +
+ The Factory class + +

+ jOOQ exposes a lot of interfaces and hides most implementation facts from client code. The reasons for this are: +

+
    +
  • Interface-driven design. This allows for modelling queries in a fluent API most efficiently
  • +
  • Reduction of complexity for client code.
  • +
  • API guarantee. You only depend on the exposed interfaces, not concrete (potentially dialect-specific) implementations.
  • +
+

+ The class is the main class from where you will create all jOOQ objects. The Factory serves two types of purposes: +

+
    +
  • It serves as a static factory for , (or "fields"), and many other .
  • +
  • It implements , an object that configures jOOQ's behaviour when executing queries (see for more details). Factories allow for creating that are already "configured" and ready for execution.
  • +
+ +

The static Factory API

+

+ With jOOQ 2.0, static factory methods have been introduced in order to make client code look more like SQL. Ideally, when working with jOOQ, you will simply static import all methods from the Factory class: +

+ import static org.jooq.impl.Factory.*; +

+ Note, that when working with Eclipse, you could also add the Factory to your favourites. This will allow to access functions even more fluently: +

+concat(trim(FIRST_NAME), trim(LAST_NAME)); +// ... which is in fact the same as: +Factory.concat(Factory.trim(FIRST_NAME), Factory.trim(LAST_NAME)); + +

The Factory as a Configuration object

+

+ As any Configuration object, a Factory can be supplied with these objects: +

+
    +
  • : The dialect of your database. This may be any of the currently supported database types (see for more details)
  • +
  • : An optional JDBC Connection that will be re-used for the whole lifecycle of your Factory (see for more details)
  • +
  • : An optional JDBC DataSource that will be re-used for the whole lifecycle of your Factory. If you prefer using DataSources over Connections, jOOQ will internally fetch new Connections from your DataSource, conveniently closing them again after query execution. This is particularly useful in J2EE or Spring contexts (see for more details)
  • +
  • : An optional runtime configuration (see for more details)
  • +
+

+ As a Configuration object, a Factory can construct , for later . An example is given here: +

+ select = create.selectOne(); + +// Using the internally referenced Factory, the select statement can now be executed: +Result result = select.fetch();]]> +
+ + +
+ SQL Dialect + +

+ While jOOQ tries to represent the SQL standard as much as possible, many features are vendor-specific to a given database and to its "SQL dialect". jOOQ models this using the enum type. +

+

+ The SQL dialect is one of the main attributes of a . Queries created from such factories will assume dialect-specific behaviour when and . +

+

+ Some parts of the jOOQ API are officially supported only by a given subset of the supported SQL dialects. For instance, the , which is supported by the Oracle and CUBRID databases, is annotated with a annotation, as such: +

+CONNECT BY clause to the query + */ +@Support({ CUBRID, ORACLE }) +SelectConnectByConditionStep connectBy(Condition condition);]]> +

+ jOOQ API methods which are not annotated with the annotation, or which are annotated with the Support annotation, but without any SQL dialects can be safely used in all SQL dialects. An example for this is the factory method: +

+... fields);]]> + +

jOOQ's SQL clause simulation capabilities

+

+ The aforementioned Support annotation does not only designate, which databases natively support a feature. It also indicates that a feature is simulated by jOOQ for some databases lacking this feature. An example of this is the , a predicate syntax defined by SQL:1999 and implemented only by H2, HSQLDB, and Postgres: +

+ + + +

+ Nevertheless, the IS DISTINCT FROM predicate is supported in all dialects, as its semantics can be expressed with an equivalent . For more details, see the manual's section about the . +

+ +

jOOQ and the Oracle SQL dialect

+

+ Oracle SQL is much more expressive than many other SQL dialects. It features many unique keywords, clauses and functions that are out of scope for the SQL standard. Some examples for this are +

+
    +
  • The , for hierarchical queries
  • +
  • The keyword for creating PIVOT tables
  • +
  • , as described in the section about
  • +
  • Advanced analytical functions as described in the section about
  • +
+ +

+ jOOQ has a historic affinity to Oracle's SQL extensions. If something is supported in Oracle SQL, it has a high probability of making it into the jOOQ API +

+
+
+ +
+ Connection vs. DataSource + +

Interact with JDBC Connections

+

+ While you can use jOOQ for only, you can also run queries against a JDBC . Internally, jOOQ creates or objects from such a Connection, in order to execute statements. The normal operation mode is to provide a with a JDBC Connection, whose lifecycle you will control yourself. This means that jOOQ will not actively close connections, rollback or commit transactions. +

+

Interact with JDBC DataSources

+

+ If you're in a J2EE or Spring context, however, you may wish to use a instead. Currently, Connections obtained from such a DataSource will be closed after query execution by jOOQ. The semantics of such a close operation should be the returning of the connection into a connection pool, not the actual closing of the underlying physical connection. Typically, this makes sense in an environment using distributed JTA transactions. An example of using DataSources with jOOQ can be seen in the tutorial section about . +

+
+
+ +
+ Custom Settings + +

+ The jOOQ Factory allows for some optional configuration elements to be used by advanced users. The class is a JAXB-annotated type, that can be provided to a Factory in several ways: +

+
    +
  • In the constructor. This will override default settings below
  • +
  • From a location specified by a JVM parameter: -Dorg.jooq.settings
  • +
  • From the classpath at /jooq-settings.xml
  • +
  • From the settings defaults, as specified in http://www.jooq.org/xsd/jooq-runtime-2.5.0.xsd
  • +
+

Example

+

+ For example, if you want to indicate to jOOQ, that it should inline all bind variables, and execute static instead of binding its variables to , you can do so by using the following Factory: +

+ +

+ Subsequent sections of the manual contain some more in-depth explanations about these settings: +

+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+

+ Please refer to the jOOQ runtime configuration XSD for more details:
+ http://www.jooq.org/xsd/jooq-runtime-2.5.0.xsd +

+
+
+ +
+ Runtime schema and table mapping + +

Mapping your DEV schema to a productive environment

+

+ You may wish to design your database in a way that you have several instances of your schema. This is useful when you want to cleanly separate data belonging to several customers / organisation units / branches / users and put each of those entities' data in a separate database or schema. +

+ +

+ In our AUTHOR example this would mean that you provide a book reference database to several companies, such as My Book World and Books R Us. In that case, you'll probably have a schema setup like this: +

+
    +
  • DEV: Your development schema. This will be the schema that you base code generation upon, with jOOQ
  • +
  • MY_BOOK_WORLD: The schema instance for My Book World
  • +
  • BOOKS_R_US: The schema instance for Books R Us
  • +
+ +

Mapping DEV to MY_BOOK_WORLD with jOOQ

+

+ When a user from My Book World logs in, you want them to access the MY_BOOK_WORLD schema using classes generated from DEV. This can be achieved with the class, that you can equip your Factory's with. Take the following example: +

+ +Settings settings = new Settings() + .withRenderMapping(new RenderMapping() + .withSchemata( + new MappedSchema().withInput("DEV") + .withOutput("MY_BOOK_WORLD"))); + +// Add the settings to the factory +Factory create = new Factory(connection, SQLDialect.ORACLE, settings); + +// Run queries with the "mapped" factory +create.selectFrom(AUTHOR).fetch(); + +

+ The query executed with a Factory equipped with the above mapping will in fact produce this SQL statement: +

+ +SELECT * FROM MY_BOOK_WORLD.AUTHOR +

+ Even if AUTHOR was generated from DEV. +

+ +

Mapping several schemata

+

+ Your development database may not be restricted to hold only one DEV schema. You may also have a LOG schema and a MASTER schema. Let's say the MASTER schema is shared among all customers, but each customer has their own LOG schema instance. Then you can enhance your RenderMapping like this (e.g. using an XML configuration file): +

+ + + + + + DEV + MY_BOOK_WORLD + + + LOG + MY_BOOK_WORLD_LOG + + + +]]> + +

+ Note, you can load the above XML file like this: +

+ +Settings settings = JAXB.unmarshal(new File("jooq-runtime.xml"), Settings.class); + +

+ This will map generated classes from DEV to MY_BOOK_WORLD, from LOG to MY_BOOK_WORLD_LOG, but leave the MASTER schema alone. Whenever you want to change your mapping configuration, you will have to create a new Factory +

+ + +

Using a default schema

+

+ Another option to switch schema names is to use a default schema for the Factory's underlying Connection. Many RDBMS support a USE or SET SCHEMA command, which you can call like this: +

+ +// Set the default schema +Schema MY_BOOK_WORLD = ... +create.use(MY_BOOK_WORLD); + +// Run queries with factory having a default schema +create.selectFrom(AUTHOR).fetch(); + +

+ Queries generated from the above Factory will produce this kind of SQL statement: +

+ +-- the schema name is omitted from all SQL constructs. +SELECT * FROM AUTHOR + +

+ If you wish not to render any schema name at all, use the following Settings property for this: +

+ + +Settings settings = new Settings() + .withRenderSchema(false); + +// Add the settings to the factory +Factory create = new Factory(connection, SQLDialect.ORACLE, settings); + +// Run queries that omit rendering schema names +create.selectFrom(AUTHOR).fetch(); + +

Mapping of tables

+

+ Not only schemata can be mapped, but also tables. If you are not the owner of the database your application connects to, you might need to install your schema with some sort of prefix to every table. In our examples, this might mean that you will have to map DEV.AUTHOR to something MY_BOOK_WORLD.MY_APP__AUTHOR, where MY_APP__ is a prefix applied to all of your tables. This can be achieved by creating the following mapping: +

+ +Settings settings = new Settings() + .withRenderMapping(new RenderMapping() + .withSchemata( + new MappedSchema().withInput("DEV") + .withOutput("MY_BOOK_WORLD") + .withTables( + new MappedTable().withInput("AUTHOR") + .withOutput("MY_APP__AUTHOR")))); + +// Add the settings to the factory +Factory create = new Factory(connection, SQLDialect.ORACLE, settings); + +// Run queries with the "mapped" factory +create.selectFrom(AUTHOR).fetch(); + +

+ The query executed with a Factory equipped with the above mapping will in fact produce this SQL statement: +

+ +SELECT * FROM MY_BOOK_WORLD.MY_APP__AUTHOR + +

+ Table mapping and schema mapping can be applied independently, by specifying several MappedSchema entries in the above configuration. jOOQ will process them in order of appearance and map at first match. Note that you can always omit a MappedSchema's output value, in case of which, only the table mapping is applied. If you omit a MappedSchema's input value, the table mapping is applied to all schemata! +

+ +

Hard-wiring mappings at code-generation time

+

+ Note that the manual's section about explains how you can hard-wire your schema mappings at code generation time +

+
+
+ +
+ Factory subclasses + +

+ There are a couple of subclasses for the general Factory. Each SQL dialect has its own dialect-specific factory. For instance, if you're only using the MySQL dialect, you can choose to create a new Factory using any of the following types: +

+// A general, dialect-unspecific factory +Factory create = new Factory(connection, SQLDialect.MYSQL); + +// A MySQL-specific factory +MySQLFactory create = new MySQLFactory(connection); +

+ The advantage of using a dialect-specific Factory lies in the fact, that you have access to more proprietary RDMBS functionality. This may include: +

+
    +
  • MySQL's encryption functions
  • +
  • PL/SQL constructs, pgplsql, or any other dialect's ROUTINE-language (maybe in the future)
  • +
+

+ Another type of Factory subclasses are each generated schema's factories. If you generate your schema TEST, then you will have access to a TestFactory. By default, such a schema-specific Factory will not render the schema name. +

+
+
+
+
+ +
+ SQL Statements + +

+ jOOQ currently supports 6 types of SQL statements. All of these statements are constructed from a Factory instance with an optional . If supplied with a Connection or DataSource, they can be executed. Depending on the , executed queries can return results. +

+
+ + +
+ jOOQ's DSL and non-DSL API + +

+ jOOQ ships with its own DSL (or Domain Specific Language) that simulates SQL in Java. This means, that you can write SQL statements almost as if Java natively supported it, just like .NET's C# does with LINQ to SQL. +

+

+ Here is an example to illustrate what that means: +

+ + 1920 + AND a.first_name = 'Paulo' + ORDER BY b.title]]> + result = +create.select() + .from(AUTHOR.as("a")) + .join(BOOK.as("b")).on(a.ID.equal(b.AUTHOR_ID)) + .where(a.YEAR_OF_BIRTH.greaterThan(1920) + .and(a.FIRST_NAME.equal("Paulo"))) + .orderBy(b.TITLE) + .fetch();]]> + +

+ We'll see how the aliasing works later in the section about +

+ +

jOOQ as an internal domain specific language in Java (a.k.a. the DSL-API)

+

+ Many other frameworks have similar APIs with similar feature sets. Yet, what makes jOOQ special is its informal modelling a unified SQL dialect suitable for many vendor-specific dialects, and implementing that BNF notation as a hierarchy of interfaces in Java. This concept is extremely powerful, when with syntax completion. Not only can you code much faster, your SQL code will be compile-checked to a certain extent. An example of a DSL query equivalent to the previous one is given here: +

+ result = create.select() + .from(AUTHOR) + .join(BOOK).on(BOOK.AUTHOR_ID.equal(AUTHOR.ID)) + .fetch();]]> + +

+ Unlike other, simpler frameworks that use "fluent APIs" or "method chaining", jOOQ's BNF-based interface hierarchy will not allow bad query syntax. The following will not compile, for instance: +

+ result = create.select() + .join(BOOK).on(BOOK.AUTHOR_ID.equal(AUTHOR.ID)) + // ^^^^ "join" is not possible here + .from(AUTHOR) + .fetch(); + +Result result = create.select() + .from(AUTHOR) + .join(BOOK) + .fetch(); + // ^^^^^ "on" is missing here + +Result result = create.select(rowNumber()) + // ^^^^^^^^^ "over()" is missing here + .from(AUTHOR) + .fetch();]]> + +

History of SQL building and incremental query building (a.k.a. the non-DSL API)

+

+ Historically, jOOQ started out as an object-oriented SQL builder library like any other. This meant that all queries and their syntactic components were modeled as so-called , which delegate and to child components. This part of the API will be referred to as the non-DSL API, which is still maintained and used internally by jOOQ for incremental query building. An example of incremental query building is given here: +

+ result = query.fetch();]]> + +

+ This query is equivalent to the one shown before using the DSL syntax. In fact, internally, the DSL API constructs precisely this QueryObject. Note, that you can always access the SelectQuery object to switch between DSL and non-DSL APIs: +

+ + + +

Mutability

+

+ Note, that for historic reasons, the DSL API mixes mutable and immutable behaviour with respect to the internal representation of the being constructed. While creating , (such as functions) assumes immutable behaviour, creating does not. In other words, the following can be said: +

+ + + +

+ Mutability may be removed in a future version of jOOQ. +

+
+
+ +
+ The SELECT statement + +

+ When you don't just perform (i.e. SELECT * FROM your_table WHERE ID = ?), you're usually generating new record types using custom projections. With jOOQ, this is as intuitive, as if using SQL directly. A more or less complete example of the "standard" SQL syntax, plus some extensions, is provided by a query like this: +

+ + '2008-01-01' +GROUP BY AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME + HAVING COUNT(*) > 5 +ORDER BY AUTHOR.LAST_NAME ASC NULLS FIRST + LIMIT 2 + OFFSET 1 + FOR UPDATE]]> + + + +

+ Details about the various clauses of this query will be provided in subsequent sections +

+ +

SELECT from single physical tables

+

+ A very similar, but limited API is available, if you want to select from single physical tables in order to retrieve . The decision, which type of select to create is already made at the very first step, when you create the SELECT statement with the Factory: +

+ + SimpleSelectWhereStep selectFrom(Table table);]]> +

+ As you can see, there is no way to further restrict/project the selected fields. This just selects all known TableFields in the supplied Table, and it also binds <R extends Record> to your Table's associated Record. An example of such a Query would then be: +

+ + +

+ The simple SELECT API is limited in the way that it does not support any of these clauses: +

+
    +
  • +
  • +
  • +
  • +
+

+ In most parts of this manual, it is assumed that you do not use the simple SELECT API. For more information about the simple SELECT API, see the manual's section about . +

+
+ + +
+ The SELECT clause + +

+ The SELECT clause lets you project your own record types, referencing table fields, functions, arithmetic expressions, etc. The Factory provides several methods for expressing a SELECT clause: +

+ + + + s1 = create.select(BOOK.ID, BOOK.TITLE); +Select s2 = create.select(BOOK.ID, trim(BOOK.TITLE));]]> + + +

+ Some commonly used projections can be easily created using convenience methods: +

+ + + + select1 = create.selectCount(); +Select select2 = create.selectZero(); +Select select2 = create.selectOne();]]> + + +

+ See more details about functions and expressions in the manual's section about +

+ +

The SELECT DISTINCT clause

+

+ The DISTINCT keyword can be included in the method name, constructing a SELECT clause +

+ + + + select1 = create.selectDistinct(BOOK.TITLE);]]> + +
+
+ +
+ The FROM clause + +

+ The SQL FROM clause allows for specifying any number of to select data from. The following are examples of how to form normal FROM clauses: +

+ + + + + + +

+ Read more about aliasing in the manual's section about . +

+ +

More advanced table expressions

+

+ Apart from simple tables, you can pass any arbitrary to the jOOQ FROM clause. This may include in Oracle: +

+ + + + + + +

+ Note, in order to access the DbmsXplan package, you can use the to generate Oracle's SYS schema. +

+ + +

Selecting FROM DUAL with jOOQ

+

+ In many SQL dialects, FROM is a mandatory clause, in some it isn't. jOOQ allows you to omit the FROM clause, returning just one record. An example: +

+ + + + + + +

+ Read more about dual or dummy tables in the manual's section about . The following are examples of how to form normal FROM clauses: +

+
+
+ +
+ The JOIN clause + +

+ jOOQ supports many different types of standard SQL JOIN operations: +

+
    +
  • [ INNER ] JOIN
  • +
  • LEFT [ OUTER ] JOIN
  • +
  • RIGHT [ OUTER ] JOIN
  • +
  • FULL OUTER JOIN
  • +
  • CROSS JOIN
  • +
  • NATURAL JOIN
  • +
  • NATURAL LEFT [ OUTER ] JOIN
  • +
  • NATURAL RIGHT [ OUTER ] JOIN
  • +
+ +

+ All of these JOIN methods can be called on types, or directly after the FROM clause for convenience. The following example joins AUTHOR and BOOK +

+ + result = create.select() + .from(AUTHOR.join(BOOK) + .on(BOOK.AUTHOR_ID.equal(AUTHOR.ID))) + .fetch(); + +// Call "join" on the type returned by "from" +Result result = create.select() + .from(AUTHOR) + .join(BOOK) + .on(BOOK.AUTHOR_ID.equal(AUTHOR.ID)) + .fetch();]]> + +

+ The two syntaxes will produce the same SQL statement. However, calling "join" on objects allows for more powerful, nested JOIN expressions (if you can handle the parentheses): +

+ + + + + +
    +
  • See the section about to learn more about the many ways to create objects in jOOQ.
  • +
  • See the section about to learn about the various ways of referencing objects in jOOQ
  • +
+ +

JOIN ON KEY, convenience provided by jOOQ

+

+ Surprisingly, SQL does not allow to formally JOIN on well-known foreign key relationship information. Naturally, when you join BOOK to AUTHOR, you will want to do that based on the BOOK.AUTHOR_ID foreign key to AUTHOR.ID primary key relation. Not being able to do this in SQL leads to a lot of repetitive code, re-writing the same JOIN predicate again and again - especially, when your foreign keys contain more than one column. With jOOQ, when you use , you can use foreign key constraint information in JOIN expressions as such: +

+ + + + + +

+ In case of ambiguity, you can also supply field references for your foreign keys, or the generated foreign key reference to the onKey() method. +

+ +

The JOIN USING syntax

+

+ Most often, you will provide jOOQ with JOIN conditions in the JOIN .. ON clause. SQL supports a different means of specifying how two tables are to be joined. This is the JOIN .. USING clause. Instead of a condition, you supply a set of fields whose names are common to both tables to the left and right of a JOIN operation. This can be useful when your database schema has a high degree of relational normalisation. An example: +

+ + + + + +

+ In schemas with high degrees of normalisation, you may also choose to use NATURAL JOIN, which takes no JOIN arguments as it joins using all fields that are common to the table expressions to the left and to the right of the JOIN operator. An example: +

+ + + + + +

Oracle's partitioned OUTER JOIN

+

+ Oracle SQL ships with a special syntax available for OUTER JOIN clauses. According to the Oracle documentation about partitioned outer joins this can be used to fill gaps for simplified analytical calculations. jOOQ only supports putting the PARTITION BY clause to the right of the OUTER JOIN clause. The following example will create at least one record per AUTHOR and per existing value in BOOK.PUBLISHED_IN, regardless if an AUTHOR has actually published a book in that year. +

+ + + + + +
+
+ +
+ The WHERE clause + +

+ The WHERE clause can be used for JOIN or filter predicates, in order to restrict the data returned by the supplied to the previously specified and . Here is an example: +

+ + + + + +

+ The above syntax is convenience provided by jOOQ, allowing you to connect the supplied in the WHERE clause with another condition using an AND operator. You can of course also create a more complex condition and supply that to the WHERE clause directly (observe the different placing of parentheses). The results will be the same: +

+ + + + + +

+ You will find more information about creating later in the manual. +

+
+
+ +
+ The CONNECT BY clause + +

+ The Oracle database knows a very succinct syntax for creating hierarchical queries: the CONNECT BY clause, which is fully supported by jOOQ, including all related functions and pseudo-columns. A more or less formal definition of this clause is given here: +

+-- SELECT .. +-- FROM .. +-- WHERE .. + CONNECT BY [ NOCYCLE ] condition [ AND condition, ... ] [ START WITH condition ] +-- GROUP BY .. +-- ORDER [ SIBLINGS ] BY .. + +

+ An example for an iterative query, iterating through values between 1 and 5 is this: +

+ + + + + +

+ Here's a more complex example where you can recursively fetch directories in your database, and concatenate them to a path: +

+ + + + + +

+ The output might then look like this +

+ ++------------------------------------------------+ +|substring | ++------------------------------------------------+ +|C: | +|C:/eclipse | +|C:/eclipse/configuration | +|C:/eclipse/dropins | +|C:/eclipse/eclipse.exe | ++------------------------------------------------+ +|...21 record(s) truncated... + + +

+ Some of the supported functions and pseudo-columns are these (available from the ): +

+ +
    +
  • LEVEL
  • +
  • CONNECT_BY_IS_CYCLE
  • +
  • CONNECT_BY_IS_LEAF
  • +
  • CONNECT_BY_ROOT
  • +
  • SYS_CONNECT_BY_PATH
  • +
  • PRIOR
  • +
+ +

+ Note that this syntax is also supported in the CUBRID database. +

+ +

ORDER SIBLINGS

+

+ The Oracle database allows for specifying a SIBLINGS keyword in the . Instead of ordering the overall result, this will only order siblings among each other, keeping the hierarchy intact. An example is given here: +

+ + + + + + +
+
+ +
+ The GROUP BY clause + +

+ GROUP BY can be used to create unique groups of data, to form aggregations, to remove duplicates and for other reasons. It will transform your previously defined , and return only one record per unique group as specified in this clause. For instance, you can group books by BOOK.AUTHOR_ID: +

+ + + + + +

+ As defined in the SQL standard, when grouping, you may no longer project any columns that are not a formal part of the GROUP BY clause, or . The above example counts all books per author +

+ +

MySQL's deviation from the SQL standard

+

+ MySQL has a peculiar way of not adhering to this standard behaviour. This is documented in the MySQL manual. In short, with MySQL, you can also project any other field that are not part of the GROUP BY clause. The projected values will just be arbitrary values from within the group. You cannot rely on any ordering. For example: +

+ + + + + +

+ This will return an arbitrary title per author. jOOQ supports this syntax, as jOOQ is not doing any checks internally, about the consistence of tables/fields/functions that you provide it. +

+ +

Empty GROUP BY clauses

+

+ jOOQ supports empty GROUP BY () clauses as well. This will result in that return only one record. +

+ + + + + + +

ROLLUP(), CUBE() and GROUPING SETS()

+

+ Some databases support the SQL standard grouping functions and some extensions thereof. See the manual's section about for more details. +

+
+
+ +
+ The HAVING clause + +

+ The HAVING clause is commonly used to further restrict data resulting from a previously issued . An example, selecting only those authors that have written at least two books: +

+ + += 2]]> + + +

+ According to the SQL standard, you may omit the GROUP BY clause and still issue a HAVING clause. This will implicitly GROUP BY (). jOOQ also supports this syntax. The following example selects one record, only if there are at least 4 books in the books table: +

+ + += 4]]> + + +
+
+ +
+ The ORDER BY clause + +

+ Databases are allowed to return data in any arbitrary order, unless you explicitly declare that order in the ORDER BY clause. In jOOQ, this is straight-forward: +

+ + + + + +

+ Any jOOQ can be transformed into an by calling the asc() and desc() methods. +

+ +

Ordering by field index

+

+ The SQL standard allows for specifying integer literals (, not !) to reference column indexes from the projection (). This may be useful if you do not want to repeat a lengthy expression, by which you want to order - although most databases also allow for referencing in the ORDER BY clause. An example of this is given here: +

+ + + + + +

+ Note, how one() is used as a convenience short-cut for inline(1) +

+ +

Ordering and NULLS

+

+ A few databases support the SQL standard "null ordering" clause in sort specification lists, to define whether NULL values should come first or last in an ordered result. +

+ + + + + +

+ If your database doesn't support this syntax, jOOQ simulates it using a as follows +

+ + + + +

Ordering using CASE expressions

+

+ Using in SQL ORDER BY clauses is a common pattern, if you want to introduce some sort indirection / sort mapping into your queries. As with SQL, you can add any type of into your ORDER BY clause. For instance, if you have two favourite books that you always want to appear on top, you could write: +

+ + + + + +

+ But writing these things can become quite verbose. jOOQ supports a convenient syntax for specifying sort mappings. The same query can be written in jOOQ as such: +

+ + + +

+ More complex sort indirections can be provided using a Map: +

+ +() {{ + put("1984", 1); + put("Animal Farm", 13); + put("The jOOQ book", 10); + }}));]]> + +

+ Of course, you can combine this feature with the previously discussed NULLS FIRST / NULLS LAST feature. So, if in fact these two books are the ones you like least, you can put all NULLS FIRST (all the other books): +

+ + + +

jOOQ's understanding of SELECT .. ORDER BY

+

+ The SQL standard defines that a "query expression" can be ordered, and that query expressions can contain , whose subqueries cannot be ordered. While this is defined as such in the SQL standard, many databases allowing for the non-standard in one way or another, do not adhere to this part of the SQL standard. Hence, jOOQ allows for ordering all SELECT statements, regardless whether they are constructed as a part of a UNION or not. Corner-cases are handled internally by jOOQ, by introducing synthetic subselects to adhere to the correct syntax, where this is needed. +

+ + +

Oracle's ORDER SIBLINGS BY clause

+

+ jOOQ also supports Oracle's SIBLINGS keyword to be used with ORDER BY clauses for +

+
+
+ +
+ The LIMIT .. OFFSET clause + +

+ While being extremely useful for every application that does paging, or just to limit result sets to reasonable sizes, this clause is not yet part of any SQL standard (up until SQL:2008). Hence, there exist a variety of possible implementations in various SQL dialects, concerning this limit clause. jOOQ chose to implement the LIMIT .. OFFSET clause as understood and supported by MySQL, H2, HSQLDB, Postgres, and SQLite. Here is an example of how to apply limits with jOOQ: +

+ + + +

+ This will limit the result to 1 books starting with the 2nd book (starting at offset 0!). limit() is supported in all dialects, offset() in all but Sybase ASE, which has no reasonable means to simulate it. This is how jOOQ simulates the above query in various SQL dialects: +

+ + 1 +AND ROWNUM_98843777 <= 3 +]]> + +

+ As you can see, jOOQ will take care of the incredibly painful ROW_NUMBER() OVER() (or ROWNUM for Oracle) filtering in subselects for you, you'll just have to write limit(1).offset(2) in any dialect. +

+ +

SQL Server's ORDER BY, TOP and subqueries

+

+ As can be seen in the above example, writing correct SQL can be quite tricky, depending on the SQL dialect. For instance, with SQL Server, you cannot have an ORDER BY clause in a subquery, unless you also have a TOP clause. This is illustrated by the fact that jOOQ renders a TOP 100 PERCENT clause for you. The same applies to the fact that ROW_NUMBER() OVER() needs an ORDER BY windowing clause, even if you don't provide one to the jOOQ query. By default, jOOQ adds ordering by the first column of your projection. +

+
+
+ +
+ The FOR UPDATE clause + +

+ For inter-process synchronisation and other reasons, you may choose to use the SELECT .. FOR UPDATE clause to indicate to the database, that a set of cells or records should be locked by a given transaction for subsequent updates. With jOOQ, this can be achieved as such: +

+ + + + + +

+ The above example will produce a record-lock, locking the whole record for updates. Some databases also support cell-locks using FOR UPDATE OF .. +

+ + + + + +

+ Oracle goes a bit further and also allows to specify the actual locking behaviour. It features these additional clauses, which are all supported by jOOQ: +

+
    +
  • FOR UPDATE NOWAIT: This is the default behaviour. If the lock cannot be acquired, the query fails immediately
  • +
  • FOR UPDATE WAIT n: Try to wait for [n] seconds for the lock acquisition. The query will fail only afterwards
  • +
  • FOR UPDATE SKIP LOCKED: This peculiar syntax will skip all locked records. This is particularly useful when implementing queue tables with multiple consumers
  • +
+

+ With jOOQ, you can use those Oracle extensions as such: +

+ + + +

FOR UPDATE in CUBRID and SQL Server

+

+ The SQL standard specifies a FOR UPDATE clause to be applicable for cursors. Most databases interpret this as being applicable for all SELECT statements. An exception to this rule are the CUBRID and SQL Server databases, that do not allow for any FOR UPDATE clause in a regular SQL SELECT statement. jOOQ simulates the FOR UPDATE behaviour, by locking record by record with JDBC. JDBC allows for specifying the flags TYPE_SCROLL_SENSITIVE, CONCUR_UPDATABLE for any statement, and then using ResultSet.updateXXX() methods to produce a cell-lock / row-lock. Here's a simplified example in JDBC: +

+ + +

+ The main drawback of this approach is the fact that the database has to maintain a scrollable cursor, whose records are locked one by one. This can cause a major risk of deadlocks or race conditions if the JDBC driver can recover from the unsuccessful locking, if two Java threads execute the following statements: +

+ + + +

+ So use this technique with care, possibly only ever locking single rows! +

+ +

Pessimistic (shared) locking with the FOR SHARE clause

+

+ Some databases (MySQL, Postgres) also allow to issue a non-exclusive lock explicitly using a FOR SHARE clause. This is also supported by jOOQ +

+ +

Optimistic locking in jOOQ

+

+ Note, that jOOQ also supports optimistic locking, if you're doing simple CRUD. This is documented in the section's manual about . +

+
+
+ +
+ UNION, INTERSECTION and EXCEPT + +

+ SQL allows to perform set operations as understood in standard set theory on result sets. These operations include unions, intersections, subtractions. For two subselects to be combinable by such a set operator, each subselect must return a of the same arity and type. +

+ +

UNION and UNION ALL

+

+ These operators combine two results into one. While UNION removes all duplicate records resulting from this combination, UNION ALL leaves subselect results as they are. Typically, you should prefer UNION ALL over UNION, if you don't really need to remove duplicates. The following example shows how to use such a UNION operation in jOOQ. +

+ + + + + +

INTERSECT [ ALL ] and EXCEPT [ ALL ]

+

+ INTERSECT is the operation that produces only those s that are returned by both subselects. EXCEPT is the operation that returns only those s that are returned exclusively in the first subselect. Both operators will remove duplicates from their results. The SQL standard allows to specify the ALL keyword for both of these operators as well, but this is hardly supported in any database. jOOQ does not support INTERSECT ALL, EXEPT ALL operations either. +

+ +

jOOQ's set operators and how they're different from standard SQL

+

+ As previously mentioned in the manual's section about the , jOOQ has slightly changed the semantics of these set operators. While in SQL, a subselect may not contain any or (unless you wrap the subselect into a ), jOOQ allows you to do so. In order to select both the youngest and the oldest author from the database, you can issue the following statement with jOOQ (rendered to the MySQL dialect): +

+ + + + + +
+
+ +
+ Oracle-style hints + +

+ If you are closely coupling your application to an Oracle (or CUBRID) database, you might need to be able to pass hints of the form /*+HINT*/ with your SQL statements to the Oracle database. For example: +

+ +SELECT /*+ALL_ROWS*/ FIRST_NAME, LAST_NAME + FROM AUTHOR + +

+ This can be done in jOOQ using the .hint() clause in your SELECT statement: +

+ +create.select(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) + .hint("/*+ALL_ROWS*/") + .from(AUTHOR); + +

+ Note that you can pass any string in the .hint() clause. If you use that clause, the passed string will always be put in between the SELECT [DISTINCT] keywords and the actual projection list +

+
+
+
+
+ +
+ The INSERT statement + +

+ The INSERT statement is used to insert new records into a database table. Records can either be supplied using a VALUES() constructor, or a SELECT statement. jOOQ supports both types of INSERT statements. An example of an INSERT statement using a VALUES() constructor is given here: +

+ + + +INSERT INTO AUTHOR + (ID, FIRST_NAME, LAST_NAME) +VALUES (100, 'Hermann', 'Hesse'); +create.insertInto(AUTHOR, + AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) + .values(100, "Hermann", "Hesse"); + +

INSERT multiple rows with the VALUES() constructor

+

+ The SQL standard specifies that multiple rows can be supplied to the VALUES() constructor in an INSERT statement. Here's an example of a multi-record INSERT +

+ +INSERT INTO AUTHOR + (ID, FIRST_NAME, LAST_NAME) +VALUES (100, 'Hermann', 'Hesse'), + (101, 'Alfred', 'Döblin'); +create.insertInto(AUTHOR, + AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) + .values(100, "Hermann", "Hesse") + .values(101, "Alfred", "Döblin"); + +

+ jOOQ tries to stay close to actual SQL. In detail, however, Java's expressiveness is limited. That's why the values() clause is repeated for every record in multi-record inserts. +

+

+ Some RDBMS do not support inserting several records in a single statement. In those cases, jOOQ simulates multi-record INSERTs using the following SQL: +

+ + +INSERT INTO AUTHOR + (ID, FIRST_NAME, LAST_NAME) +SELECT 100, 'Hermann', 'Hesse' FROM DUAL UNION ALL +SELECT 101, 'Alfred', 'Döblin' FROM DUAL; +create.insertInto(AUTHOR, + AUTHOR.ID, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) + .values(100, "Hermann", "Hesse") + .values(101, "Alfred", "Döblin"); + + +

INSERT using jOOQ's alternative syntax

+

+ MySQL (and some other RDBMS) allow for using a non-SQL-standard, UPDATE-like syntax for INSERT statements. This is also supported in jOOQ, should you prefer that syntax. The above INSERT statement can also be expressed as follows: +

+ +create.insertInto(AUTHOR) + .set(AUTHOR.ID, 100) + .set(AUTHOR.FIRST_NAME, "Hermann") + .set(AUTHOR.LAST_NAME, "Hesse") + .newRecord() + .set(AUTHOR.ID, 101) + .set(AUTHOR.FIRST_NAME, "Alfred") + .set(AUTHOR.LAST_NAME, "Döblin"); + +

+ As you can see, this syntax is a bit more verbose, but also more type-safe, as every field can be matched with its value. Internally, the two syntaxes are strictly equivalent. +

+ +

MySQL's INSERT .. ON DUPLICATE KEY UPDATE

+

+ The MySQL database supports a very convenient way to INSERT or UPDATE a record. This is a non-standard extension to the SQL syntax, which is supported by jOOQ and simulated in other RDBMS, where this is possible (i.e. if they support the SQL standard ). Here is an example how to use the ON DUPLICATE KEY UPDATE clause: +

+ +// Add a new author called "Koontz" with ID 3. +// If that ID is already present, update the author's name +create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.LAST_NAME) + .values(3, "Koontz") + .onDuplicateKeyUpdate() + .set(AUTHOR.LAST_NAME, "Koontz"); + +

The synthetic ON DUPLICATE KEY IGNORE clause

+ +

+ The MySQL database also supports an INSERT IGNORE INTO clause. This is supported by jOOQ using the more convenient SQL syntax variant of ON DUPLICATE KEY IGNORE, which can be equally simulated in other databases using a : +

+ +// Add a new author called "Koontz" with ID 3. +// If that ID is already present, ignore the INSERT statement +create.insertInto(AUTHOR, AUTHOR.ID, AUTHOR.LAST_NAME) + .values(3, "Koontz") + .onDuplicateKeyIgnore(); + +

Postgres's INSERT .. RETURNING

+

+ The Postgres database has native support for an INSERT .. RETURNING clause. This is a very powerful concept that is simulated for all other dialects using JDBC's method. Take this example: +

+ + record = +create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) + .values("Charlotte", "Roche") + .returning(AUTHOR.ID) + .fetchOne(); + +System.out.println(record.getValue(AUTHOR.ID)); + +// For some RDBMS, this also works when inserting several values +// The following should return a 2x2 table +Result result = +create.insertInto(AUTHOR, AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME) + .values("Johann Wolfgang", "von Goethe") + .values("Friedrich", "Schiller") + // You can request any field. Also trigger-generated values + .returning(AUTHOR.ID, AUTHOR.CREATION_DATE) + .fetch();]]> + +

+ Some databases have poor support for returning generated keys after INSERTs. In those cases, jOOQ might need to issue another in order to fetch an @@identity value. Be aware, that this can lead to race-conditions in those databases that cannot properly return generated ID values. For more information, please consider the jOOQ Javadoc for the returning() clause. +

+ +

The INSERT SELECT statement

+ +

+ In some occasions, you may prefer the INSERT SELECT syntax, for instance, when you copy records from one table to another: +

+ +create.insertInto(AUTHOR_ARCHIVE) + .select(create.selectFrom(AUTHOR).where(AUTHOR.DECEASED.isTrue())); + +
+
+ +
+ The UPDATE statement + +

+ The UPDATE statement is used to modify one or several pre-existing records in a database table. UPDATE statements are only possible on single tables. Support for multi-table updates will be implemented in the near future. An example update query is given here: +

+ + +UPDATE AUTHOR + SET FIRST_NAME = 'Hermann', + LAST_NAME = 'Hesse' + WHERE ID = 3; +create.update(AUTHOR) + .set(AUTHOR.FIRST_NAME, "Hermann") + .set(AUTHOR.LAST_NAME, "Hesse") + .where(AUTHOR.ID.equal(3)); + + +
+
+ +
+ The DELETE statement + +

+ The DELETE statement physically removes records from a database table. DELETE statements are only possible on single tables. Support for multi-table deletes will be implemented in the near future. An example delete query is given here: +

+ + +DELETE AUTHOR + WHERE ID = 100; +create.delete(AUTHOR) + .where(AUTHOR.ID.equal(100)); + + +
+
+ +
+ The MERGE statement + +

+ The MERGE statement is one of the most advanced standardised SQL constructs, which is supported by DB2, HSQLDB, Oracle, SQL Server and Sybase (MySQL has the similar INSERT .. ON DUPLICATE KEY UPDATE construct) +

+

+ The point of the standard MERGE statement is to take a TARGET table, and merge (INSERT, UPDATE) data from a SOURCE table into it. DB2, Oracle, SQL Server and Sybase also allow for DELETING some data and for adding many additional clauses. With jOOQ {jooq-version}, only Oracle's MERGE extensions are supported. Here is an example: +

+ + +-- Check if there is already an author called 'Hitchcock' +-- If there is, rename him to John. If there isn't add him. +MERGE INTO AUTHOR +USING (SELECT 1 FROM DUAL) +ON (LAST_NAME = 'Hitchcock') +WHEN MATCHED THEN UPDATE SET FIRST_NAME = 'John' +WHEN NOT MATCHED THEN INSERT (LAST_NAME) VALUES ('Hitchcock') +create.mergeInto(AUTHOR) + .using(create().selectOne()) + .on(AUTHOR.LAST_NAME.equal("Hitchcock")) + .whenMatchedThenUpdate() + .set(AUTHOR.FIRST_NAME, "John") + .whenNotMatchedThenInsert(AUTHOR.LAST_NAME) + .values("Hitchcock"); + + + +

MERGE Statement (H2-specific syntax)

+

+ The H2 database ships with a somewhat less powerful but a little more intuitive syntax for its own version of the MERGE statement. An example more or less equivalent to the previous one can be seen here: +

+ + +-- Check if there is already an author called 'Hitchcock' +-- If there is, rename him to John. If there isn't add him. + +MERGE INTO AUTHOR (FIRST_NAME, LAST_NAME) +KEY (LAST_NAME) +VALUES ('John', 'Hitchcock') +create.mergeInto(AUTHOR, + AUTHOR.FIRST_NAME, + AUTHOR.LAST_NAME) + .key(AUTHOR.LAST_NAME) + .values("John", "Hitchcock") + .execute(); + + +

+ This syntax can be fully simulated by jOOQ for all other databases that support the SQL standard. For more information about the H2 MERGE syntax, see the documentation here:
+ http://www.h2database.com/html/grammar.html#merge +

+ +
+
+ +
+ The TRUNCATE statement + +

+ The TRUNCATE statement is the only DDL statement supported by jOOQ so far. It is popular in many databases when you want to bypass constraints for table truncation. Databases may behave differently, when a truncated table is referenced by other tables. For instance, they may fail if records from a truncated table are referenced, even with ON DELETE CASCADE clauses in place. Please, consider your database manual to learn more about its TRUNCATE implementation. +

+

+ The TRUNCATE syntax is trivial: +

+ + + TRUNCATE TABLE AUTHOR; + create.truncate(AUTHOR).execute(); + + +

+ TRUNCATE is not supported by Ingres and SQLite. jOOQ will execute a DELETE FROM AUTHOR statement instead. +

+
+
+
+
+ +
+ Table expressions + +

+ The following sections explain the various types of table expressions supported by jOOQ +

+
+ + +
+ Generated Tables + +

+ Most of the times, when thinking about a you're probably thinking about an actual physical table in your database schema. If you're using jOOQ's , you will have all tables from your database schema available to you as type safe Java objects. You can then use these tables in SQL , or in other , just like any other table expression. An example is given here: +

+ + + + + +

+ The above example shows how AUTHOR and BOOK tables are joined in a . It also shows how you can access physical by dereferencing the relevant Java attributes of their tables. +

+

+ See the manual's section about for more information about what is really generated by the +

+
+
+ +
+ Aliased Tables + +

+ The strength of jOOQ's becomes more obvious when you perform table aliasing and dereference fields from generated aliased tables. This can best be shown by example: +

+ + 1920 + AND a.first_name = 'Paulo' + ORDER BY b.title]]> + + +

+ As you can see in the above example, calling as() on generated tables returns an object of the same type as the table. This means that the resulting object can be used to dereference fields from the aliased table. This is quite powerful in terms of having your Java compiler check the syntax of your SQL statements. If you remove a column from a table, dereferencing that column from that table alias will cause compilation errors. +

+ +

Dereferencing columns from other table expressions

+

+ TODO document this +

+
+
+ +
+ Joined tables + +

+ The that can be used in are the most powerful and best supported means of creating new in SQL. Informally, the following can be said: +

+ +A(colA1, ..., colAn) "join" B(colB1, ..., colBm) "produces" C(colA1, ..., colAn, colB1, ..., colBm) + +

+ SQL and relational algebra distinguish between at least the following JOIN types (upper-case: SQL, lower-case: relational algebra): +

+
    +
  • CROSS JOIN or cartesian product: The basic JOIN in SQL, producing a relational cross product, combining every record of table A with every record of table B. Note that cartesian products can also be produced by listing comma-separated in the of a
  • +
  • NATURAL JOIN: The basic JOIN in relational algebra, yet a rarely used JOIN in databases with everyday degree of normalisation. This JOIN type unconditionally equi-joins two tables by all columns with the same name (requiring foreign keys and primary keys to share the same name). Note that the JOIN columns will only figure once in the resulting .
  • +
  • INNER JOIN or equi-join: This JOIN operation performs a cartesian product (CROSS JOIN) with a being applied to the resulting . Most often, a comparing foreign keys and primary keys will be applied as a filter, but any other predicate will work, too.
  • +
  • OUTER JOIN: This JOIN operation performs a cartesian product (CROSS JOIN) with a being applied to the resulting . Most often, a comparing foreign keys and primary keys will be applied as a filter, but any other predicate will work, too. Unlike the INNER JOIN, an OUTER JOIN will add "empty records" to the left (table A) or right (table B) or both tables, in case the conditional expression fails to produce a .
  • +
  • semi-join: In SQL, this JOIN operation can only be expressed implicitly using or . The resulting from a semi-join will only contain the left-hand side table A
  • +
  • anti-join: In SQL, this JOIN operation can only be expressed implicitly using or . The resulting from a semi-join will only contain the left-hand side table A
  • +
  • division: This JOIN operation is hard to express at all, in SQL. See the manual's chapter about for details on how jOOQ simulates this operation.
  • +
+

+ jOOQ supports all of these JOIN types (except semi-join and anti-join) directly on any : +

+ + table) + +// Various overloaded INNER JOINs +TableOnStep join(TableLike) +TableOnStep join(String) +TableOnStep join(String, Object...) +TableOnStep join(String, QueryPart...) + +// Various overloaded OUTER JOINs (supporting Oracle's partitioned OUTER JOIN) +// Overloading is similar to that of INNER JOIN +TablePartitionByStep leftOuterJoin(TableLike) +TablePartitionByStep rightOuterJoin(TableLike) + +// Various overloaded FULL OUTER JOINs +TableOnStep fullOuterJoin(TableLike) + +// Various overloaded CROSS JOINs +Table crossJoin(TableLike) + +// Various overloaded NATURAL JOINs +Table naturalJoin(TableLike) +Table naturalLeftOuterJoin(TableLike) +Table naturalRightOuterJoin(TableLike)]]> + +

+ Note that most of jOOQ's JOIN operations give way to a similar DSL API hierarchy as previously seen in the manual's section about the +

+
+
+ +
+ Nested SELECTs + +

+ A can appear almost anywhere a can. Such a "nested SELECT" is often called a "derived table". Apart from many convenience methods accepting objects directly, a SELECT statement can always be transformed into a object using the asTable() method. +

+ +

Example: Scalar subquery

+ + +SELECT * + FROM BOOK + WHERE BOOK.AUTHOR_ID = ( + SELECT ID + FROM AUTHOR + WHERE LAST_NAME = 'Orwell') +create.select() + .from(BOOK) + .where(BOOK.AUTHOR_ID.equal(create + .select(AUTHOR.ID) + .from(AUTHOR) + .where(AUTHOR.LAST_NAME.equal("Orwell")))); + + +

Example: Derived table

+ + + + nested = + create.select(BOOK.AUTHOR_ID, count().as("books")) + .from(BOOK) + .groupBy(BOOK.AUTHOR_ID).asTable("nested"); + +create.select(nested.getFields()) + .from(nested) + .orderBy(nested.getField("books"));]]> + + +

Example: Correlated subquery

+ + + +Field books = + create.selectCount() + .from(BOOK) + .where(BOOK.AUTHOR_ID.equal(AUTHOR.ID)) + .asField("books"); +create.select(AUTHOR.ID, books) + .from(AUTHOR) + .orderBy(books, AUTHOR.ID));]]> + + + + +
+ The Oracle 11g PIVOT clause + +

+ If you are closely coupling your application to an Oracle database, you can take advantage of some Oracle-specific features, such as the PIVOT clause, used for statistical analyses. The formal syntax definition is as follows: +

+ +-- SELECT .. + FROM table PIVOT (aggregateFunction [, aggregateFunction] FOR column IN (expression [, expression])) +-- WHERE .. + +

+ The PIVOT clause is available from the type, as pivoting is done directly on a table. Currently, only Oracle's PIVOT clause is supported. Support for SQL Server's slightly different PIVOT clause will be added later. Also, jOOQ may simulate PIVOT for other dialects in the future. +

+
+
+ +
+ jOOQ's relational division syntax + +

+ There is one operation in relational algebra that is not given a lot of attention, because it is rarely used in real-world applications. It is the relational division, the opposite operation of the cross product (or, relational multiplication). The following is an approximate definition of a relational division: +

+ +Assume the following cross join / cartesian product +C = A × B + +Then it can be said that +A = C ÷ B +B = C ÷ A + +

+ With jOOQ, you can simplify using relational divisions by using the following syntax: +

+ +C.divideBy(B).on(C.ID.equal(B.C_ID)).returning(C.TEXT) + +

+ The above roughly translates to +

+ +SELECT DISTINCT C.TEXT FROM C "c1" +WHERE NOT EXISTS ( + SELECT 1 FROM B + WHERE NOT EXISTS ( + SELECT 1 FROM C "c2" + WHERE "c2".TEXT = "c1".TEXT + AND "c2".ID = B.C_ID + ) +) + +

+ Or in plain text: Find those TEXT values in C whose ID's correspond to all ID's in B. Note that from the above SQL statement, it is immediately clear that proper indexing is of the essence. Be sure to have indexes on all columns referenced from the on(...) and returning(...) clauses. +

+ +

+ For more information about relational division and some nice, real-life examples, see +

+ + +
+ +
+ +
+ Array and cursor unnesting + +

+ The SQL standard specifies how SQL databases should implement ARRAY and TABLE types, as well as CURSOR types. Put simply, a CURSOR is a pointer to any materialised . Depending on the cursor's features, this table expression can be scrolled through in both directions, records can be locked, updated, removed, inserted, etc. Often, CURSOR types contain s, whereas ARRAY and TABLE types contain simple scalar values, although that is not a requirement +

+ +

+ ARRAY types in SQL are similar to Java's array types. They contain a "component type" or "element type" and a "dimension". This sort of ARRAY type is implemented in H2, HSQLDB and Postgres and supported by jOOQ as such. Oracle uses strongly-typed arrays, which means that an ARRAY type (VARRAY or TABLE type) has a name and possibly a maximum capacity associated with it. +

+ +

Unnesting array and cursor types

+

+ The real power of these types become more obvious when you fetch them from to unnest them as and use them in your . An example is given here, where Oracle's DBMS_XPLAN package is used to fetch a cursor containing data about the most recent execution plan: +

+ + + + + +

+ Note, in order to access the DbmsXplan package, you can use the to generate Oracle's SYS schema. +

+
+
+ +
+ The DUAL table + +

+ The SQL standard specifies that the is optional in a . However, according to the standard, you may then no longer use some other clauses, such as the . In the real world, there exist three types of databases: +

+
    +
  • The ones that always require a FROM clause
  • +
  • The ones that never require a FROM clause (and still allow a WHERE clause)
  • +
  • The ones that correctly implement the SQL standard
  • +
+

+ With jOOQ, you don't have to worry about the above distinction of SQL dialects. jOOQ never requires a FROM clause, but renders the necessary "DUAL" table, if needed. The following program shows how jOOQ renders "DUAL" tables +

+ + + + + + +

+ Note, that some databases (H2, MySQL) can normally do without "dual". However, there exist some corner-cases with complex nested SELECT statements, where this will cause syntax errors (or parser bugs). To stay on the safe side, jOOQ will always render "dual" in those dialects. +

+
+
+ + + +
+ Column expressions + +

+ Column expressions can be used in various SQL clauses in order to refer to one or several columns. This chapter explains how to form various types of column expressions with jOOQ. A particular type of column expression is given in the section about , where an expression may have a degree of more than one. +

+ +

Using column expressions in jOOQ

+

+ jOOQ allows you to freely create arbitrary column expressions using a fluent expression construction API. Many expressions can be formed as functions from , other expressions can be formed based on a pre-existing column expression. For example: +

+ + field1 = BOOK.TITLE; + +// A function created from the Factory using "prefix" notation +Field field2 = trim(BOOK.TITLE); + +// The same function created from a pre-existing Field using "postfix" notation +Field field3 = BOOK.TITLE.trim(); + +// More complex function with advanced DSL syntax +Field field4 = listAgg(BOOK.TITLE) + .withinGroupOrderBy(BOOK.ID.asc()) + .over().partitionBy(AUTHOR.ID);]]> + +

+ In general, it is up to you whether you want to use the "prefix" notation or the "postfix" notation to create new column expressions based on existing ones. The "SQL way" would be to use the "prefix notation", with functions created from the . The "Java way" or "object-oriented way" would be to use the "postfix" notation with functions created from objects. Both ways ultimately create the same query part, though. +

+
+ + +
+ Table columns + +

+ Table columns are the most simple implementations of a . They are mainly produced by jOOQ's and can be dereferenced from the generated tables. This manual is full of examples involving table columns. Another example is given in this query: +

+ + + + + + +

+ Table columns implement a more specific interface called , which is parameterised with its associated <R extends Record> record type. +

+

+ See the manual's section about for more information about what is really generated by the +

+
+
+ +
+ Aliased columns + +

+ Just like , columns can be renamed using aliases. Here is an example: +

+ + SELECT FIRST_NAME || ' ' || LAST_NAME author, COUNT(*) books + FROM AUTHOR + JOIN BOOK ON AUTHOR.ID = AUTHOR_ID +GROUP BY FIRST_NAME, LAST_NAME; + +

+ Here is how it's done with jOOQ: +

+ +Record record = create.select( + concat(AUTHOR.FIRST_NAME, " ", AUTHOR.LAST_NAME).as("author"), + count().as("books")) + .from(AUTHOR) + .join(BOOK).on(AUTHOR.ID.equal(BOOK.AUTHOR_ID)) + .groupBy(AUTHOR.FIRST_NAME, AUTHOR.LAST_NAME).fetchAny(); + +

+ When you alias Fields like above, you can access those Fields' values using the alias name: +

+ +System.out.println("Author : " + record.getValue("author")); +System.out.println("Books : " + record.getValue("books")); + +
+
+ +
+ Cast expressions + +

+ jOOQ's source code generator tries to find the most accurate type mapping between your vendor-specific data types and a matching Java type. For instance, most VARCHAR, CHAR, CLOB types will map to String. Most BINARY, BYTEA, BLOB types will map to byte[]. NUMERIC types will default to java.math.BigDecimal, but can also be any of java.math.BigInteger, Long, Integer, Short, Byte, Double, Float. +

+

+ Sometimes, this automatic mapping might not be what you needed, or jOOQ cannot know the type of a field. In those cases you would write SQL type CASTs like this: +

+ +-- Let's say, your Postgres column LAST_NAME was VARCHAR(30) +-- Then you could do this: +SELECT CAST(AUTHOR.LAST_NAME AS TEXT) FROM DUAL + +

+ in jOOQ, you can write something like that: +

+ +create.select(TAuthor.LAST_NAME.cast(PostgresDataType.TEXT)); + +

+ The same thing can be achieved by casting a Field directly to String.class, as TEXT is the default data type in Postgres to map to Java's String +

+ +create.select(TAuthor.LAST_NAME.cast(String.class)); + +

+ The complete CAST API in Field consists of these three methods: +

+ + { + + // Cast this field to the type of another field + Field cast(Field field); + + // Cast this field to a given DataType + Field cast(DataType type); + + // Cast this field to the default DataType for a given Class + Field cast(Class type); +} + +// And additional convenience methods in the Factory: +public class Factory { + Field cast(Object object, Field field); + Field cast(Object object, DataType type); + Field cast(Object object, Class type); + Field castNull(Field field); + Field castNull(DataType type); + Field castNull(Class type); +}]]> +
+
+ +
+ Arithmetic expressions + +

Numeric arithmetic expressions

+

+ Your database can do the math for you. Arithmetic operations are implemented just like , with similar limitations as far as type restrictions are concerned. You can use any of these operators: +

+ + + - * / % + +

+ In order to express a SQL query like this one: +

+ +SELECT ((1 + 2) * (5 - 3) / 2) % 10 FROM DUAL + +

+ You can write something like this in jOOQ: +

+ +create.select(val(1).add(2).mul(val(5).sub(3)).div(2).mod(10); + +

Datetime arithmetic expressions

+

+ jOOQ also supports the Oracle-style syntax for adding days to a Field<? extends java.util.Date> +

+ + + SELECT SYSDATE + 3 FROM DUAL; + create.select(currentTimestamp().add(3)); + + +

+ For more advanced datetime arithmetic, use the Factory's timestampDiff() and dateDiff() functions, as well as jOOQ's built-in SQL standard INTERVAL data type support: +

+
    +
  • INTERVAL YEAR TO MONTH:
  • +
  • INTERVAL DAY TO SECOND:
  • +
+
+
+ +
+ String concatenation + +

+ The SQL standard defines the concatenation operator to be an infix operator, similar to the ones we've seen in the chapter about . This operator looks like this: ||. Some other dialects do not support this operator, but expect a concat() function, instead. jOOQ renders the right operator / function, depending on your : +

+ + +SELECT 'A' || 'B' || 'C' FROM DUAL +-- Or in MySQL: +SELECT concat('A', 'B', 'C') FROM DUAL +  +// For all RDBMS, including MySQL: +create.select(concat("A", "B", "C")); + + +
+
+ +
+ General functions + +

+ There are a variety of general functions supported by jOOQ As discussed in the chapter about functions are mostly simulated in your database, in case they are not natively supported. +

+

+ This is a list of general functions supported by jOOQ's : +

+
    +
  • COALESCE: Get the first non-null value in a list of arguments.
  • +
  • NULLIF: Return NULL if both arguments are equal, or the first argument, otherwise.
  • +
  • NVL: Get the first non-null value among two arguments.
  • +
  • NVL2: Get the second argument if the first is null, or the third argument, otherwise.
  • +
+ +

+ Please refer to the for more details. +

+
+
+ +
+ Numeric functions + +

+ Math can be done efficiently in the database before returning results to your Java application. In addition to the discussed previously, jOOQ also supports a variety of numeric functions. As discussed in the chapter about numeric functions (as any function type) are mostly simulated in your database, in case they are not natively supported. +

+

+ This is a list of numeric functions supported by jOOQ's : +

+ +
    +
  • ABS: Get the absolute value of a value.
  • +
  • ACOS: Get the arc cosine of a value.
  • +
  • ASIN: Get the arc sine of a value.
  • +
  • ATAN: Get the arc tangent of a value.
  • +
  • ATAN2: Get the atan2 function of two values.
  • +
  • CEIL: Get the smalles integer value larger than a given numeric value.
  • +
  • COS: Get the cosine of a value.
  • +
  • COSH: Get the hyperbolic cosine of a value.
  • +
  • COT: Get the cotangent of a value.
  • +
  • COTH: Get the hyperbolic cotangent of a value.
  • +
  • DEG: Transform radians into degrees.
  • +
  • EXP: Calculate e^value.
  • +
  • FLOOR: Get the largest integer value smaller than a given numeric value.
  • +
  • GREATEST: Finds the greatest among all argument values (can also be used with non-numeric values).
  • +
  • LEAST: Finds the least among all argument values (can also be used with non-numeric values).
  • +
  • LN: Get the natural logarithm of a value.
  • +
  • LOG: Get the logarithm of a value given a base.
  • +
  • POWER: Calculate value^exponent.
  • +
  • RAD: Transform degrees into radians.
  • +
  • RAND: Get a random number.
  • +
  • ROUND: Rounds a value to the nearest integer.
  • +
  • SIGN: Get the sign of a value (-1, 0, 1).
  • +
  • SIN: Get the sine of a value.
  • +
  • SINH: Get the hyperbolic sine of a value.
  • +
  • SQRT: Calculate the square root of a value.
  • +
  • TAN: Get the tangent of a value.
  • +
  • TANH: Get the hyperbolic tangent of a value.
  • +
  • TRUNC: Truncate the decimals off a given value.
  • +
+ +

+ Please refer to the for more details. +

+
+
+ +
+ Bitwise functions + +

+ Interestingly, bitwise functions and bitwise arithmetic is not very popular among SQL databases. Most databases only support a few bitwise operations, while others ship with the full set of operators. jOOQ's API includes most bitwise operations as listed below. In order to avoid ambiguities with , all bitwise functions are prefixed with "bit" +

+
    +
  • BIT_COUNT: Count the number of bits set to 1 in a number
  • +
  • BIT_AND: Set only those bits that are set in two numbers
  • +
  • BIT_OR: Set all bits that are set in at least one number
  • +
  • BIT_NAND: Set only those bits that are set in two numbers, and inverse the result
  • +
  • BIT_NOR: Set all bits that are set in at least one number, and inverse the result
  • +
  • BIT_NOT: Inverse the bits in a number
  • +
  • BIT_XOR: Set all bits that are set in at exactly one number
  • +
  • BIT_XNOR: Set all bits that are set in at exactly one number, and inverse the result
  • +
  • SHL: Shift bits to the left
  • +
  • SHR: Shift bits to the right
  • +
+ +

Some background about bitwise operation simulation

+

+ As stated before, not all databases support all of these bitwise operations. jOOQ simulates them wherever this is possible. More details can be seen in this blog post:
+ http://blog.jooq.org/2011/10/30/the-comprehensive-sql-bitwise-operations-compatibility-list/ +

+ +
+
+ +
+ String functions + +

+ String formatting can be done efficiently in the database before returning results to your Java application. As discussed in the chapter about string functions (as any function type) are mostly simulated in your database, in case they are not natively supported. +

+

+ This is a list of numeric functions supported by jOOQ's : +

+ +
    +
  • ASCII: Get the ASCII code of a character.
  • +
  • BIT_LENGTH: Get the length of a string in bits.
  • +
  • CHAR_LENGTH: Get the length of a string in characters.
  • +
  • CONCAT: Concatenate several strings.
  • +
  • ESCAPE: Escape a string for use with the .
  • +
  • LENGTH: Get the length of a string.
  • +
  • LOWER: Get a string in lower case letters.
  • +
  • LPAD: Pad a string on the left side.
  • +
  • LTRIM: Trim a string on the left side.
  • +
  • OCTET_LENGTH: Get the length of a string in octets.
  • +
  • POSITION: Find a string within another string.
  • +
  • REPEAT: Repeat a string a given number of times.
  • +
  • REPLACE: Replace a string within another string.
  • +
  • RPAD: Pad a string on the right side.
  • +
  • RTRIM: Trim a string on the right side.
  • +
  • SUBSTRING: Get a substring of a string.
  • +
  • TRIM: Trim a string on both sides.
  • +
  • UPPER: Get a string in upper case letters.
  • +
+ +

+ Please refer to the for more details. +

+ +

Regular expressions, REGEXP, REGEXP_LIKE, etc.

+

+ Various databases have some means of searching through columns using regular expressions if the does not provide sufficient pattern matching power. While there are many different functions and operators in the various databases, jOOQ settled for the SQL:2008 standard REGEX_LIKE operator. Being an operator (and not a function), you should use the corresponding method on : +

+ + + +

+ Note that the SQL standard specifies that patterns should follow the XQuery standards. In the real world, the POSIX regular expression standard is the most used one, some use Java regular expressions, and only a few ones use Perl regular expressions. jOOQ does not make any assumptions about regular expression syntax. For cross-database compatibility, please read the relevant databaes manuals carefully, to learn about the appropriate syntax. Please refer to the for more details. +

+
+ +
+ +
+ Date and time functions + +

+ This is a list of date and time functions supported by jOOQ's : +

+ +
    +
  • CURRENT_DATE: Get current date as a DATE object.
  • +
  • CURRENT_TIME: Get current time as a TIME object.
  • +
  • CURRENT_TIMESTAMP: Get current date as a TIMESTAMP object.
  • +
  • DATE_ADD: Add a number of days or an interval to a date.
  • +
  • DATE_DIFF: Get the difference in days between two dates.
  • +
  • TIMESTAMP_ADD: Add a number of days or an interval to a timestamp.
  • +
  • TIMESTAMP_DIFF: Get the difference as an INTERVAL DAY TO SECOND between two dates.
  • +
+ +

Intervals in jOOQ

+

+ jOOQ fills a gap opened by JDBC, which neglects an important SQL data type as defined by the SQL standards: INTERVAL types. See the manual's section about for more details. +

+
+
+ +
+ System functions + +

+ This is a list of system functions supported by jOOQ's : +

+
    +
  • CURRENT_USER: Get current user.
  • +
+
+
+ +
+ Aggregate functions + +

+ Aggregate functions work just like functions, even if they have a slightly different semantics. Here are some example aggregate functions from the : +

+ + count(); +AggregateFunction count(Field field); +AggregateFunction max (Field field); +AggregateFunction min (Field field); +AggregateFunction sum (Field field); +AggregateFunction avg (Field field); + +// DISTINCT keyword in aggregate functions +AggregateFunction countDistinct(Field field); +AggregateFunction maxDistinct (Field field); +AggregateFunction minDistinct (Field field); +AggregateFunction sumDistinct (Field field); +AggregateFunction avgDistinct (Field field); + +// String aggregate functions +AggregateFunction groupConcat (Field field); +AggregateFunction groupConcatDistinct(Field field); +OrderedAggregateFunction listAgg(Field field); +OrderedAggregateFunction listAgg(Field field, String separator); + +// Statistical functions +AggregateFunction median (Field field); +AggregateFunction stddevPop (Field field); +AggregateFunction stddevSamp(Field field); +AggregateFunction varPop (Field field); +AggregateFunction varSamp (Field field); + +// Linear regression functions +AggregateFunction regrAvgX (Field y, Field x); +AggregateFunction regrAvgY (Field y, Field x); +AggregateFunction regrCount (Field y, Field x); +AggregateFunction regrIntercept(Field y, Field x); +AggregateFunction regrR2 (Field y, Field x); +AggregateFunction regrSlope (Field y, Field x); +AggregateFunction regrSXX (Field y, Field x); +AggregateFunction regrSXY (Field y, Field x); +AggregateFunction regrSYY (Field y, Field x);]]> + +

+ Here's an example, counting the number of books any author has written: +

+ + +SELECT AUTHOR_ID, COUNT(*) +FROM BOOK +GROUP BY AUTHOR_ID +create.select(BOOK.AUTHOR_ID, count()) + .from(BOOK) + .groupBy(BOOK.AUTHOR_ID); + + +

+ Aggregate functions have strong limitations about when they may be used and when not. For instance, you can use aggregate functions in scalar queries. Typically, this means you only select aggregate functions, no or other . Another use case is to use them along with a as seen in the previous example. Note, that jOOQ does not check whether your using of aggregate functions is correct according to the SQL standards, or according to your database's behaviour. +

+ +

Ordered aggregate functions

+

+ Oracle and some other databases support "ordered aggregate functions". This means you can provide an ORDER BY clause to an aggregate function, which will be taken into consideration when aggregating. The best example for this is Oracle's LISTAGG() (also known as GROUP_CONCAT in other ). The following query groups by authors and concatenates their books' titles +

+ +SELECT LISTAGG(TITLE, ', ') + WITHIN GROUP (ORDER BY TITLE) +FROM BOOK +GROUP BY AUTHOR_ID +create.select(listAgg(BOOK.TITLE, ", ") + .withinGroupOrderBy(BOOK.TITLE)) + .from(BOOK) + .groupBy(BOOK.AUTHOR_ID) + + +

+ The above query might yield: +

+ ++---------------------+ +| LISTAGG | ++---------------------+ +| 1984, Animal Farm | +| O Alquimista, Brida | ++---------------------+ + +

FIRST and LAST: Oracle's "ranked" aggregate functions

+

+ Oracle allows for restricting aggregate functions using the KEEP() clause, which is supported by jOOQ. In Oracle, some aggregate functions (MIN, MAX, SUM, AVG, COUNT, VARIANCE, or STDDEV) can be restricted by this clause, hence also allows for specifying it. Here are a couple of examples using this clause: +

+ + +SUM(BOOK.AMOUNT_SOLD) + KEEP(DENSE_RANK FIRST ORDER BY BOOK.AUTHOR_ID) +sum(BOOK.AMOUNT_SOLD) + .keepDenseRankFirstOrderBy(BOOK.AUTHOR_ID) + + +

User-defined aggregate functions

+

+ jOOQ also supports using your own user-defined aggregate functions. See the manual's section about for more details. +

+ +

Window functions / analytical functions

+

+ In those databases that support , jOOQ's can be transformed into a window function / analytical function by calling over() on it. See the manual's section about for more details. +

+
+
+ +
+ Window functions + +

+ Most major RDBMS support the concept of window functions. jOOQ knows of implementations in DB2, Oracle, Postgres, SQL Server, and Sybase SQL Anywhere, and supports most of their specific syntaxes. Note, that H2 and HSQLDB have implemented ROW_NUMBER() functions, without true windowing support. +

+

+ As previously discussed, any can be transformed into a window function using the over() method. See the chapter about for details. In addition to those, there are also some more window functions supported by jOOQ, as declared in the : +

+ + rowNumber(); + WindowOverStep rank(); + WindowOverStep denseRank(); + WindowOverStep percentRank(); + +// Windowing functions + WindowIgnoreNullsStep firstValue(Field field); + WindowIgnoreNullsStep lastValue(Field field) + WindowIgnoreNullsStep lead(Field field); + WindowIgnoreNullsStep lead(Field field, int offset); + WindowIgnoreNullsStep lead(Field field, int offset, T defaultValue); + WindowIgnoreNullsStep lead(Field field, int offset, Field defaultValue); + WindowIgnoreNullsStep lag(Field field); + WindowIgnoreNullsStep lag(Field field, int offset); + WindowIgnoreNullsStep lag(Field field, int offset, T defaultValue); + WindowIgnoreNullsStep lag(Field field, int offset, Field defaultValue); + +// Statistical functions + WindowOverStep cumeDist(); + WindowOverStep ntile(int number);]]> + +

+ SQL distinguishes between various window function types (e.g. "ranking functions"). Depending on the function, SQL expects mandatory PARTITION BY or ORDER BY clauses within the OVER() clause. jOOQ does not enforce those rules for two reasons: +

+
    +
  • Your JDBC driver or database already checks SQL syntax semantics
  • +
  • Not all databases behave correctly according to the SQL standard
  • +
+

+ If possible, however, jOOQ tries to render missing clauses for you, if a given is more restrictive. +

+

Some examples

+

+ Here are some simple examples of window functions with jOOQ: +

+ + +-- Sample uses of ROW_NUMBER() +ROW_NUMBER() OVER() +ROW_NUMBER() OVER(PARTITION BY 1) +ROW_NUMBER() OVER(ORDER BY BOOK.ID) +ROW_NUMBER() OVER(PARTITION BY BOOK.AUTHOR_ID ORDER BY BOOK.ID) + +-- Sample uses of FIRST_VALUE +FIRST_VALUE(BOOK.ID) OVER() +FIRST_VALUE(BOOK.ID IGNORE NULLS) OVER() +FIRST_VALUE(BOOK.ID RESPECT NULLS) OVER() + +// Sample uses of rowNumber() +rowNumber().over() +rowNumber().over().partitionByOne() +rowNumber().over().partitionBy(BOOK.AUTHOR_ID) +rowNumber().over().partitionBy(BOOK.AUTHOR_ID).orderBy(BOOK.ID) + +// Sample uses of firstValue() +firstValue(BOOK.ID).over() +firstValue(BOOK.ID).ignoreNulls().over() +firstValue(BOOK.ID).respectNulls().over() + + + +

An advanced window function example

+

+ Window functions can be used for things like calculating a "running total". The following example fetches transactions and the running total for every transaction going back to the beginning of the transaction table (ordered by booked_at). Window functions are accessible from the previously seen type using the over() method: +

+ + +SELECT booked_at, amount, + SUM(amount) OVER (PARTITION BY 1 + ORDER BY booked_at + ROWS BETWEEN UNBOUNDED PRECEDING + AND CURRENT ROW) AS total + FROM transactions +create.select(t.BOOKED_AT, t.AMOUNT, + sum(t.AMOUNT).over().partitionByOne() + .orderBy(t.BOOKED_AT) + .rowsBetweenUnboundedPreceding() + .andCurrentRow().as("total") + .from(TRANSACTIONS.as("t")); + + + +

Window functions created from ordered aggregate functions

+

+ In the previous chapter about , we have seen the concept of "ordered aggregate functions", such as Oracle's LISTAGG(). These functions have a window function / analytical function variant, as well. For example: +

+ + +SELECT LISTAGG(TITLE, ', ') + WITHIN GROUP (ORDER BY TITLE) + OVER (PARTITION BY BOOK.AUTHOR_ID) +FROM BOOK +create.select(listAgg(BOOK.TITLE, ", ") + .withinGroupOrderBy(BOOK.TITLE) + .over().partitionBy(BOOK.AUTHOR_ID)) + .from(BOOK) + + +

Window functions created from Oracle's FIRST and LAST aggregate functions

+

+ In the previous chapter about , we have seen the concept of "FIRST and LAST aggregate functions". These functions have a window function / analytical function variant, as well. For example: +

+ + +SUM(BOOK.AMOUNT_SOLD) + KEEP(DENSE_RANK FIRST ORDER BY BOOK.AUTHOR_ID) + OVER(PARTITION BY 1) +sum(BOOK.AMOUNT_SOLD) + .keepDenseRankFirstOrderBy(BOOK.AUTHOR_ID) + .over().partitionByOne() + + + +

Window functions created from user-defined aggregate functions

+

+ User-defined aggregate functions also implement , hence they can also be transformed into window functions using over(). This is supported by Oracle in particular. See the manual's section about for more details. +

+
+
+ +
+ Grouping functions + +

ROLLUP() explained in SQL

+

+ The SQL standard defines special functions that can be used in the : the grouping functions. These functions can be used to generate several groupings in a single clause. This can best be explained in SQL. Let's take ROLLUP() for instance: +

+ + + + + + +

+ In English, the ROLLUP() grouping function provides N+1 groupings, when N is the number of arguments to the ROLLUP() function. Each grouping has an additional group field from the ROLLUP() argument field list. The results of the second query might look something like this: +

+ + + +

CUBE() explained in SQL

+

+ CUBE() is different from ROLLUP() in the way that it doesn't just create N+1 groupings, it creates all 2^N possible combinations between all group fields in the CUBE() function argument list. Let's re-consider our second query from before: +

+ + + + + + +

+ The results would then hold: +

+ + + +

GROUPING SETS()

+

+ GROUPING SETS() are the generalised way to create multiple groupings. From our previous examples +

+
    +
  • ROLLUP(AUTHOR_ID, PUBLISHED_IN) corresponds to GROUPING SETS((AUTHOR_ID, PUBLISHED_IN), (AUTHOR_ID), ())
  • +
  • CUBE(AUTHOR_ID, PUBLISHED_IN) corresponds to GROUPING SETS((AUTHOR_ID, PUBLISHED_IN), (AUTHOR_ID), (PUBLISHED_IN), ())
  • +
+

+ This is nicely explained in the SQL Server manual pages about GROUPING SETS() and other grouping functions:
+ http://msdn.microsoft.com/en-us/library/bb510427(v=sql.105) +

+ +

jOOQ's support for ROLLUP(), CUBE(), GROUPING SETS()

+

+ jOOQ fully supports all of these functions, as well as the utility functions GROUPING() and GROUPING_ID(), used for identifying the grouping set ID of a record. The thus includes: +

+ + rollup(Field... fields); +Field cube(Field... fields); +Field groupingSets(Field... fields); +Field groupingSets(Field[]... fields); +Field groupingSets(Collection>... fields); + +// The utility functions generating IDs per GROUPING SET +Field grouping(Field); +Field groupingId(Field...);]]> + +

MySQL's and CUBRID's WITH ROLLUP syntax

+

+ MySQL and CUBRID don't know any grouping functions, but they support a WITH ROLLUP clause, that is equivalent to simple ROLLUP() grouping functions. jOOQ simulates ROLLUP() in MySQL and CUBRID, by rendering this WITH ROLLUP clause. The following two statements mean the same: +

+ + + + + +
+
+ +
+ User-defined functions + +

+ Some databases support user-defined functions, which can be embedded in any SQL statement, if you're using jOOQ's . Let's say you have the following simple function in Oracle SQL: +

+ + + +

+ The above function will be made available from a generated class. You can use it like any other : +

+ + + + + + +

+ Note that user-defined functions returning or data types can also be used wherever can be used, if they are +

+
+
+ +
+ User-defined aggregate functions + +

+ Some databases support user-defined aggregate functions, which can then be used along with or as . An example for such a database is Oracle. With Oracle, you can define the following OBJECT type (the example was taken from the Oracle 11g documentation): +

+ + SELF.MAX THEN + SELF.SECMAX := SELF.MAX; + SELF.MAX := VALUE; + ELSIF VALUE > SELF.SECMAX THEN + SELF.SECMAX := VALUE; + END IF; + RETURN ODCIConst.Success; +END; + +MEMBER FUNCTION ODCIAggregateTerminate(self IN U_SECOND_MAX, returnValue OUT NUMBER, flags IN NUMBER) RETURN NUMBER IS +BEGIN + RETURNVALUE := SELF.SECMAX; + RETURN ODCIConst.Success; +END; + +MEMBER FUNCTION ODCIAggregateMerge(self IN OUT U_SECOND_MAX, ctx2 IN U_SECOND_MAX) RETURN NUMBER IS +BEGIN + IF CTX2.MAX > SELF.MAX THEN + IF CTX2.SECMAX > SELF.SECMAX THEN + SELF.SECMAX := CTX2.SECMAX; + ELSE + SELF.SECMAX := SELF.MAX; + END IF; + SELF.MAX := CTX2.MAX; + ELSIF CTX2.MAX > SELF.SECMAX THEN + SELF.SECMAX := CTX2.MAX; + END IF; + RETURN ODCIConst.Success; +END; +END;]]> + +

+ The above OBJECT type is then available to function declarations as such: +

+ + + +

Using the generated aggregate function

+

+ jOOQ's will detect such aggregate functions and generate them differently from regular . They implement the type, as mentioned in the manual's section about . Here's how you can use the SECOND_MAX() aggregate function with jOOQ: +

+ + + + + +
+
+ +
+ The CASE expression + +

+ The CASE expression is part of the standard SQL syntax. While some RDBMS also offer an IF expression, or a DECODE function, you can always rely on the two types of CASE syntax: +

+ + + + + + +

+ In jOOQ, both syntaxes are supported (The second one is simulated in Derby, which only knows the first one). Unfortunately, both case and else are reserved words in Java. jOOQ chose to use decode() from the Oracle DECODE function, and otherwise(), which means the same as else. +

+ +

+ A CASE expression can be used anywhere where you can place a . For instance, you can SELECT the above expression, if you're selecting from AUTHOR: +

+ +SELECT AUTHOR.FIRST_NAME, [... CASE EXPR ...] AS nationality + FROM AUTHOR + +

The Oracle DECODE() function

+

+ Oracle knows a more succinct, but maybe less readable DECODE() function with a variable number of arguments. This function roughly does the same as the second case expression syntax. jOOQ supports the DECODE() function and simulates it using CASE expressions in all dialects other than Oracle: +

+ + + + + + +

CASE clauses in an ORDER BY clause

+

+ Sort indirection is often implemented with a CASE clause of a SELECT's ORDER BY clause. See the manual's section about the for more details. +

+
+
+ +
+ Sequences and serials + +

+ Sequences implement the interface, providing essentially this functionality: +

+ + currval(); + +// Get a field for the NEXTVAL sequence property +Field nextval();]]> + +

+ So if you have a sequence like this in Oracle: +

+ +CREATE SEQUENCE s_author_id + +

+ You can then use your object directly in a SQL statement as such: +

+ + + +
    +
  • For more information about generated sequences, refer to the manual's section about
  • +
  • For more information about executing standalone calls to sequences, refer to the manual's section about
  • +
+
+
+ +
+ Tuples or row value expressions + +

+ According to the SQL standard, row value expressions can have a degree of more than one. This is commonly used in the , where the VALUES row value constructor allows for providing a row value expression as a source for INSERT data. Row value expressions can appear in various other places, though. They are supported by jOOQ as s / rows. jOOQ's allows for the construction of type-safe s up to the degree / arity of 8. Higher-degree s are supported as well, but without any type-safety. types are modelled as follows: +

+ + Row1 row(T1 t1) { ... } +public static Row2 row(T1 t1, T2 t2) { ... } +public static Row3 row(T1 t1, T2 t2, T3 t3) { ... } +public static Row4 row(T1 t1, T2 t2, T3 t3, T4 t4) { ... } + +// [ ... idem for Row5, Row6, Row7, Row8 ... ] + +// Degrees of more than 8 are supported without type-safety +public static RowN row(Object... values) { ... }]]> + +

Using row value expressions in predicates

+

+ Row value expressions are incompatible with most other , but they can be used as a basis for constructing various , such as , , or the "degree 2 row value expression only" . See the relevant sections for more details about how to use row value expressions in predicates. +

+ +

Using row value expressions in UPDATE statements

+

+ The also supports a variant where row value expressions are updated, rather than single columns. See the relevant section for more details +

+
+
+
+
+ +
+ Conditional expressions + +

+ Conditions or conditional expressions are widely used in SQL and in the jOOQ API. They can be used in +

+
    +
  • The
  • +
  • The (or JOIN .. ON clause, to be precise) of a , ,
  • +
  • The of a , ,
  • +
  • The of a
  • +
  • The of a
  • +
  • The 's ON clause
  • +
+ +

Boolean types in SQL

+

+ Before SQL:1999, boolean types did not really exist in SQL. They were modelled by 0 and 1 numeric/char values. With SQL:1999, true booleans were introduced and are now supported by most databases. In short, these are possible boolean values: +

+
    +
  • 1 or TRUE
  • +
  • 0 or FALSE
  • +
  • NULL or UNKNOWN
  • +
+

+ It is important to know that SQL differs from many other languages in the way it interprets the NULL boolean value. Most importantly, the following facts are to be remembered: +

+
    +
  • [ANY] = NULL yields NULL (not FALSE)
  • +
  • [ANY] != NULL yields NULL (not TRUE)
  • +
  • NULL = NULL yields NULL (not TRUE)
  • +
  • NULL != NULL yields NULL (not FALSE)
  • +
+

+ For simplified NULL handling, please refer to the section about the . +

+

+ Note that jOOQ does not model these values as actual compatible. +

+
+ + +
+ Condition building + +

+ With jOOQ, most are built from , calling various methods on them. For instance, to build a , you can write the following expression: +

+ + + + + + +

Create conditions from the Factory

+

+ There are a few types of conditions, that can be created statically from the . These are: +

+
    +
  • , that allow you to phrase your own SQL string
  • +
  • The , a standalone predicate that creates a conditional expression
  • +
  • Constant TRUE and FALSE conditional expressions
  • +
+ +

Connect conditions using boolean operators

+

+ Conditions can also be connected using as will be discussed in a subsequent chapter. +

+
+
+ +
+ AND, OR, NOT boolean operators + +

+ In SQL, as in most other languages, can be connected using the AND and OR binary operators, as well as the NOT unary operator, to form new conditional expressions. In jOOQ, this is modelled as such: +

+ + + + + + +

+ The above example shows that the number of parentheses in Java can quickly explode. Proper indentation may become crucial in making such code readable. In order to understand how jOOQ composes combined conditional expressions, let's assign component expressions first: +

+ + + +

The Condition API

+

+ Here are all boolean operators on the interface: +

+ +) // Combine conditions with AND. Convenience for adding an exists predicate to the rhs +andNot(Condition) // Combine conditions with AND. Convenience for adding an inverted condition to the rhs +andNotExists(Select) // Combine conditions with AND. Convenience for adding an inverted exists predicate to the rhs + +or(Condition) // Combine conditions with OR +or(String) // Combine conditions with OR. Convenience for adding plain SQL to the right-hand side +or(String, Object...) // Combine conditions with OR. Convenience for adding plain SQL to the right-hand side +or(String, QueryPart...) // Combine conditions with OR. Convenience for adding plain SQL to the right-hand side +orExists(Select) // Combine conditions with OR. Convenience for adding an exists predicate to the rhs +orNot(Condition) // Combine conditions with OR. Convenience for adding an inverted condition to the rhs +orNotExists(Select) // Combine conditions with OR. Convenience for adding an inverted exists predicate to the rhs + +not() // Invert a condition (synonym for Factory.not(Condition)]]> +
+
+ +
+ Comparison predicate + +

+ In SQL, comparison predicates are formed using common comparison operators: +

+
    +
  • = to test for equality
  • +
  • <> or != to test for non-equality
  • +
  • > to test for being strictly greater
  • +
  • >= to test for being greater or equal
  • +
  • < to test for being strictly less
  • +
  • <= to test for being less or equal
  • +
+ +

+ Unfortunately, Java does not support operator overloading, hence these operators are also implemented as methods in jOOQ, like any other SQL syntax elements. The relevant parts of the interface are these: +

+ +); // = (some column expression) +eq or equal(Select); // = (some scalar SELECT statement) +ne or notEqual(T); // <> (some bind value) +ne or notEqual(Field); // <> (some column expression) +ne or notEqual(Select); // <> (some scalar SELECT statement) +lt or lessThan(T); // < (some bind value) +lt or lessThan(Field); // < (some column expression) +lt or lessThan(Select); // < (some scalar SELECT statement) +le or lessOrEqual(T); // <= (some bind value) +le or lessOrEqual(Field); // <= (some column expression) +le or lessOrEqual(Select); // <= (some scalar SELECT statement) +gt or greaterThan(T); // > (some bind value) +gt or greaterThan(Field); // > (some column expression) +gt or greaterThan(Select); // > (some scalar SELECT statement) +ge or greaterOrEqual(T); // >= (some bind value) +ge or greaterOrEqual(Field); // >= (some column expression) +ge or greaterOrEqual(Select); // >= (some scalar SELECT statement)]]> + +

+ Note that every operator is represented by two methods. A verbose one (such as equal()) and a two-character one (such as eq()). Both methods are the same. You may choose either one, depending on your taste. The manual will always use the more verbose one. +

+ +

NULL in jOOQ's comparison predicates

+

+ jOOQ has a special way of dealing with null bind values, when you pass them to comparison predicates equal() and notEqual(). For convenience, jOOQ will render predicates. +

+ +

jOOQ's convenience methods using comparison operators

+

+ In addition to the above, jOOQ provides a few convenience methods for common operations performed on strings using comparison predicates: +

+ + + LOWER('animal farm')]]> + + +
+
+ +
+ Quantified comparison predicate + +

+ If the right-hand side of a turns out to be a non-scalar table subquery, you can wrap that subquery in a quantifier, such as ALL, ANY, or SOME. Note that the SQL standard defines ANY and SOME to be equivalent. jOOQ settled for the more intuitive ANY and doesn't support SOME. Here are some examples, supported by jOOQ: +

+ + + ALL(1920, 1940)]]> + + + +

+ For the example, the right-hand side of the quantified comparison predicates were filled with argument lists. But it is easy to imagine that the source of values results from a . +

+ +

ANY and the IN predicate

+

+ It is interesting to note that the SQL standard defines the in terms of the ANY-quantified predicate. The following two expressions are equivalent: +

+ + + + + + +

+ Typically, the is more readable than the quantified comparison predicate. +

+
+
+ +
+ NULL predicate + +

+ In SQL, you cannot compare NULL with any value using , as the result would yield NULL again, which is neither TRUE nor FALSE (see also the manual's section about ). In order to test a for NULL, use the NULL predicate as such: +

+ + + + + + +
+
+ +
+ DISTINCT predicate + +

+ Some databases support the DISTINCT predicate, which serves as a convenient, NULL-safe . With the DISTINCT predicate, the following truth table can be assumed: +

+
    +
  • [ANY] IS DISTINCT FROM NULL yields TRUE
  • +
  • [ANY] IS NOT DISTINCT FROM NULL yields FALSE
  • +
  • NULL IS DISTINCT FROM NULL yields FALSE
  • +
  • NULL IS NOT DISTINCT FROM NULL yields TRUE
  • +
+

+ For instance, you can compare two fields for distinctness, ignoring the fact that any of the two could be NULL, which would lead to funny results. This is supported by jOOQ as such: +

+ + + + + + +

+ If your database does not natively support the DISTINCT predicate, jOOQ simulates it with an equivalent , modelling the above truth table: +

+ + + + + +
+
+ +
+ BETWEEN predicate + +

+ The BETWEEN predicate can be seen as syntactic sugar for a pair of . According to the SQL standard, the following two predicates are equivalent: +

+ + + += [B] AND [A] <= [C]]]> + + +

+ Note the inclusiveness of range boundaries in the definition of the BETWEEN predicate. Intuitively, this is supported in jOOQ as such: +

+ + + + + + +

BETWEEN SYMMETRIC

+

+ The SQL standard defines the SYMMETRIC keyword to be used along with BETWEEN to indicate that you do not care which bound of the range is larger than the other. A database system should simply swap range bounds, in case the first bound is greater than the second one. jOOQ supports this keyword as well, simulating it if necessary. +

+ + + + + + +

+ The simulation is done trivially: +

+ + + + + + +
+
+ +
+ LIKE predicate + +

+ LIKE predicates are popular for simple wildcard-enabled pattern matching. Supported wildcards in all SQL databases are: +

+
    +
  • _: (single-character wildcard)
  • +
  • %: (multi-character wildcard)
  • +
+

+ With jOOQ, the LIKE predicate can be created from any as such: +

+ + + + + + +

Escaping operands with the LIKE predicate

+

+ Often, your pattern may contain any of the wildcard characters "_" and "%", in case of which you may want to escape them. jOOQ does not automatically escape patterns in like() and notLike() methods. Instead, you can explicitly define an escape character as such: +

+ + + + + + +

+ In the above predicate expressions, the exclamation mark character is passed as the escape character to escape wildcard characters "!_" and "!%", as well as to escape the escape character itself: "!!" +

+

+ Please refer to your database manual for more details about escaping patterns with the LIKE predicate. +

+ +

jOOQ's convenience methods using the LIKE predicate

+

+ In addition to the above, jOOQ provides a few convenience methods for common operations performed on strings using the LIKE predicate. Typical operations are "contains predicates", "starts with predicates", "ends with predicates", etc. Here is the full convenience API wrapping LIKE predicates: +

+ + + + + + +

+ Note, that jOOQ escapes % and _ characters in value in some of the above predicate implementations. For simplicity, this has been omitted in this manual. +

+
+
+ +
+ IN predicate + +

+ In SQL, apart from comparing a value against several values, the IN predicate can be used to create semi-joins or anti-joins. jOOQ knows the following methods on the interface, to construct such IN predicates: +

+ +) // Construct an IN predicate from a collection of bind values +in(T...) // Construct an IN predicate from bind values +in(Field...) // Construct an IN predicate from column expressions +in(Select) // Construct an IN predicate from a subselect +notIn(Collection) // Construct a NOT IN predicate from a collection of bind values +notIn(T...) // Construct a NOT IN predicate from bind values +notIn(Field...) // Construct a NOT IN predicate from column expressions +notIn(Select) // Construct a NOT IN predicate from a subselect]]> + +

+ A sample IN predicate might look like this: +

+ + + + + + + +

NOT IN and NULL values

+

+ Beware that you should probably not have any NULL values in the right hand side of a NOT IN predicate, as the whole expression would evaluate to NULL, which is rarely desired. This can be shown informally using the following reasoning: +

+ +-- The following conditional expressions are formally or informally equivalent +A NOT IN (B, C) +A != ANY(B, C) +A != B AND A != C + +-- Substitute C for NULL, you'll get +A NOT IN (B, NULL) -- Substitute C for NULL +A != B AND A != NULL -- From the above rules +A != B AND NULL -- [ANY] != NULL yields NULL +NULL -- [ANY] AND NULL yields NULL + +

+ A good way to prevent this from happening is to use the for anti-joins, which is NULL-value insensitive. See the manual's section about to see a boolean truth table. +

+
+
+ +
+ EXISTS predicate + +

+ Slightly less intuitive, yet more powerful than the previously discussed is the EXISTS predicate, that can be used to form semi-joins or anti-joins. With jOOQ, the EXISTS predicate can be formed in various ways: +

+
    +
  • From the , using static methods. This is probably the most used case
  • +
  • From a using
  • +
  • From a using , and from other clauses
  • +
+ +

+ An example of an EXISTS predicate can be seen here: +

+ + + + + + +

+ Note that in SQL, the projection of a subselect in an EXISTS predicate is irrelevant. To help you write queries like the above, you can use jOOQ's selectZero() or selectOne() methods +

+ +

Performance of IN vs. EXISTS

+

+ In theory, the two types of predicates can perform equally well. If your database system ships with a sophisticated cost-based optimiser, it will be able to transform one predicate into the other, if you have all necessary constraints set (e.g. referential constraints, not null constraints). However, in reality, performance between the two might differ substantially. An interesting blog post investigating this topic on the MySQL database can be seen here:
+ http://blog.jooq.org/2012/07/27/not-in-vs-not-exists-vs-left-join-is-null-mysql/ +

+
+
+ +
+ OVERLAPS predicate + +

+ When comparing dates, the SQL standard allows for using a special OVERLAPS predicate, which checks whether two date ranges overlap each other. The following can be said: +

+ + + +

The OVERLAPS predicate in jOOQ

+

+ jOOQ supports the OVERLAPS predicate on . The following methods are contained in : +

+ + t1, Field t2); +Condition overlaps(Row2 row);]]> + +

+ This allows for expressing the above predicates as such: +

+ + + +

jOOQ's extensions to the standard

+

+ Unlike the standard (or any database implementing the standard), jOOQ also supports the OVERLAPS predicate for comparing arbitrary . For instance, (1, 3) OVERLAPS (2, 4) will yield true in jOOQ. This is simulated as such +

+ + +
+
+
+
+ +
+ Plain SQL + +

+ A DSL is a nice thing to have, it feels "fluent" and "natural", especially if it models a well-known language, such as SQL. But a DSL is always expressed in a host language (Java in this case), which was not made for exactly the same purposes as its hosted DSL. If it were, then jOOQ would be implemented on a compiler-level, similar to LINQ in .NET. But it's not, and so, the DSL is limited by language constraints of its host language. We have seen many functionalities where the DSL becomes a bit verbose. This can be especially true for: +

+
    +
  • +
  • +
  • +
  • +
+ +

+ You'll probably find other examples. If verbosity scares you off, don't worry. The verbose use-cases for jOOQ are rather rare, and when they come up, you do have an option. Just write SQL the way you're used to! +

+

+ jOOQ allows you to embed SQL as a String into any supported in these contexts: +

+
    +
  • Plain SQL as a
  • +
  • Plain SQL as a
  • +
  • Plain SQL as a
  • +
  • Plain SQL as a
  • +
  • Plain SQL as a
  • +
+ +

The Factory plain SQL API

+

+ Plain SQL API methods are usually overloaded in three ways. Let's look at the condition query part constructor: +

+ + +

+ Please refer to the Javadoc for more details. The following is a more complete listing of plain SQL construction methods from the Factory: +

+ + field(String sql); +Field field(String sql, Object... bindings); +Field field(String sql, QueryPart... parts); + +// A field with a known data type + Field field(String sql, Class type); + Field field(String sql, Class type, Object... bindings); + Field field(String sql, Class type, QueryPart... parts); + Field field(String sql, DataType type); + Field field(String sql, DataType type, Object... bindings); + Field field(String sql, DataType type, QueryPart... parts); + +// A field with a known name (properly escaped) +Field fieldByName(String... fieldName); + Field fieldByName(Class type, String... fieldName); + Field fieldByName(DataType type, String... fieldName) + +// A function + Field function(String name, Class type, Field... arguments); + Field function(String name, DataType type, Field... arguments); + +// A table +Table table(String sql); +Table table(String sql, Object... bindings); +Table table(String sql, QueryPart... parts); + +// A table with a known name (properly escaped) +Table tableByName(String... fieldName); + +// A query without results (update, insert, etc) +Query query(String sql); +Query query(String sql, Object... bindings); +Query query(String sql, QueryPart... parts); + +// A query with results +ResultQuery resultQuery(String sql); +ResultQuery resultQuery(String sql, Object... bindings); +ResultQuery resultQuery(String sql, QueryPart... parts); + +// A query with results. This is the same as resultQuery(...).fetch(); +Result fetch(String sql); +Result fetch(String sql, Object... bindings); +Result fetch(String sql, QueryPart... parts);]]> + +

+ Apart from the general factory methods, plain SQL is also available in various other contexts. For instance, when adding a .where("a = b") clause to a query. Hence, there exist several convenience methods where plain SQL can be inserted usefully. This is an example displaying all various use-cases in one single query: +

+ + LAST_NAME = create.field("a.LAST_NAME"); + +// You can alias your plain SQL fields +Field COUNT1 = create.field("count(*) x"); + +// If you know a reasonable Java type for your field, you +// can also provide jOOQ with that type +Field COUNT2 = create.field("count(*) y", Integer.class); + + // Use plain SQL as select fields +create.select(LAST_NAME, COUNT1, COUNT2) + + // Use plain SQL as aliased tables (be aware of syntax!) + .from("author a") + .join("book b") + + // Use plain SQL for conditions both in JOIN and WHERE clauses + .on("a.id = b.author_id") + + // Bind a variable in plain SQL + .where("b.title != ?", "Brida") + + // Use plain SQL again as fields in GROUP BY and ORDER BY clauses + .groupBy(LAST_NAME) + .orderBy(LAST_NAME);]]> + +

Important things to note about plain SQL!

+

+ There are some important things to keep in mind when using plain SQL: +

+
    +
  • jOOQ doesn't know what you're doing. You're on your own again!
  • +
  • You have to provide something that will be syntactically correct. If it's not, then jOOQ won't know. Only your JDBC driver or your RDBMS will detect the syntax error.
  • +
  • You have to provide consistency when you use variable binding. The number of ? must match the number of variables
  • +
  • Your SQL is inserted into jOOQ queries without further checks. Hence, jOOQ can't prevent SQL injection.
  • +
+ + + +
+ Bind values and parameters + +

+ Bind values are used in SQL / JDBC for various reasons. Among the most obvious ones are: +

+
    +
  • + Protection against SQL injection. Instead of inlining values possibly originating from user input, you bind those values to your prepared statement and let the JDBC driver / database take care of handling security aspects. +
  • +
  • + Increased speed. Advanced databases such as Oracle can keep execution plans of similar queries in a dedicated cache to prevent hard-parsing your query again and again. In many cases, the actual value of a bind variable does not influence the execution plan, hence it can be reused. Preparing a statement will thus be faster +
  • +
  • + On a JDBC level, you can also reuse the SQL string and prepared statement object instead of constructing it again, as you can bind new values to the prepared statement. jOOQ currently does not cache prepared statements, internally. +
  • +
+ +

+ The following sections explain how you can introduce bind values in jOOQ, and how you can control the way they are rendered and bound to SQL. +

+
+ + +
+ Indexed parameters + +

+ JDBC only knows indexed bind values. A typical example for using bind values with JDBC is this: +

+ + + +

+ With dynamic SQL, keeping track of the number of question marks and their corresponding index may turn out to be hard. jOOQ abstracts this and lets you provide the bind value right where it is needed. A trivial example is this: +

+ + + +

+ Note the using of to explicitly create an indexed bind value. You don't have to worry about that index. When the query is , each bind value will render a question mark. When the query , each bind value will generate the appropriate bind value index. +

+ +

Extract bind values from a query

+

+ Should you decide to run the above query outside of jOOQ, using your own , you can do so as follows: +

+ + select = create.select().from(BOOK).where(BOOK.ID.equal(5)).and(BOOK.TITLE.equal("Animal Farm")); + +// Render the SQL statement: +String sql = select.getSQL(); +assertEquals("SELECT * FROM BOOK WHERE ID = ? AND TITLE = ?", sql); + +// Get the bind values: +List values = select.getBindValues(); +assertEquals(2, values.size()); +assertEquals(5, values.get(0)); +assertEquals("Animal Farm", values.get(1));]]> + +

+ You can also extract specific bind values by index from a query, if you wish to modify their underlying value after creating a query. This can be achieved as such: +

+ + select = create.select().from(BOOK).where(BOOK.ID.equal(5)).and(BOOK.TITLE.equal("Animal Farm")); +Param param = select.getParam("2"); + +// You could now modify the Query's underlying bind value: +if ("Animal Farm".equals(param.getValue())) { + param.setConverted("1984"); +}]]> + +

+ For more details about jOOQ's internals, see the manual's section about . +

+ + + +
+ Named parameters + +

+ Some SQL access abstractions that are built on top of JDBC, or some that bypass JDBC may support named parameters. jOOQ allows you to give names to your parameters as well, although those names are not rendered to SQL strings by default. Here is an example of how to create named parameters using the type: +

+ + param1 = query.getParam("lastName"); + +// Or, keep a reference to the typed parameter in order not to lose the type information: +Param param2 = param("lastName", "Poe"); +Query query2 = create.select().from(AUTHOR).where(LAST_NAME.equal(param2)); + +// You can now change the bind value directly on the Param reference: +param2.setValue("Orwell");]]> + +

+ The interface also allows for setting new bind values directly, without accessing the Param type: +

+ + + +

+ In order to actually render named parameter names in generated SQL, use the method: +

+ + + + + +
+
+ +
+ Inlined parameters + +

+ Sometimes, you may wish to avoid rendering bind variables while still using custom values in SQL. jOOQ refers to that as "inlined" bind values. When bind values are inlined, they render the actual value in SQL rather than a JDBC question mark. Bind value inlining can be achieved in two ways: +

+
    +
  • + By using the and setting the to STATIC_STATEMENT. This will inline all bind values for SQL statements rendered from such a Factory. +
  • +
  • + By using methods. +
  • +
+

+ In both cases, your inlined bind values will be properly escaped to avoid SQL syntax errors and SQL injection. Some examples: +

+ + +
+
+ +
+ SQL injection and plain SQL QueryParts + +

+ Special care needs to be taken when using . While jOOQ's API allows you to specify bind values for use with plain SQL, you're not forced to do that. For instance, both of the following queries will lead to the same, valid result: +

+ + + +

+ All methods in the jOOQ API that allow for plain (unescaped, untreated) SQL contain a warning message in their relevant Javadoc, to remind you of the risk of SQL injection in what is otherwise a SQL-injection-safe API. +

+
+
+ + + +
+ QueryParts + +

+ A and all its contained objects is a . QueryParts essentially provide this functionality: +

+
    +
  • they can using the method
  • +
  • they can using the method
  • +
+ +

+ Both of these methods are contained in jOOQ's internal API's , which is internally implemented by every QueryPart. +

+ +

+ The following sections explain some more details about and , as well as other implementation details about QueryParts in general. +

+
+ + +
+ SQL rendering + +

+ Every must implement the method to render its SQL string to a . This RenderContext has two purposes: +

+
    +
  • It provides some information about the "state" of SQL rendering.
  • +
  • It provides a common API for constructing SQL strings on the context's internal
  • +
+

+ An overview of the API is given here: +

+ + + +

+ The following additional methods are inherited from a common , which is shared among and : +

+ + + +

An example of rendering SQL

+

+ A simple example can be provided by checking out jOOQ's internal representation of a (simplified) . It is used for any comparing two fields as for example the AUTHOR.ID = BOOK.AUTHOR_ID condition here: +

+ +-- [...] +FROM AUTHOR +JOIN BOOK ON AUTHOR.ID = BOOK.AUTHOR_ID +-- [...] + +

+ This is how jOOQ renders such a condition: +

+ + + +

+ See the manual's sections about and to learn about how to write your own query parts in order to extend jOOQ. +

+
+
+ +
+ Pretty printing SQL + +

+ As mentioned in the previous chapter about , there are some elements in the that are used for formatting / pretty-printing rendered SQL. In order to obtain pretty-printed SQL, just use the following : +

+ + + + +

+ And then, use the above factory to render pretty-printed SQL: +

+ + + + '1984' +group by "TEST"."AUTHOR"."LAST_NAME" +having count(*) = 2]]> + + +

+ The section about shows an example of how such pretty printing can be used to log readable SQL to the stdout. +

+
+
+ +
+ Variable binding + +

+ Every must implement the method. This BindContext has two purposes: +

+
    +
  • It provides some information about the "state" of the variable binding in process.
  • +
  • It provides a common API for binding values to the context's internal
  • +
+

+ An overview of the API is given here: +

+ + parts) throws DataAccessException; +BindContext bind(QueryPart[] parts) throws DataAccessException; + +// These methods perform the actual variable binding +BindContext bindValue(Object value, Class type) throws DataAccessException; +BindContext bindValues(Object... values) throws DataAccessException;]]> + +

+ Some additional methods are inherited from a common , which is shared among and . Details are documented in the previous chapter about +

+ +

An example of binding values to SQL

+

+ A simple example can be provided by checking out jOOQ's internal representation of a (simplified) . It is used for any comparing two fields as for example the AUTHOR.ID = BOOK.AUTHOR_ID condition here: +

+ +-- [...] +WHERE AUTHOR.ID = ? +-- [...] + +

+ This is how jOOQ binds values on such a condition: +

+ + +

+ See the manual's sections about and to learn about how to write your own query parts in order to extend jOOQ. +

+
+
+ +
+ Extend jOOQ with custom types + +

+ If a SQL clause is too complex to express with jOOQ, you can extend either one of the following types for use directly in a jOOQ query: +

+ + extends AbstractField {} +public abstract class CustomCondition extends AbstractCondition {} +public abstract class CustomTable> extends TableImpl {} +public abstract class CustomRecord> extends TableRecordImpl {}]]> + +

+ These classes are declared public and covered by jOOQ's integration tests. When you extend these classes, you will have to provide your own implementations for the and methods, as discussed before: +

+ + + +

+ The above contract may be a bit tricky to understand at first. The best thing is to check out jOOQ source code and have a look at a couple of QueryParts, to see how it's done. Here's an example showing how to create a field multiplying another field by 2 +

+ + IDx2 = new CustomField(BOOK.ID.getName(), BOOK.ID.getDataType()) { + @Override + public void toSQL(RenderContext context) { + + // In inline mode, render the multiplication directly + if (context.inline()) { + context.sql(BOOK.ID).sql(" * 2"); + } + + // In non-inline mode, render a bind value + else { + context.sql(BOOK.ID).sql(" * ?"); + } + } + + @Override + public void bind(BindContext context) { + try { + + // Manually bind the value 2 + context.statement().setInt(context.nextIndex(), 2); + + // Alternatively, you could also write: + // context.bind(Factory.val(2)); + } + catch (SQLException e) { + throw translate(getSQL(), e); + } + } +}; + +// Use the above field in a SQL statement: +create.select(IDx2).from(BOOK);]]> +
+
+ +
+ Plain SQL QueryParts + +

+ If you don't need the integration of rather complex QueryParts into jOOQ, then you might be safer using simple functionality, where you can provide jOOQ with a simple String representation of your embedded SQL. Plain SQL methods in jOOQ's API come in two flavours. +

+
    +
  • method(String, Object...): This is a method that accepts a SQL string and a list of bind values that are to be bound to the variables contained in the SQL string
  • +
  • method(String, QueryPart...): This is a method that accepts a SQL string and a list of QueryParts that are "injected" at the position of their respective placeholders in the SQL string
  • +
+

+ The above distinction is best explained using an example: +

+ + id = val(5); +Field title = val("Animal Farm"); +create.selectFrom(BOOK).where("BOOK.ID = {0} AND TITLE = {1}", id, title);]]> + +

+ The above technique allows for creating rather complex SQL clauses that are currently not supported by jOOQ, without extending any of the as indicated in the previous chapter. +

+
+
+ +
+ Serializability + +

+ The only transient, non-serializable element in any jOOQ object is the underlying . When you want to execute queries after de-serialisation, or when you want to store/refresh/delete , you will have to "re-attach" them to a Factory +

+ + select = (Select) in.readObject(); + +// This will throw a DetachedException: +select.execute(); + +// In order to execute the above select, attach it first +Factory create = new Factory(connection, SQLDialect.ORACLE); +create.attach(select);]]> + +

Automatically attaching QueryParts

+

+ Another way of attaching QueryParts automatically, or rather providing them with a new at will, is to hook into the . More details about this can be found in the manual's chapter about +

+
+
+
+
+ +
+ SQL building in Scala + +

+ jOOQ-Scala is a maven module used for leveraging some advanced Scala features for those users that wish to use jOOQ with Scala. +

+ +

Using Scala's implicit defs to allow for operator overloading

+

+ The most obvious Scala feature to use in jOOQ are implicit defs for implicit conversions in order to enhance the type with SQL-esque operators. +

+

+ The following depicts a trait which wraps all fields: +

+ +(value : T) : Condition + def <>(value : Field[T]) : Condition + + def >(value : T) : Condition + def >(value : Field[T]) : Condition + + def >=(value : T) : Condition + def >=(value : Field[T]) : Condition + + def <(value : T) : Condition + def <(value : Field[T]) : Condition + + def <=(value : T) : Condition + def <=(value : Field[T]) : Condition + + def <=>(value : T) : Condition + def <=>(value : Field[T]) : Condition +}]]> + +

+ The following depicts a trait which wraps numeric fields: +

+ +>(value : T) : Field[T] + def >>(value : Field[T]) : Field[T] +}]]> + +

+ An example query using such overloaded operators would then look like this: +

+ + 2) +or (T_BOOK.TITLE in ("O Alquimista", "Brida")) +fetch]]> + +

Scala 2.10 Macros

+

+ This feature is still being experimented with. With Scala Macros, it might be possible to inline a true SQL dialect into the Scala syntax, backed by the jOOQ API. Stay tuned! +

+
+
+ + + +
+ SQL execution + +

+ In a previous section of the manual, we've seen how jOOQ can be used to that can be executed with any API including JDBC or ... jOOQ. This section of the manual deals with various means of actually executing SQL with jOOQ. +

+ +

SQL execution with JDBC

+

+ JDBC calls executable objects "". It distinguishes between three types of statements: +

+
    +
  • , or "static statement": This statement type is used for any arbitrary type of SQL statement. It is particularly useful with
  • +
  • : This statement type is used for any arbitrary type of SQL statement. It is particularly useful with (note that JDBC does not support )
  • +
  • : This statement type is used for SQL statements that are "called" rather than "executed". In particular, this includes calls to . Callable statements can register OUT parameters
  • +
+

+ Today, the JDBC API may look weird to users being used to object-oriented design. While statements hide a lot of SQL dialect-specific implementation details quite well, they assume a lot of knowledge about the internal state of a statement. For instance, you can use the method, to add a the prepared statement being created to an "internal list" of batch statements. Instead of returning a new type, this method forces user to reflect on the prepared statement's internal state or "mode". +

+ +

jOOQ is wrapping JDBC

+

+ These things are abstracted away by jOOQ, which exposes such concepts in a more object-oriented way. For more details about jOOQ's batch query execution, see the manual's section about . +

+

+ The following sections of this manual will show how jOOQ is wrapping JDBC for SQL execution +

+
+ + +
+ Comparison between jOOQ and JDBC + +

Similarities with JDBC

+

+ Even if there are , there are a lot of similarities between JDBC and jOOQ. Just to name a few: +

+
    +
  • Both APIs return the number of affected records in non-result queries. JDBC: , jOOQ:
  • +
  • Both APIs return a scrollable result set type from result queries. JDBC: , jOOQ:
  • +
+ +

Differences to JDBC

+

+ Some of the most important differences between JDBC and jOOQ are listed here: +

+
    +
  • : JDBC does not formally distinguish between queries that can return results, and queries that cannot. The same API is used for both. This greatly reduces the possibility for
  • +
  • : While SQL uses the checked , jOOQ wraps all exceptions in an unchecked
  • +
  • : Unlike its JDBC counter-part, this type implements and is fully loaded into Java memory, freeing resources as early as possible. Just like statements, this means that users don't have to deal with a "weird" internal result set state.
  • +
  • : If you want more fine-grained control over how many records are fetched into memory at once, you can still do that using jOOQ's feature
  • +
  • : jOOQ does not formally distinguish between static statements and prepared statements. By default, all statements are prepared statements in jOOQ, internally. Executing a statement as a static statement can be done simply using a
  • +
  • : JDBC keeps open resources even if they are already consumed. With JDBC, there is a lot of verbosity around safely closing resources. In jOOQ, resources are closed after consumption, by default. If you want to keep them open after consumption, you have to explicitly say so.
  • +
+
+
+ +
+ Query vs. ResultQuery + +

+ Unlike JDBC, jOOQ has a lot of knowledge about a SQL query's structure and internals (see the manual's section about ). Hence, jOOQ distinguishes between these two fundamental types of queries. While every can be executed, only can return results (see the manual's section about to learn more about fetching results). With plain SQL, the distinction can be made clear most easily: +

+ + resultQuery = create.resultQuery("SELECT * FROM BOOK"); +Result resultQuery.fetch();]]> +
+
+ +
+ Fetching + +

+ Fetching is something that has been completely neglegted by JDBC and also by various other database abstraction libraries. Fetching is much more than just looping or listing records or mapped objects. There are so many ways you may want to fetch data from a database, it should be considered a first-class feature of any database abstraction API. Just to name a few, here are some of jOOQ's fetching modes: +

+
    +
  • : Sometimes you care about the returned type of your records, sometimes (with arbitrary projections) you don't.
  • +
  • : Instead of letting you transform your result sets into any more suitable data type, a library should do that work for you.
  • +
  • : This is an entirely different fetching paradigm. With Java 8's lambda expressions, this will become even more powerful.
  • +
  • : This is an entirely different fetching paradigm. With Java 8's lambda expressions, this will become even more powerful.
  • +
  • : This is what made Hibernate and JPA so strong. Automatic mapping of tables to custom POJOs.
  • +
  • : It should be easy to distinguish these two fetch modes.
  • +
  • : Some databases allow for returning many result sets from a single query. JDBC can handle this but it's very verbose. A list of results should be returned instead.
  • +
  • : Some queries take too long to execute to wait for their results. You should be able to spawn query execution in a separate process.
  • +
+ +

Convenience and how ResultQuery, Result, and Record share API

+

+ The term "fetch" is always reused in jOOQ when you can fetch data from the database. An provides many overloaded means of fetching data: +

+ +

Various modes of fetching

+

+ These modes of fetching are also documented in subsequent sections of the manual +

+ + fetch(); + +// The "standard" fetch when you know your query returns only one record +R fetchOne(); + +// The "standard" fetch when you only want to fetch the first record +R fetchAny(); + +// Create a "lazy" Cursor, that keeps an open underlying JDBC ResultSet +Cursor fetchLazy(); +Cursor fetchLazy(int fetchSize); + +// Create a java.util.concurrent.Future, to handle asynchronous execution of the ResultQuery +FutureResult fetchLater(); +FutureResult fetchLater(ExecutorService executor); + +// Fetch several results at once +List> fetchMany(); + +// Fetch records into a custom callback +> H fetchInto(H handler); + +// Map records using a custom callback + List fetch(RecordMapper mapper); + +// Execute a ResultQuery with jOOQ, but return a JDBC ResultSet, not a jOOQ object +ResultSet fetchResultSet();]]> + +

Fetch convenience

+

+ These means of fetching are also available from and APIs +

+ + List fetch(Field field); + List fetch(Field field, Class type); + List fetch(Field field, Converter converter); + List fetch(int fieldIndex); + List fetch(int fieldIndex, Class type); + List fetch(int fieldIndex, Converter converter); + List fetch(String fieldName); + List fetch(String fieldName, Class type); + List fetch(String fieldName, Converter converter); + +// These methods are convenience for fetching only a single field, possibly converting results to another type +// Instead of returning lists, these return arrays + T[] fetchArray(Field field); + T[] fetchArray(Field field, Class type); + U[] fetchArray(Field field, Converter converter); + Object[] fetchArray(int fieldIndex); + T[] fetchArray(int fieldIndex, Class type); + U[] fetchArray(int fieldIndex, Converter converter); + Object[] fetchArray(String fieldName); + T[] fetchArray(String fieldName, Class type); + U[] fetchArray(String fieldName, Converter converter); + +// These methods are convenience for fetching only a single field from a single record, +// possibly converting results to another type + T fetchOne(Field field); + T fetchOne(Field field, Class type); + U fetchOne(Field field, Converter converter); + Object fetchOne(int fieldIndex); + T fetchOne(int fieldIndex, Class type); + U fetchOne(int fieldIndex, Converter converter); + Object fetchOne(String fieldName); + T fetchOne(String fieldName, Class type); + U fetchOne(String fieldName, Converter converter);]]> + +

Fetch transformations

+

+ These means of fetching are also available from and APIs +

+ + Map fetchMap(Field key); + Map fetchMap(Field key, Field value); + Map fetchMap(Field key, Class value); + Map fetchMap(Field[] key); + Map fetchMap(Field[] key, Class value); + +// Transform your Result object into maps + List> fetchMaps(); + Map fetchOneMap(); + +// Transform your Result object into groups + Map> fetchGroups(Field key); + Map> fetchGroups(Field key, Field value); + Map> fetchGroups(Field key, Class value); + Map> fetchGroups(Field[] key); + Map> fetchGroups(Field[] key, Class value); + +// Transform your Records into custom POJOs + List fetchInto(Class type); + +// Transform your records into another table type + Result fetchInto(Table table);]]> + +

+ Note, that apart from the methods, all fetch() methods will immediately close underlying JDBC result sets. +

+
+ + +
+ Record vs. TableRecord + +

+ jOOQ understands that SQL is much more expressive than Java, when it comes to the declarative typing of . As a declarative language, SQL allows for creating ad-hoc row value expressions (records with indexed columns) and records (records with named columns). In Java, this is not possible to the same extent. Yet, still, sometimes you wish to use strongly typed records, when you know that you're selecting only from a single table +

+ +

Fetching strongly or weakly typed records

+

+ When fetching data only from a single table, the type is known to jOOQ if you use jOOQ's to generate for your database tables. In order to fetch such strongly typed records, you will have to use the : +

+ + + +

+ When you use the method, jOOQ will return the record type supplied with the argument table. Beware though, that you will no longer be able to use any clause that modifies the type of your . This includes: +

+
    +
  • +
  • +
  • +
  • +
+
+
+ +
+ Arrays, Maps and Lists + +

+ By default, jOOQ returns an object, which is essentially a of . Often, you will find yourself wanting to transform this result object into a type that corresponds more to your specific needs. Or you just want to list all values of one specific column. Here are some examples to illustrate those use cases: +

+ + titles1 = create.select().from(BOOK).fetch().getValues(BOOK.TITLE); +List titles2 = create.select().from(BOOK).fetch(BOOK.TITLE); +String[] titles3 = create.select().from(BOOK).fetchArray(BOOK.TITLE); + +// Fetching only book IDs, converted to Long +List ids1 = create.select().from(BOOK).fetch().getValues(BOOK.ID, Long.class); +List ids2 = create.select().from(BOOK).fetch(BOOK.ID, Long.class); +Long[] ids3 = create.select().from(BOOK).fetchArray(BOOK.ID, Long.class); + +// Fetching book IDs and mapping each ID to their records or titles +Map map1 = create.selectFrom(BOOK).fetch().intoMap(BOOK.ID); +Map map2 = create.selectFrom(BOOK).fetchMap(BOOK.ID); +Map map3 = create.selectFrom(BOOK).fetch().intoMap(BOOK.ID, BOOK.TITLE); +Map map4 = create.selectFrom(BOOK).fetchMap(BOOK.ID, BOOK.TITLE); + +// Group by AUTHOR_ID and list all books written by any author: +Map> group1 = create.selectFrom(BOOK).fetch().intoGroups(BOOK.AUTHOR_ID); +Map> group2 = create.selectFrom(BOOK).fetchGroups(BOOK.AUTHOR_ID); +Map> group3 = create.selectFrom(BOOK).fetch().intoGroups(BOOK.AUTHOR_ID, BOOK.TITLE); +Map> group4 = create.selectFrom(BOOK).fetchGroups(BOOK.AUTHOR_ID, BOOK.TITLE);]]> + +

+ Note that most of these convenience methods are available both through and , some are even available through as well. +

+
+
+ +
+ RecordHandler + +

+ In a more functional operating mode, you might want to write callbacks that receive records from your select statement results in order to do some processing. This is a common data access pattern in Spring's JdbcTemplate, and it is also available in jOOQ. With jOOQ, you can implement your own classes and plug them into jOOQ's : +

+ +() { + @Override + public void next(BookRecord book) { + Util.doThingsWithBook(book); + } + }); + +// Or more concisely +create.selectFrom(BOOK) + .orderBy(BOOK.ID) + .fetchInto(new RecordHandler() {...}); + +// Or even more concisely with Java 8's lambda expressions: +create.selectFrom(BOOK) + .orderBy(BOOK.ID) + .fetchInto(book -> { Util.doThingsWithBook(book); }; ); +]]> + +

+ See also the manual's section about the , which provides similar features +

+
+
+ +
+ RecordMapper + +

+ In a more functional operating mode, you might want to write callbacks that map records from your select statement results in order to do some processing. This is a common data access pattern in Spring's JdbcTemplate, and it is also available in jOOQ. With jOOQ, you can implement your own classes and plug them into jOOQ's : +

+ + ids = +create.selectFrom(BOOK) + .orderBy(BOOK.ID) + .fetch() + .map(new RecordMapper() { + @Override + public Integer map(BookRecord book) { + return book.getId(); + } + }); + +// Or more concisely +create.selectFrom(BOOK) + .orderBy(BOOK.ID) + .fetch(new RecordMapper() {...}); + +// Or even more concisely with Java 8's lambda expressions: +create.selectFrom(BOOK) + .orderBy(BOOK.ID) + .fetch(book -> book.getId()); +]]> + +

+ See also the manual's section about the , which provides similar features +

+
+
+ +
+ POJOs + +

+ Fetching data in records is fine as long as your application is not really layered, or as long as you're still writing code in the DAO layer. But if you have a more advanced application architecture, you may not want to allow for jOOQ artefacts to leak into other layers. You may choose to write POJOs (Plain Old Java Objects) as your primary DTOs (Data Transfer Objects), without any dependencies on jOOQ's types, which may even potentially hold a reference to a , and thus a JDBC . Like Hibernate/JPA, jOOQ allows you to operate with POJOs. Unlike Hibernate/JPA, jOOQ does not "attach" those POJOs or create proxies with any magic in them. +

+

+ If you're using jOOQ's , you can configure it to for you, but you're not required to use those generated POJOs. You can use your own. +

+ +

Using JPA-annotated POJOs

+

+ jOOQ tries to find JPA annotations on your POJO types. If it finds any, they are used as the primary source for mapping meta-information. Only the annotation is used and understood by jOOQ. An example: +

+ + myBooks = create.select().from(BOOK).fetch().into(MyBook.class); +List myBooks = create.select().from(BOOK).fetchInto(MyBook.class);]]> + +

+ Just as with any other JPA implementation, you can put the annotation on any class member, including attributes, setters and getters. Please refer to the Javadoc for more details. +

+ +

Using simple POJOs

+

+ If jOOQ does not find any JPA-annotations, columns are mapped to the "best-matching" constructor, attribute or setter. An example illustrates this: +

+ + myBooks = create.select().from(BOOK).fetch().into(MyBook1.class); +List myBooks = create.select().from(BOOK).fetchInto(MyBook1.class);]]> + +

+ Please refer to the Javadoc for more details. +

+ +

Using "immutable" POJOs

+

+ If jOOQ does not find any default constructor, columns are mapped to the "best-matching" constructor. This allows for using "immutable" POJOs with jOOQ. An example illustrates this: +

+ + myBooks = create.select(BOOK.ID, BOOK.TITLE).from(BOOK).fetch().into(MyBook2.class); +List myBooks = create.select(BOOK.ID, BOOK.TITLE).from(BOOK).fetchInto(MyBook2.class); + +// An "immutable" POJO class with a java.beans.ConstructorProperties annotation +public class MyBook3 { + public final String title; + public final int id; + + @ConstructorProperties({ "title", "id"}) + public MyBook2(String title, int id) { + this.title = title; + this.id = id; + } +} + +// With annotated "immutable" POJO classes, there doesn't need to be an exact match between fields and constructor arguments. +// In the below cases, only BOOK.ID is really set onto the POJO, BOOK.TITLE remains null and BOOK.AUTHOR_ID is ignored +MyBook3 myBook = create.select(BOOK.ID, BOOK.AUTHOR_ID).from(BOOK).fetchAny().into(MyBook3.class); +List myBooks = create.select(BOOK.ID, BOOK.AUTHOR_ID).from(BOOK).fetch().into(MyBook3.class); +List myBooks = create.select(BOOK.ID, BOOK.AUTHOR_ID).from(BOOK).fetchInto(MyBook3.class); +]]> + +

+ Please refer to the Javadoc for more details. +

+ +

Using proxyable types

+

+ jOOQ also allows for fetching data into abstract classes or interfaces, or in other words, "proxyable" types. This means that jOOQ will return a wrapped in a implementing your custom type. An example of this is given here: +

+ + myBooks = create.select(BOOK.ID, BOOK.TITLE).from(BOOK).fetch().into(MyBook3.class); +List myBooks = create.select(BOOK.ID, BOOK.TITLE).from(BOOK).fetchInto(MyBook3.class);]]> + +

+ Please refer to the Javadoc for more details. +

+ +

Loading POJOs back into Records to store them

+

+ The above examples show how to fetch data into your own custom POJOs / DTOs. When you have modified the data contained in POJOs, you probably want to store those modifications back to the database. An example of this is given here: +

+ + + +

+ Note: Because of your manual setting of ID = 10, jOOQ's store() method will asume that you want to insert a new record. See the manual's section about for more details on this. +

+ +

Interaction with DAOs

+

+ If you're using jOOQ's , you can configure it to for you. Those DAOs operate on . An example of using such a DAO is given here: +

+ + + +

More complex data structures

+

+ jOOQ currently doesn't support more complex data structures, the way Hibernate/JPA attempt to map relational data onto POJOs. While future developments in this direction are not excluded, jOOQ claims that generic mapping strategies lead to an enormous additional complexity that only serves very few use cases. You are likely to find a solution using any of jOOQ's various , with only little boiler-plate code on the client side. +

+
+
+ +
+ Lazy fetching + +

+ Unlike JDBC's , jOOQ's does not represent an open database cursor with various fetch modes and scroll modes, that needs to be closed after usage. jOOQ's results are simple in-memory Java objects, containing all of the result values. If your result sets are large, or if you have a lot of network latency, you may wish to fetch records one-by-one, or in small chunks. jOOQ supports a type for that purpose. In order to obtain such a reference, use the method. An example is given here: +

+ + cursor = null; + +try { + cursor = create.selectFrom(BOOK).fetchLazy(); + + // Cursor has similar methods as Iterator + while (cursor.hasNext()) { + BookRecord book = cursor.fetchOne(); + + Util.doThingsWithBook(book); + } +} + +// Close the cursor and the cursor's underlying JDBC ResultSet +finally { + if (cursor != null) { + cursor.close(); + } +}]]> + +

+ As a holds an internal reference to an open , it may need to be closed at the end of iteration. If a cursor is completely scrolled through, it will conveniently close the underlying ResultSet. However, you should not rely on that. +

+ +

Cursors ship with all the other fetch features

+

+ Like or , gives access to all of the other fetch features that we've seen so far, i.e. +

+
    +
  • : Cursors are also typed with the <R> type, allowing to fetch custom, generated or plain types.
  • +
  • : You can use your own callbacks to receive lazily fetched records.
  • +
  • : You can use your own callbacks to map lazily fetched records.
  • +
  • : You can fetch data into your own custom POJO types.
  • +
+
+
+ +
+ Many fetching + +

+ Many databases support returning several result sets, or cursors, from single queries. An example for this is Sybase ASE's sp_help command: +

+ sp_help 'author' + ++--------+-----+-----------+-------------+-------------------+ +|Name |Owner|Object_type|Object_status|Create_date | ++--------+-----+-----------+-------------+-------------------+ +| author|dbo |user table | -- none -- |Sep 22 2011 11:20PM| ++--------+-----+-----------+-------------+-------------------+ + ++-------------+-------+------+----+-----+-----+ +|Column_name |Type |Length|Prec|Scale|... | ++-------------+-------+------+----+-----+-----+ +|id |int | 4|NULL| NULL| 0| +|first_name |varchar| 50|NULL| NULL| 1| +|last_name |varchar| 50|NULL| NULL| 0| +|date_of_birth|date | 4|NULL| NULL| 1| +|year_of_birth|int | 4|NULL| NULL| 1| ++-------------+-------+------+----+-----+-----+]]> + + +

+ The correct (and verbose) way to do this with JDBC is as follows: +

+ + + +

+ As previously discussed in the chapter about , jOOQ does not rely on an internal state of any JDBC object, which is "externalised" by Javadoc. Instead, it has a straight-forward API allowing you to do the above in a one-liner: +

+ +> results = create.fetchMany("sp_help 'author'");]]> + +

+ Using generics, the resulting structure is immediately clear. +

+
+
+ +
+ Later fetching + +

+ Some queries take very long to execute, yet they are not crucial for the continuation of the main program. For instance, you could be generating a complicated report in a Swing application, and while this report is being calculated in your database, you want to display a background progress bar, allowing the user to pursue some other work. This can be achived simply with jOOQ, by creating a , a type that extends . An example is given here: +

+ + future = create.selectFrom(BOOK).where(... complex predicates ...).fetchLater(); + +// This example actively waits for the result to be done +while (!future.isDone()) { + progressBar.increment(1); + Thread.sleep(50); +} + +// The result should be ready, now +Result result = future.get();]]> + +

+ Note, that instead of letting jOOQ spawn a new thread, you can also provide jOOQ with your own : +

+ + future = create.selectFrom(BOOK).where(... complex predicates ...).fetchLater(service);]]> + +
+
+ +
+ ResultSet fetching + +

+ When interacting with legacy applications, you may prefer to have jOOQ return a , rather than jOOQ's own types. This can be done simply, in two ways: +

+ + + +

Transform jOOQ's Result into a JDBC ResultSet

+

+ Instead of operating on a JDBC ResultSet holding an open resource from your database, you can also let jOOQ's wrap itself in a . The advantage of this is that the so-created ResultSet has no open connection to the database. It is a completely in-memory ResultSet: +

+ + result = create.selectFrom(BOOK).fetch(); +ResultSet rs = result.intoResultSet();]]> + +

The inverse: Fetch data from a legacy ResultSet using jOOQ

+

+ The inverse of the above is possible too. Maybe, a legacy part of your application produces JDBC , and you want to turn them into a : +

+ + result = create.fetch(rs); + +// As a Cursor +Cursor cursor = create.fetchLazy(rs);]]> + +
+
+ +
+ Data type conversion + +

+ Apart from a few extra features (), jOOQ only supports basic types as supported by the JDBC API. In your application, you may choose to transform these data types into your own ones, without writing too much boiler-plate code. This can be done using jOOQ's types. A converter essentially allows for two-way conversion between two Java data types <T> and <U>. By convention, the <T> type corresponds to the type in your database whereas the >U> type corresponds to your own user type. The Converter API is given here: +

+ + extends Serializable { + + /** + * Convert a database object to a user object + */ + U from(T databaseObject); + + /** + * Convert a user object to a database object + */ + T to(U userObject); + + /** + * The database type + */ + Class fromType(); + + /** + * The user type + */ + Class toType(); +}]]> + +

+ Such a converter can be used in many parts of the jOOQ API. Some examples have been illustrated in the manual's section about . +

+ +

A Converter for GregorianCalendar

+

+ Here is a some more elaborate example involving a Converter for : +

+ + { + + @Override + public GregorianCalendar from(Timestamp databaseObject) { + GregorianCalendar calendar = (GregorianCalendar) Calendar.getInstance(); + calendar.setTimeInMillis(databaseObject.getTime()); + return calendar; + } + + @Override + public Timestamp to(GregorianCalendar userObject) { + return new Timestamp(userObject.getTime().getTime()); + } + + @Override + public Class fromType() { + return Timestamp.class; + } + + @Override + public Class toType() { + return GregorianCalendar.class; + } +} + +// Now you can fetch calendar values from jOOQ's API: +List dates1 = create.selectFrom(BOOK).fetch().getValues(BOOK.PUBLISHING_DATE, new CalendarConverter()); +List dates2 = create.selectFrom(BOOK).fetch(BOOK.PUBLISHING_DATE, new CalendarConverter()); +]]> + +

Enum Converters

+

+ jOOQ ships with a built-in default , that you can use to map VARCHAR values to enum literals or NUMBER values to enum ordinals (both modes are supported). Let's say, you want to map a YES / NO / MAYBE column to a custom Enum: +

+ + { + public YNMConverter() { + super(String.class, YNM.class); + } +} + +// And you're all set for converting records to your custom Enum: +for (BookRecord book : create.selectFrom(BOOK).fetch()) { + switch (book.getValue(BOOK.I_LIKE, new YNMConverter())) { + case YES: System.out.println("I like this book : " + book.getTitle()); break; + case NO: System.out.println("I didn't like this book : " + book.getTitle()); break; + case MAYBE: System.out.println("I'm not sure about this book : " + book.getTitle()); break; + } +}]]> + +

Using Converters in generated source code

+

+ jOOQ also allows for generated source code to reference your own custom converters, in order to permanently replace a <T> type by your own, custom <U> type. See the manual's section about for details. +

+
+
+
+
+ +
+ Static statements vs. Prepared Statements + +

+ With JDBC, you have full control over your SQL statements. You can decide yourself, if you want to execute a static without bind values, or a with (or without) bind values. But you have to decide early, which way to go. And you'll have to prevent SQL injection and syntax errors manually, when inlining your bind variables. +

+

+ With jOOQ, this is easier. As a matter of fact, it is plain simple. With jOOQ, you can just set a flag in your , and all queries produced by that factory will be executed as static statements, with all bind values inlined. An example is given here: +

+ + + + + + +

Reasons for choosing one or the other

+

+ Not all databases are equal. Some databases show improved performance if you use , as the database will then be able to re-use execution plans for identical SQL statements, regardless of actual bind values. This heavily improves the time it takes for soft-parsing a SQL statement. In other situations, assuming that bind values are irrelevant for SQL execution plans may be a bad idea, as you might run into "bind value peeking" issues. You may be better off spending the extra cost for a new hard-parse of your SQL statement and instead having the database fine-tune the new plan to the concrete bind values. +

+

+ Whichever aproach is more optimal for you cannot be decided by jOOQ. In most cases, prepared statements are probably better. But you always have the option of forcing jOOQ to render inlined bind values. +

+ +

Inlining bind values on a per-bind-value basis

+

+ Note that you don't have to inline all your bind values at once. If you know that a bind value is not really a variable and should be inlined explicitly, you can do so by using , as documented in the manual's section about +

+
+
+ +
+ Reusing a Query's PreparedStatement + +

+ As previously discussed in the chapter about , reusing PreparedStatements is handled a bit differently in jOOQ from how it is handled in JDBC +

+ +

Keeping open PreparedStatements with JDBC

+

+ With JDBC, you can easily reuse a by not closing it between subsequent executions. An example is given here: +

+ + + +

+ The above technique can be quite useful when you want to reuse expensive database resources. This can be the case when your statement is executed very frequently and your database would take non-negligible time to soft-parse the prepared statement and generate a new statement / cursor resource. +

+ +

Keeping open PreparedStatements with jOOQ

+

+ This is also modeled in jOOQ. However, the difference to JDBC is that closing a statement is the default action, whereas keeping it open has to be configured explicitly. This is better than JDBC, because the default action should be the one that is used most often. Keeping open statements is rarely done in average applications. Here's an example of how to keep open PreparedStatements with jOOQ: +

+ + query = create.selectOne().keepStatement(true); + +// Execute the query twice, against the same underlying PreparedStatement: +try { + Result result1 = query.fetch(); // This will lazily create a new PreparedStatement + Result result2 = query.fetch(); // This will reuse the previous PreparedStatement +} + +// ... but now, you must not forget to close the query +finally { + query.close(); +}]]> + +

+ The above example shows how a query can be executed twice against the same underlying PreparedStatement. Unlike in other execution scenarios, you must not forget to close this query now +

+
+
+ +
+ Using JDBC batch operations + +

+ With JDBC, you can easily execute several statements at once using the addBatch() method. Essentially, there are two modes in JDBC +

+ +
    +
  • Execute several queries without bind values
  • +
  • Execute one query several times with bind values
  • +
+ +

+ In code, this looks like the following snippet: +

+ + + +

This will also be supported by jOOQ

+

+ jOOQ supports executing queries in batch mode as follows: +

+ + +
+
+ +
+ Sequence execution + +

+ Most databases support sequences of some sort, to provide you with unique values to be used for primary keys and other enumerations. If you're using jOOQ's , it will generate a sequence object per sequence for you. There are two ways of using such a sequence object: +

+ +

Standalone calls to sequences

+

+ Instead of actually phrasing a select statement, you can also use the convenience methods: +

+ + + +

Inlining sequence references in SQL

+

+ You can inline sequence references in jOOQ SQL statements. The following are examples of how to do that: +

+ + + +

+ For more info about inlining sequence references in SQL statements, please refer to the manual's section about . +

+
+
+ +
+ Stored procedures and functions + +

+ Many RDBMS support the concept of "routines", usually calling them procedures and/or functions. These concepts have been around in programming languages for a while, also outside of databases. Famous languages distinguishing procedures from functions are: +

+
    +
  • Ada
  • +
  • BASIC
  • +
  • Pascal
  • +
  • etc...
  • +
+

+ The general distinction between (stored) procedures and (stored) functions can be summarised like this: +

+ +

Procedures

+
    +
  • Are called using JDBC CallableStatement
  • +
  • Have no return value
  • +
  • Usually support OUT parameters
  • +
+ +

Functions

+
    +
  • Can be used in SQL statements
  • +
  • Have a return value
  • +
  • Usually don't support OUT parameters
  • +
+ +

Exceptions to these rules

+
    +
  • DB2, H2, and HSQLDB don't allow for JDBC escape syntax when calling functions. Functions must be used in a SELECT statement
  • +
  • H2 only knows functions (without OUT parameters)
  • +
  • Oracle functions may have OUT parameters
  • +
  • Oracle knows functions that must not be used in SQL statements for transactional reasons
  • +
  • Postgres only knows functions (with all features combined). OUT parameters can also be interpreted as return values, which is quite elegant/surprising, depending on your taste
  • +
  • The Sybase jconn3 JDBC driver doesn't handle null values correctly when using the JDBC escape syntax on functions
  • +
+

+ In general, it can be said that the field of routines (procedures / functions) is far from being standardised in modern RDBMS even if the SQL:2008 standard specifies things quite well. Every database has its ways and JDBC only provides little abstraction over the great variety of procedures / functions implementations, especially when advanced data types such as cursors / UDT's / arrays are involved. +

+

+ To simplify things a little bit, jOOQ handles both procedures and functions the same way, using a more general type. +

+ +

Using jOOQ for standalone calls to stored procedures and functions

+

+ If you're using jOOQ's , it will generate objects for you. Let's consider the following example: +

+ + + +

+ The generated artefacts can then be used as follows: +

+ + + +

+ But you can also call the procedure using a generated convenience method in a global Routines class: +

+ + + +

+ For more details about for procedures, see the manual's section about . +

+ +

Inlining stored function references in SQL

+

+ Unlike procedures, functions can be inlined in SQL statements to generate or , if you're using . Assume you have a function like this: +

+ + + +

+ The generated artefacts can then be used as follows: +

+ + + + + + +

+ For more info about inlining stored function references in SQL statements, please refer to the manual's section about . +

+
+ + +
+ Oracle Packages + +

+ Oracle uses the concept of a PACKAGE to group several procedures/functions into a sort of namespace. The SQL 92 standard talks about "modules", to represent this concept, even if this is rarely implemented as such. This is reflected in jOOQ by the use of Java sub-packages in the destination package. Every Oracle package will be reflected by +

+
    +
  • A Java package holding classes for formal Java representations of the procedure/function in that package
  • +
  • A Java class holding convenience methods to facilitate calling those procedures/functions
  • +
+

+ Apart from this, the generated source code looks exactly like the one for standalone procedures/functions. +

+

+ For more details about for procedures and packages see the manual's section about . +

+
+
+ +
+ Oracle member procedures + +

+ Oracle UDTs can have object-oriented structures including member functions and procedures. With Oracle, you can do things like this: +

+ + + +

+ These member functions and procedures can simply be mapped to Java methods: +

+ + + +

+ For more details about for UDTs see the manual's section about . +

+
+
+
+
+ +
+ Exporting to XML, CSV, JSON, HTML, Text + +

+ If you are using jOOQ for scripting purposes or in a slim, unlayered application server, you might be interested in using jOOQ's exporting functionality (see also the ). You can export any Result<Record> into the formats discussed in the subsequent chapters of the manual +

+
+ + +
+ Exporting XML + + +// Fetch books and format them as XML +String xml = create.selectFrom(BOOK).fetch().formatXML(); + +

+ The above query will result in an XML document looking like the following one: +

+ + + + + + + + + + 1 + 1 + 1984 + + + 2 + 1 + Animal Farm + + +]]> + +

+ The same result as an can be obtained using the Result.intoXML() method: +

+ + +// Fetch books and format them as XML +Document xml = create.selectFrom(BOOK).fetch().intoXML(); + +

+ See the XSD schema definition here, for a formal definition of the XML export format:
+ http://www.jooq.org/xsd/jooq-export-1.6.2.xsd +

+
+
+ +
+ Exporting CSV + + +// Fetch books and format them as CSV +String csv = create.selectFrom(BOOK).fetch().formatCSV(); + +

+ The above query will result in a CSV document looking like the following one: +

+ +ID,AUTHOR_ID,TITLE +1,1,1984 +2,1,Animal Farm + +

+ In addition to the standard behaviour, you can also specify a separator character, as well as a special string to represent NULL values (which cannot be represented in standard CSV): +

+ +// Use ";" as the separator character +String csv = create.selectFrom(BOOK).fetch().formatCSV(';'); + +// Specify "{null}" as a representation for NULL values +String csv = create.selectFrom(BOOK).fetch().formatCSV(';', "{null}"); + +
+
+ +
+ Exporting JSON + + +// Fetch books and format them as JSON +String json = create.selectFrom(BOOK).fetch().formatJSON(); + +

+ The above query will result in a JSON document looking like the following one: +

+ +{"fields":[{"name":"field-1","type":"type-1"}, + {"name":"field-2","type":"type-2"}, + ..., + {"name":"field-n","type":"type-n"}], + "records":[[value-1-1,value-1-2,...,value-1-n], + [value-2-1,value-2-2,...,value-2-n]]} + +

+ Note: This format has changed in jOOQ 2.6.0 +

+
+
+ +
+ Exporting HTML + +// Fetch books and format them as HTML +String html = create.selectFrom(BOOK).fetch().formatHTML(); + +

+ The above query will result in an HTML document looking like the following one +

+ + + + + ID + AUTHOR_ID + TITLE + + + + + 1 + 1 + 1984 + + + 2 + 1 + Animal Farm + + +]]> + +
+
+ +
+ Exporting Text + + +// Fetch books and format them as text +String text = create.selectFrom(BOOK).fetch().format(); + +

+ The above query will result in a text document looking like the following one +

+ ++---+---------+-----------+ +| ID|AUTHOR_ID|TITLE | ++---+---------+-----------+ +| 1| 1|1984 | +| 2| 1|Animal Farm| ++---+---------+-----------+ + +

+ A simple text representation can also be obtained by calling toString() on a Result object. See also the manual's section about +

+
+
+
+
+ +
+ Importing data + +

+ If you are using jOOQ for scripting purposes or in a slim, unlayered application server, you might be interested in using jOOQ's importing functionality (see also exporting functionality). You can import data directly into a table from the formats described in the subsequent sections of this manual. +

+
+ + +
+ Importing CSV + + +

+ The below CSV data represents two author records that may have been exported previously, by jOOQ's , and then modified in Microsoft Excel or any other spreadsheet tool: +

+ +ID;AUTHOR_ID;TITLE +1;1;1984 +2;1;Animal Farm + +

+ With jOOQ, you can load this data using various parameters from the loader API. A simple load may look like this: +

+ +Factory create = new Factory(connection, dialect); + +// Load data into the AUTHOR table from an input stream +// holding the CSV data. +create.loadInto(AUTHOR) + .loadCSV(inputstream) + .fields(ID, AUTHOR_ID, TITLE) + .execute(); + +

+ Here are various other examples: +

+ +// Ignore the AUTHOR_ID column from the CSV file when inserting +create.loadInto(AUTHOR) + .loadCSV(inputstream) + .fields(ID, null, TITLE) + .execute(); + +// Specify behaviour for duplicate records. +create.loadInto(AUTHOR) + + // choose any of these methods + .onDuplicateKeyUpdate() + .onDuplicateKeyIgnore() + .onDuplicateKeyError() // the default + + .loadCSV(inputstream) + .fields(ID, null, TITLE) + .execute(); + +// Specify behaviour when errors occur. +create.loadInto(AUTHOR) + + // choose any of these methods + .onErrorIgnore() + .onErrorAbort() // the default + + .loadCSV(inputstream) + .fields(ID, null, TITLE) + .execute(); + +// Specify transactional behaviour where this is possible +// (e.g. not in container-managed transactions) +create.loadInto(AUTHOR) + + // choose any of these methods + .commitEach() + .commitAfter(10) + .commitAll() + .commitNone() // the default + + .loadCSV(inputstream) + .fields(ID, null, TITLE) + .execute(); + +

+ Any of the above configuration methods can be combined to achieve the type of load you need. Please refer to the API's Javadoc to learn about more details. Errors that occur during the load are reported by the execute method's result: +

+ + loader = /* .. */ .execute(); + +// The number of processed rows +int processed = loader.processed(); + +// The number of stored rows (INSERT or UPDATE) +int stored = loader.stored(); + +// The number of ignored rows (due to errors, or duplicate rule) +int ignored = loader.ignored(); + +// The errors that may have occurred during loading +List errors = loader.errors(); +LoaderError error = errors.get(0); + +// The exception that caused the error +DataAccessException exception = error.exception(); + +// The row that caused the error +int rowIndex = error.rowIndex(); +String[] row = error.row(); + +// The query that caused the error +Query query = error.query();]]> + +
+
+ +
+ Importing XML + +

This is not yet supported

+
+
+
+
+ +
+ CRUD with UpdatableRecords + +

+ Your database application probably consists of 50% - 80% CRUD, whereas only the remaining 20% - 50% of querying is actual querying. Most often, you will operate on records of tables without using any advanced relational concepts. This is called CRUD for +

+
    +
  • Create ()
  • +
  • Read ()
  • +
  • Update ()
  • +
  • Delete ()
  • +
+

+ CRUD always uses the same patterns, regardless of the nature of underlying tables. This again, leads to a lot of boilerplate code, if you have to issue your statements yourself. Like Hibernate / JPA and other ORMs, jOOQ facilitates CRUD using a specific API involving types. +

+ +

Primary keys and updatability

+

+ In normalised databases, every table has a primary key by which a tuple/record within that table can be uniquely identified. In simple cases, this is a (possibly auto-generated) number called ID. But in many cases, primary keys include several non-numeric columns. An important feature of such keys is the fact that in most databases, they are enforced using an index that allows for very fast random access to the table. A typical way to access / modify / delete a book is this: +

+ + + +

+ Normalised databases assume that a primary key is unique "forever", i.e. that a key, once inserted into a table, will never be changed or re-inserted after deletion. In order to use jOOQ's operations correctly, you should design your database accordingly. +

+ +

Main UNIQUE keys

+

+ In SQL, a primary key is always also a unique key. In fact, unique keys have very similar properties as primary keys. For instance, they can be referenced from other tables' foreign keys in most databases. In the absence of a formal primary key, jOOQ assumes that the first unique key it encounters will serve as a primary key substitute. This is called the "main key" in jOOQ. In other words, a main key is: +

+
    +
  • The primary key, if available
  • +
  • The first unique key, otherwise
  • +
+ +

+ For simplicity, the term "primary key" will be used in the sense of such a "main unique key" in this manual. +

+
+ + +
+ Simple CRUD + +

+ If you're using jOOQ's , it will generate implementations for every table that has a primary key. When such a record form the database, these records are "attached" to the that created them. This means that they hold an internal reference to the same database connection that was used to fetch them. This connection is used internally by any of the following methods of the UpdatableRecord: +

+ + + +

+ See the manual's section about for some more insight on "attached" objects. +

+ +

Storing

+

+ Storing a record will perform an or an . In general, new records are always inserted, whereas records loaded from the database are always updated. This is best visualised in code: +

+ + + +

+ Some remarks about storing: +

+
    +
  • jOOQ sets only modified values in or . This allows for default values to be applied to inserted records, as specified in CREATE TABLE DDL statements.
  • +
  • When store() performs an , jOOQ attempts to load any generated keys from the database back into the record. For more details, see the manual's section about .
  • +
  • When loading records from , jOOQ will assume the record is a new record. It will hence attempt to INSERT it.
  • +
  • When you activate , storing a record may fail, if the underlying database record has been changed in the mean time.
  • +
+ +

Deleting

+

+ Deleting a record will remove it from the database. Here's how you delete records: +

+ + + +

Refreshing

+

+ Refreshing a record from the database means that jOOQ will issue a to refresh all record values that are not the primary key. This is particularly useful when you use jOOQ's feature, in case a modified record is "stale" and cannot be stored to the database, because the underlying database record has changed in the mean time. +

+

+ In order to perform a refresh, use the following Java code: +

+ + + +

CRUD and SELECT statements

+

+ CRUD operations can be combined with regular querying, if you select records from single database tables, as explained in the manual's section about . For this, you will need to use the selectFrom() method from the : +

+ + +
+
+ +
+ IDENTITY values + +

+ Many databases support the concept of IDENTITY values, or key values. This is reflected by JDBC's method. jOOQ abstracts using this method as many databases and JDBC drivers behave differently with respect to generated keys. Let's assume the following SQL Server BOOK table: +

+ + + +

+ If you're using jOOQ's , the above table will generate a with an IDENTITY column. This information is used by jOOQ internally, to update IDs after calling : +

+ + + +

Database compatibility

+

+ DB2, Derby, HSQLDB, Ingres +

+

+ These SQL dialects implement the standard very neatly. +

+ + +

+ H2, MySQL, Postgres, SQL Server, Sybase ASE, Sybase SQL Anywhere +

+

+ These SQL dialects implement identites, but the DDL syntax doesn’t follow the standard +

+ + +

+ Oracle +

+

+ Oracle does not know any identity columns at all. Instead, you will have to use a trigger and update the ID column yourself, using a custom sequence. Something along these lines: +

+ + +

+ Note, that this approach can be employed in most databases supporting sequences and triggers! It is a lot more flexible than standard identities +

+
+
+ + + +
+ Non-updatable records + +

+ Tables without UNIQUE keys are considered non-updatable by jOOQ, as jOOQ has no way of uniquely identifying such a record within the database. If you're using jOOQ's , such tables will generate classes, instead of classes. When you fetch from such a table, the returned records will not allow for calling any of the methods. +

+ +

+ Note, that some databases use internal rowid or object-id values to identify such records. jOOQ does not support these vendor-specific record meta-data. +

+
+
+ +
+ Optimistic locking + +

+ jOOQ allows you to perform operations using optimistic locking. You can immediately take advantage of this feature by activating the relevant . Without any further knowledge of the underlying data semantics, this will have the following impact on store() and delete() methods: +

+
    +
  • INSERT statements are not affected by this Setting flag
  • +
  • Prior to UPDATE or DELETE statements, jOOQ will run a statement, pessimistically locking the record for the subsequent UPDATE / DELETE
  • +
  • The data fetched with the previous SELECT will be compared against the data in the record being stored or deleted
  • +
  • An is thrown if the record had been modified in the mean time
  • +
  • The record is successfully stored / deleted, if the record had not been modified in the mean time.
  • +
+

+ The above changes to jOOQ's behaviour are transparent to the API, the only thing you need to do for it to be activated is to set the Settings flag. Here is an example illustrating optimistic locking: +

+ + + +

Optimised optimistic locking using TIMESTAMP fields

+

+ If you're using jOOQ's , you can take indicate TIMESTAMP or UPDATE COUNTER fields for every generated table in the . Let's say we have this table: +

+ + + +

+ The MODIFIED column will contain a timestamp indicating the last modification timestamp for any book in the BOOK table. If you're using jOOQ and it's , jOOQ will then generate this TIMESTAMP value for you, automatically. However, instead of running an additional statement prior to an UPDATE or DELETE statement, jOOQ adds a WHERE-clause to the UPDATE or DELETE statement, checking for TIMESTAMP's integrity. This can be best illustrated with an example: +

+ + + +

+ As before, without the added TIMESTAMP column, optimistic locking is transparent to the API. +

+ +

Optimised optimistic locking using VERSION fields

+

+ Instead of using TIMESTAMPs, you may also use numeric VERSION fields, containing version numbers that are incremented by jOOQ upon store() calls. +

+ +

+ Note, for explicit pessimistic locking, please consider the manual's section about the . For more details about how to configure TIMESTAMP or VERSION fields, consider the manual's section about . +

+
+
+ +
+ Batch execution + +

+ When inserting, updating, deleting a lot of records, you may wish to profit from JDBC batch operations, which can be performed by jOOQ. These are available through jOOQ's as shown in the following example: +

+ + books = create.fetch(BOOK); + +// Modify the above books, and add some new ones: +modify(books); +addMore(books); + +// Batch-update and/or insert all of the above books +create.batchStore(books);]]> + +

+ Internally, jOOQ will render all the required SQL statements and execute them as a regular . +

+
+
+
+
+ +
+ DAOs + +

+ If you're using jOOQ's , you can configure it to generate and DAOs for you. jOOQ then generates one DAO per , i.e. per table with a single-column primary key. Generated DAOs implement a common jOOQ type called . This type contains the following methods: +

+ + corresponds to the DAO's related table +//

corresponds to the DAO's related generated POJO type +// corresponds to the DAO's related table's primary key type. +// Note that multi-column primary keys are not yet supported by DAOs +public interface DAO, P, T> { + + // These methods allow for inserting POJOs + void insert(P object) throws DataAccessException; + void insert(P... objects) throws DataAccessException; + void insert(Collection

objects) throws DataAccessException; + + // These methods allow for updating POJOs based on their primary key + void update(P object) throws DataAccessException; + void update(P... objects) throws DataAccessException; + void update(Collection

objects) throws DataAccessException; + + // These methods allow for deleting POJOs based on their primary key + void delete(P... objects) throws DataAccessException; + void delete(Collection

objects) throws DataAccessException; + void deleteById(T... ids) throws DataAccessException; + void deleteById(Collection ids) throws DataAccessException; + + // These methods allow for checking record existence + boolean exists(P object) throws DataAccessException; + boolean existsById(T id) throws DataAccessException; + long count() throws DataAccessException; + + // These methods allow for retrieving POJOs by primary key or by some other field + List

findAll() throws DataAccessException; + P findById(T id) throws DataAccessException; + List

fetch(Field field, Z... values) throws DataAccessException; + P fetchOne(Field field, Z value) throws DataAccessException; + + // These methods provide DAO meta-information + Table getTable(); + Class

getType(); +}]]> + +

+ Besides these base methods, generated DAO classes implement various useful fetch methods. An incomplete example is given here, for the BOOK table: +

+ + { + + // Columns with primary / unique keys produce fetchOne() methods + public Book fetchOneById(Integer value) { ... } + + // Other columns produce fetch() methods, returning several records + public List fetchByAuthorId(Integer... values) { ... } + public List fetchByTitle(String... values) { ... } +}]]> +

+ Note that you can further subtype those pre-generated DAO classes, to add more useful DAO methods to them. Using such a DAO is simple: +

+ + + +
+
+ +
+ Exception handling + +

Checked vs. unchecked exceptions

+

+ This is an eternal and religious debate. Pros and cons have been discussed time and again, and it still is a matter of taste, today. In this case, jOOQ clearly takes a side. jOOQ's exception strategy is simple: +

+
    +
  • All "system exceptions" are unchecked. If in the middle of a transaction involving business logic, there is no way that you can recover sensibly from a lost database connection, or a constraint violation that indicates a bug in your understanding of your database model.
  • +
  • All "business exceptions" are checked. Business exceptions are true exceptions that you should handle (e.g. not enough funds to complete a transaction).
  • +
+

+ With jOOQ, it's simple. All of jOOQ's exceptions are "system exceptions", hence they are all unchecked. +

+ +

jOOQ's DataAccessException

+

+ jOOQ uses its own to wrap any underlying that might have occurred. Note that all methods in jOOQ that may cause such a DataAccessException document this both in the Javadoc as well as in their method signature. +

+

+ DataAccessException is subtyped several times as follows: +

+
    +
  • DataAccessException: General exception usually originating from a
  • +
  • DataChangedException: An exception indicating that the database's underlying record has been changed in the mean time (see )
  • +
  • DataTypeException: Something went wrong during type conversion
  • +
  • DetachedException: A SQL statement was executed on a "detached" or a "detached" .
  • +
  • InvalidResultException: An operation was performed expecting only one result, but several results were returned.
  • +
  • MappingException: Something went wrong when loading a record from a or when mapping a record into a POJO
  • +
+ +

Override jOOQ's exception handling

+

+ The following section about documents means of overriding jOOQ's exception handling, if you wish to deal separately with some types of constraint violations, or if you raise business errors from your database, etc. +

+
+
+ +
+ ExecuteListeners + +

+ The let you specify a list of classes. The ExecuteListener is essentially an event listener for Query, Routine, or ResultSet render, prepare, bind, execute, fetch steps. It is a base type for loggers, debuggers, profilers, data collectors, triggers, etc. Advanced ExecuteListeners can also provide custom implementations of Connection, PreparedStatement and ResultSet to jOOQ in apropriate methods. +

+

+ For convenience and better backwards-compatibility, consider extending instead of implementing this interface. +

+

+ Here is a sample implementation of an ExecuteListener, that is simply counting the number of queries per type that are being executed using jOOQ: +

+ + STATISTICS = new HashMap(); + + // Count "start" events for every type of query executed by jOOQ + @Override + public void start(ExecuteContext ctx) { + synchronized (STATISTICS) { + Integer count = STATISTICS.get(ctx.type()); + + if (count == null) { + count = 0; + } + + STATISTICS.put(ctx.type(), count + 1); + } + } +}]]> + +

+ Now, configure jOOQ's runtime to load your listener +

+ + + + com.example.StatisticsListener + +]]> + +

+ And log results any time with a snippet like this: +

+ + +

+ This may result in the following log output: +

+ +15:16:52,982 INFO - TEST STATISTICS +15:16:52,982 INFO - --------------- +15:16:52,983 INFO - READ : 919 executions +15:16:52,983 INFO - WRITE : 117 executions +15:16:52,983 INFO - DDL : 2 executions +15:16:52,983 INFO - BATCH : 4 executions +15:16:52,983 INFO - ROUTINE : 21 executions +15:16:52,983 INFO - OTHER : 30 executions + +

+ Please read the for more details +

+ +

Writing a custom ExecuteListener for logging

+

+ The following depicts an example of a custom ExecuteListener, which pretty-prints all queries being executed by jOOQ to stdout: +

+ + +

+ See also the manual's sections about and the for more sample implementations of actual ExecuteListeners. +

+
+
+ +
+ Logging + +

+ jOOQ logs all SQL queries and fetched result sets to its internal DEBUG logger, which is implemented as an . By default, execute logging is activated in the . In order to see any DEBUG log output, put either log4j or slf4j on jOOQ's classpath along with their respective configuration. A sample log4j configuration can be seen here: +

+ + + + + + + + + + + + + +]]> + +

+ With the above configuration, let's fetch some data with jOOQ +

+ + + +

+ The above query may result in the following log output: +

+ + with bind values : select "BOOK"."ID", "BOOK"."TITLE" from "BOOK" order by "BOOK"."ID" asc, limit 2 offset 1 +Query executed : Total: 1.439ms +Fetched result : +----+------------+ + : | ID|TITLE | + : +----+------------+ + : | 2|Animal Farm | + : | 3|O Alquimista| + : +----+------------+ +Finishing : Total: 4.814ms, +3.375ms +]]> + +

+ Essentially, jOOQ will log +

+
    +
  • The SQL statement as rendered to the prepared statement
  • +
  • The SQL statement with inlined bind values (for improved debugging)
  • +
  • The query execution time
  • +
  • The first 5 records of the result. This is formatted using
  • +
  • The total execution + fetching time
  • +
+ +

+ If you wish to use your own logger (e.g. avoiding printing out sensitive data), you can deactivate jOOQ's logger using and implement your own . +

+
+
+ +
+ Performance considerations + +

+ Many users may have switched from higher-level abstractions such as Hibernate to jOOQ, because of Hibernate's hard-to-manage performance, when it comes to large database schemas and complex second-level caching strategies. jOOQ is not a lightweight database abstraction framework, and it comes with its own overhead. Please be sure to consider the following points: +

+
    +
  • It takes some time to construct jOOQ queries. If you can reuse the same queries, you might cache them. Beware of thread-safety issues, though, as jOOQ's is not threadsafe, and queries are "attached" to their creating Factory
  • +
  • It takes some time to render SQL strings. Internally, jOOQ reuses the same for the complete query, but some rendering elements may take their time. You could, of course, cache SQL generated by jOOQ and prepare your own objects
  • +
  • It takes some time to bind values to prepared statements. jOOQ does not keep any open prepared statements, internally. Use a sophisticated connection pool, that will cache prepared statements and inject them into jOOQ through the standard JDBC API
  • +
  • It takes some time to fetch results. By default, jOOQ will always fetch the complete into memory. Use to prevent that, and scroll over an open underlying database cursor
  • +
+ +

Optimise wisely

+

+ Don't be put off by the above paragraphs. You should optimise wisely, i.e. only in places where you really need very high throughput to your database. jOOQ's overhead compared to plain JDBC is typically less than 1ms per query. +

+
+
+
+
+ +
+ Code generation + +

+ While optional, source code generation is one of jOOQ's main assets if you wish to increase developer productivity. jOOQ's code generator takes your database schema and reverse-engineers it into a set of Java classes modelling , , , , , , user-defined types and many more. +

+

+ The essential ideas behind source code generation are these: +

+
    +
  • Increased IDE support: Type your Java code directly against your database schema, with all type information available
  • +
  • Type-safety: When your database schema changes, your generated code will change as well. Removing columns will lead to compilation errors, which you can detect early.
  • +
+

+ The following chapters will show how to configure the code generator and how to generate various artefacts. +

+
+ + +
+ Configuration and setup of the generator + +

+ There are three binaries available with jOOQ, to be downloaded from SourceForge or from Maven central: +

+
    +
  • + jooq-{jooq-version}.jar +
    + The main library that you will include in your application to run jOOQ +
  • +
  • + jooq-meta-{jooq-version}.jar +
    + The utility that you will include in your build to navigate your database schema for code generation. This can be used as a schema crawler as well. +
  • +
  • + jooq-codegen-{jooq-version}.jar +
    + The utility that you will include in your build to generate your database schema +
  • +
+ +

Configure jOOQ's code generator

+

+ You need to tell jOOQ some things about your database connection. Here's an example of how to do it for an Oracle database +

+ + + + + + oracle.jdbc.OracleDriver + jdbc:oracle:thin:@[your jdbc connection parameters] + [your database user] + [your database password] + + + + user[db-user] + password[db-password] + + + + + + + org.jooq.util.oracle.OracleDatabase + + + .* + + + + + + [your database schema / owner / name] + + + + + + + + + [org.jooq.your.packagename] + + + [/path/to/your/dir] + + +]]> + +

+ There are also lots of advanced configuration parameters, which will be treated in the Note, you can find the official XSD file for a formal specification at:
+ http://www.jooq.org/xsd/jooq-codegen-2.5.0.xsd +

+ +

Run jOOQ code generation

+

+ Code generation works by calling this class with the above property file as argument. +

+ +org.jooq.util.GenerationTool /jooq-config.xml + +

+ Be sure that these elements are located on the classpath: +

+ +
    +
  • The XML configuration file
  • +
  • jooq-{jooq-version}.jar, jooq-meta-{jooq-version}.jar, jooq-codegen-{jooq-version}.jar
  • +
  • The JDBC driver you configured
  • +
+ +

A command-line example (For Windows, unix/linux/etc will be similar)

+
    +
  • Put the property file, jooq*.jar and the JDBC driver into a directory, e.g. C:\temp\jooq
  • +
  • Go to C:\temp\jooq
  • +
  • Run java -cp jooq-{jooq-version}.jar;jooq-meta-{jooq-version}.jar;jooq-codegen-{jooq-version}.jar;[JDBC-driver].jar;. org.jooq.util.GenerationTool /[XML file]
  • +
+

+ Note that the property file must be passed as a classpath resource +

+ +

Run code generation from Eclipse

+

+ Of course, you can also run code generation from your IDE. In Eclipse, set up a project like this. Note that this example uses jOOQ's log4j support by adding log4j.xml and log4j.jar to the project classpath: +

+
+ Eclipse configuration +
+ +

+ Once the project is set up correctly with all required artefacts on the classpath, you can configure an Eclipse Run Configuration for org.jooq.util.GenerationTool. +

+
+ Eclipse configuration +
+ +

+ With the XML file as an argument +

+
+ Eclipse configuration +
+ +

+ And the classpath set up correctly +

+
+ Eclipse configuration +
+ +

+ Finally, run the code generation and see your generated artefacts +

+
+ Eclipse configuration +
+ +

Run generation with ant

+

+ You can also use an ant task to generate your classes. As a rule of thumb, remove the dots "." and dashes "-" from the .properties file's property names to get the ant task's arguments: +

+ + + + + + + + + + + + + + + + + + +]]> + +

+ Note that when running code generation with ant's <java/> task, you may have to set fork="true": +

+ + + + + [...] + + +]]> + +

Integrate generation with Maven

+

+ Using the official jOOQ-codegen-maven plugin, you can integrate source code generation in your Maven build process: +

+ + + + + org.jooq + jooq-codegen-maven + {jooq-version} + + + + + + generate + + + + + + + + postgresql + postgresql + 8.4-702.jdbc4 + + + + + + + + + org.postgresql.Driver + jdbc:postgresql:postgres + postgres + test + + + + + org.jooq.util.DefaultGenerator + + org.jooq.util.postgres.PostgresDatabase + .* + + public + + + org.jooq.util.maven.example + target/generated-sources/jooq + + + + +]]> + +

+ See the full example of a pom.xml including the jOOQ-codegen artefact here:
+ https://github.com/jOOQ/jOOQ/blob/master/jOOQ-codegen-maven-example/pom.xml +

+ +

Migrate properties files from jOOQ 1.7, early versions of jOOQ 2.0.x:

+

+ Before jOOQ 2.0.4, the code generator was configured using properties files. These files are still supported for source code generation, but their syntax won't be maintained any longer. If you wish to migrate to XML, you can migrate the file using this command on the command line +

+ +org.jooq.util.GenerationTool /jooq-config.properties migrate + +

+ Using the migrate flag, jOOQ will read the properties file and output a corresponding XML file on system out +

+ +

Use jOOQ generated classes in your application

+

+ Be sure, both jooq-{jooq-version}.jar and your generated package (see configuration) are located on your classpath. Once this is done, you can execute SQL statements with your generated classes. +

+
+
+ +
+ Advanced generator configuration + +

+ In the we have seen how jOOQ's source code generator is configured and run within a few steps. In this chapter we'll cover some advanced settings +

+ + + + + org.jooq.util.DefaultGenerator + + + + org.jooq.util.DefaultGeneratorStrategy + +]]> + +

+ The following example shows how you can override the DefaultGeneratorStrategy to render table and column names the way they are defined in the database, rather than switching them to camel case: +

+ + getJavaClassImplements(Definition definition, Mode mode) { + return Arrays.asList(Serializable.class.getName(), Cloneable.class.getName()); + } + + /** + * Override this method to define the suffix to apply to routines when + * they are overloaded. + * + * Use this to resolve compile-time conflicts in generated source code, in + * case you make heavy use of procedure overloading + */ + @Override + public String getOverloadSuffix(Definition definition, Mode mode, String overloadIndex) { + return "_OverloadIndex_" + overloadIndex; + } +}]]> + +

jooq-meta configuration

+

+ Within the <generator/> element, there are other configuration elements: +

+ + + + + + REC_VERSION + + + REC_TIMESTAMP + + + false + + + true + + + [your database schema / owner / name] + + + + + ... + ... + + [ ... ... ] + + + + ... + + + ... +]]> + +

+ Check out the some of the manual's "advanced" sections to find out more about the advanced configuration parameters. +

+
    +
  • +
  • +
+ +

jooq-codegen configuration

+

+ Also, you can add some optional advanced configuration parameters for the generator: +

+ + + + + true + + + true + + + true + + + true + + + true + + + true + + + false + + + false + + + false + + + false + + + false + + + false +]]> +
+
+ +
+ Generated global artefacts + +

+ For increased convenience at the use-site, jOOQ generates "global" artefacts at the code generation root location, referencing tables, routines, sequences, etc. In detail, these global artefacts include the following: +

+
    +
  • Keys.java: This file contains all of the required primary key, unique key, foreign key and identity references in the form of static members of type .
  • +
  • Routines.java: This file contains all standalone routines (not in packages) in the form of static factory methods for types.
  • +
  • Sequences.java: This file contains all sequence objects in the form of static members of type .
  • +
  • Tables.java: This file contains all table objects in the form of static member references to the actual singleton object
  • +
  • UDTs.java: This file contains all UDT objects in the form of static member references to the actual singleton object
  • +
+ +

Referencing global artefacts

+

+ When referencing global artefacts from your client application, you would typically static import them as such: +

+ + +
+
+ +
+ Generated tables + +

+ Every table in your database will generate a implementation that looks like this: +

+ + { + + // The singleton instance + public static final Book BOOK = new Book(); + + // Generated columns + public final TableField ID = createField("ID", SQLDataType.INTEGER, this); + public final TableField AUTHOR_ID = createField("AUTHOR_ID", SQLDataType.INTEGER, this); + public final TableField ITLE = createField("TITLE", SQLDataType.VARCHAR, this); + + // Covariant aliasing method, returning a table of the same type as BOOK + @Override + public Book as(java.lang.String alias) { + return new Book(alias); + } + + // [...] +}]]> + +

Flags influencing generated tables

+

+ These flags from the influence generated tables: +

+
    +
  • recordVersionFields: Relevant methods from super classes are overridden to return the VERSION field
  • +
  • recordTimestampFields: Relevant methods from super classes are overridden to return the TIMESTAMP field
  • +
  • dateAsTimestamp: This influences all relevant columns
  • +
  • unsignedTypes: This influences all relevant columns
  • +
  • relations: Relevant methods from super classes are overridden to provide primary key, unique key, foreign key and identity information
  • +
  • instanceFields: This flag controls the "static" keyword on table columns, as well as aliasing convenience
  • +
  • records: The generated record type is referenced from tables allowing for type-safe single-table record fetching
  • +
+ +

Flags controlling table generation

+

+ Table generation cannot be deactivated +

+
+
+ +
+ Generated records + +

+ Every table in your database will generate a implementation that looks like this: +

+ + + +// An interface common to records and pojos can be generated, optionally +implements IBook { + + // Every column generates a setter and a getter + @Override + public void setId(Integer value) { + setValue(BOOK.ID, value); + } + + @Id + @Column(name = "ID", unique = true, nullable = false, precision = 7) + @Override + public Integer getId() { + return getValue(BOOK.ID); + } + + // More setters and getters + public void setAuthorId(Integer value) {...} + public Integer getAuthorId() {...} + + // Convenience methods for foreign key methods + public void setAuthorId(AuthorRecord value) { + if (value == null) { + setValue(BOOK.AUTHOR_ID, null); + } + else { + setValue(BOOK.AUTHOR_ID, value.getValue(AUTHOR.ID)); + } + } + + // Navigation methods + public AuthorRecord fetchAuthor() { + return create().selectFrom(AUTHOR).where(AUTHOR.ID.equal(getValue(BOOK.AUTHOR_ID))).fetchOne(); + } + + // [...] +}]]> + +

Flags influencing generated records

+

+ These flags from the influence generated records: +

+
    +
  • dateAsTimestamp: This influences all relevant getters and setters
  • +
  • unsignedTypes: This influences all relevant getters and setters
  • +
  • relations: This is needed as a prerequisite for navigation methods
  • +
  • navigationMethods: This controls whether navigation methods will be generated or not
  • +
  • daos: Records are a pre-requisite for DAOs. If DAOs are generated, records are generated as well
  • +
  • interfaces: If interfaces are generated, records will implement them
  • +
  • jpaAnnotations: JPA annotations are used on generated records
  • +
+ +

Flags controlling record generation

+

+ Record generation can be deactivated using the records flag +

+
+
+ +
+ Generated POJOs + +

+ Every table in your database will generate a POJO implementation that looks like this: +

+ + + +

Flags influencing generated POJOs

+

+ These flags from the influence generated POJOs: +

+
    +
  • dateAsTimestamp: This influences all relevant getters and setters
  • +
  • unsignedTypes: This influences all relevant getters and setters
  • +
  • interfaces: If interfaces are generated, POJOs will implement them
  • +
  • immutablePojos: Immutable POJOs have final members and no setters. All members must be passed to the constructor
  • +
  • daos: POJOs are a pre-requisite for DAOs. If DAOs are generated, POJOs are generated as well
  • +
  • jpaAnnotations: JPA annotations are used on generated records
  • +
  • validationAnnotations: JSR-303 validation annotations are used on generated records
  • +
+ +

Flags controlling POJO generation

+

+ POJO generation can be activated using the pojos flag +

+
+
+ +
+ Generated Interfaces + +

+ Every table in your database will generate an interface that looks like this: +

+ + + +

Flags influencing generated interfaces

+

+ These flags from the influence generated interfaces: +

+
    +
  • dateAsTimestamp: This influences all relevant getters and setters
  • +
  • unsignedTypes: This influences all relevant getters and setters
  • +
+ +

Flags controlling POJO generation

+

+ POJO generation can be activated using the interfaces flag +

+
+
+ +
+ Generated DAOs + +

Generated DAOs

+

+ Every table in your database will generate a implementation that looks like this: +

+ + { + + // Generated constructors + public BookDao() { + super(BOOK, Book.class); + } + + public BookDao(Factory factory) { + super(BOOK, Book.class, factory); + } + + // Every column generates at least one fetch method + public List fetchById(Integer... values) { + return fetch(BOOK.ID, values); + } + + public Book fetchOneById(Integer value) { + return fetchOne(BOOK.ID, value); + } + + public List fetchByAuthorId(Integer... values) { + return fetch(BOOK.AUTHOR_ID, values); + } + + // [...] +}]]> + +

Flags controlling DAO generation

+

+ DAO generation can be activated using the daos flag +

+
+
+ +
+ Generated sequences + +

+ Every sequence in your database will generate a implementation that looks like this: +

+ + S_AUTHOR_ID = new SequenceImpl("S_AUTHOR_ID", TEST, SQLDataType.INTEGER); +}]]> + +

Flags controlling sequence generation

+

+ Sequence generation cannot be deactivated +

+
+
+ +
+ Generated procedures + +

+ Every procedure or function (routine) in your database will generate a implementation that looks like this: +

+ + { + + // All IN, IN OUT, OUT parameters and function return values generate a static member + public static final Parameter AUTHOR_NAME = createParameter("AUTHOR_NAME", SQLDataType.VARCHAR); + public static final Parameter RESULT = createParameter("RESULT", SQLDataType.NUMERIC); + + // A constructor for a new "empty" procedure call + public AuthorExists() { + super("AUTHOR_EXISTS", TEST); + + addInParameter(AUTHOR_NAME); + addOutParameter(RESULT); + } + + // Every IN and IN OUT parameter generates a setter + public void setAuthorName(String value) { + setValue(AUTHOR_NAME, value); + } + + // Every IN OUT, OUT and RETURN_VALUE generates a getter + public BigDecimal getResult() { + return getValue(RESULT); + } + + // [...] +}]]> + +

Package and member procedures or functions

+

+ Procedures or functions contained in packages or UDTs are generated in a sub-package that corresponds to the package or UDT name. +

+ +

Flags controlling routine generation

+

+ Routine generation cannot be deactivated +

+
+
+ +
+ Generated UDTs + +

+ Every UDT in your database will generate a implementation that looks like this: +

+ + { + + // The singleton UDT instance + public static final UAddressType U_ADDRESS_TYPE = new UAddressType(); + + // Every UDT attribute generates a static member + public static final UDTField ZIP = + createField("ZIP", SQLDataType.VARCHAR, U_ADDRESS_TYPE); + public static final UDTField CITY = + createField("CITY", SQLDataType.VARCHAR, U_ADDRESS_TYPE); + public static final UDTField COUNTRY = + createField("COUNTRY", SQLDataType.VARCHAR, U_ADDRESS_TYPE); + + // [...] +}]]> + +

+ Besides the implementation, a implementation is also generated +

+ + { + + // Every attribute generates a getter and a setter + + public void setZip(String value) {...} + public String getZip() {...} + public void setCity(String value) {...} + public String getCity() {...} + public void setCountry(String value) {...} + public String getCountry() {...} + + // [...] +}]]> + +

Flags controlling UDT generation

+

+ UDT generation cannot be deactivated +

+
+
+ + +
+ Custom data types and type conversion + +

+ When using a custom type in jOOQ, you need to let jOOQ know about its associated . Ad-hoc usages of such converters has been discussed in the chapter about . A more common use-case, however, is to let jOOQ know about custom types at code generation time. Use the following configuration elements to specify, that you'd like to use GregorianCalendar for all database fields that start with DATE_OF_ +

+ + + + + + + java.util.GregorianCalendar + + + com.example.CalendarConverter + + + + + + + + java.util.GregorianCalendar + + + .*\.DATE_OF_.* + + +]]> + +

+ The above configuration will lead to AUTHOR.DATE_OF_BIRTH being generated like this: +

+ + { + + // [...] + public final TableField DATE_OF_BIRTH = // [...] + // [...] + +}]]> + +

+ This means that the bound type of <T> will be GregorianCalendar, wherever you reference DATE_OF_BIRTH. jOOQ will use your custom converter when binding variables and when fetching data from : +

+ + result = +create.selectFrom(AUTHOR) + .where(AUTHOR.DATE_OF_BIRTH.greaterThan(new GregorianCalendar(1980, 0, 1))) + .fetch(AUTHOR.DATE_OF_BIRTH);]]> + +
+
+ +
+ Mapping generated schemata and tables + +

+ We've seen previously in the chapter about , that schemata and tables can be mapped at runtime to other names. But you can also hard-wire schema mapping in generated artefacts at code generation time, e.g. when you have 5 developers with their own dedicated developer databases, and a common integration database. In the code generation configuration, you would then write. +

+ + + + + LUKAS_DEV_SCHEMA + + + PROD + +]]> + +
+
+
+
+ +
+ Tools + +

+ These chapters hold some information about tools to be used with jOOQ +

+
+ + +
+ jOOQ Console + +

+ The was driven by a feature request by Christopher Deckers, who has had the courtesy to contribute the jOOQ Console, a sample application interfacing with jOOQ's ExecuteListeners. The jOOQ Console logs all queries executed by jOOQ and displays them nicely in a Swing application. With the jOOQ Console's logger, you can: +

+
    +
  • Activate the console's DebugListener anytime (in-process or if the remote server is active).
  • +
  • View simple and batch queries and their parameters.
  • +
  • Reformat queries along with syntax highlighting for better readability.
  • +
  • View stack trace of originator of the call.
  • +
  • Dump the stack to stdout when in an IDE, to directly navigate to relevant classes.
  • +
  • Track execution time, binding time, parsing time, rows read, fields read.
  • +
  • Show/hide queries depending on their type (SELECT, UPDATE, etc.).
  • +
  • Sort any column (timing columns, queries, types, etc.)
  • +
  • Easy copy paste of rows/columns to Spreadsheet editors.
  • +
+ +

+ A short overview of such a debugging session can be seen here: +

+
+ jOOQ Console example +
+

+ Please note that the jOOQ Console is still experimental. Any feedback is very welcome on
+ the jooq-user group +

+ +

jOOQ Console operation modes

+

+ The jOOQ Console can be run in two different modes: +

+
    +
  • In-process mode: running in the same process as the queries you're analysing
  • +
  • "headless" mode: running remotely
  • +
+ +

+ Both modes will require that you set the in the Factory's settings. When using XML settings: +

+ + + + org.jooq.debug.DebugListener + +]]> + +

+ Or when using programmatic settings: +

+ + + +

In-process mode

+

+ The in-process mode is useful for Swing applications or other, locally run Java programs accessing the database via jOOQ. In order to launch the jOOQ Console "in-process", specify the previously documented settings and launch the Console as follows: +

+ + + +

+ Only in the in-process mode, you can execute ad-hoc queries directly from the console, if you provide it with proper DatabaseDescriptor. These queries are executed from the Editor pane which features: +

+
    +
  • SQL editing within the console.
  • +
  • Incremental search on tables.
  • +
  • Simple code completion with tables/columns/SQL keywords.
  • +
  • Syntax highlighting and formatting capabilities.
  • +
  • Results shown in one or several tabs.
  • +
  • Easy analysis of Logger output by copy/pasting/running queries in the Editor.
  • +
+
+ jOOQ Console example +
+ +

"Headless" mode

+

+ In J2EE or other server/client environments, you may not be able to run the console in the same process as your application. You can then run the jOOQ Console in "headless" mode. In addition to the previously documented settings, you'll have to start a debugger server in your application process, that the console can connect to: +

+ +// Create a new RemoteDebuggerServer in your application that listens to +// incoming connections on a given port +SERVER = new RemoteDebuggerServer(DEBUGGER_PORT); + +

+ Now start your application along with the debugger server and launch the console with this command: +

+ +java -jar jooq-console-2.1.0.jar [host] [port] + +

+ Depending on your distribution, you may have to manually add rsyntaxtextarea-1.5.0.jar and jOOQ artefacts on your classpath. +

+
+
+
+
+ +
+ Reference + +

+ These chapters hold some general jOOQ reference information +

+
+ + +
+ Supported RDBMS + +

A list of supported databases

+

+ Every RDMBS out there has its own little specialties. jOOQ considers those specialties as much as possible, while trying to standardise the behaviour in jOOQ. In order to increase the quality of jOOQ, some 70 unit tests are run for syntax and variable binding verification, as well as some 180 integration tests with an overall of around 1200 queries for any of these databases: +

+
    +
  • CUBRID 8.4.1
  • +
  • DB2 9.7
  • +
  • Derby 10.8
  • +
  • Firebird 2.5.1
  • +
  • H2 1.3.161
  • +
  • HSQLDB 2.2.5
  • +
  • Ingres 10.1.0
  • +
  • MySQL 5.1.41 and 5.5.8
  • +
  • Oracle XE 10.2.0.1.0 and 11g
  • +
  • PostgreSQL 9.0
  • +
  • SQLite with inofficial JDBC driver v056
  • +
  • SQL Server 2008 R8
  • +
  • Sybase Adaptive Server Enterprise 15.5
  • +
  • Sybase SQL Anywhere 12
  • +
+

+ These platforms have been observed to work as well, but are not integration-tested +

+
    +
  • Google Cloud SQL (MySQL)
  • +
+ +

Databases planned for support

+

+ Any of the following databases might be available in the future +

+
    +
  • Informix
  • +
  • Interbase
  • +
  • MS Access
  • +
  • MS Excel
  • +
  • SQL Azure
  • +
  • Sybase SQL Anywhere OnDemand
  • +
  • Teradata
  • +
+ +

Databases being watched

+

+ Any of the following databases are being observed for a potential integration +

+
    +
  • Mondrian
  • +
  • Netezza
  • +
  • SQLFire
  • +
  • Vectorwise
  • +
  • Vertica
  • +
  • VoltDB
  • +
+ +

Feature matrix

+

+ This section will soon contain a feature matrix, documenting what feature is available for which database. +

+
+
+ +
+ Data types + +

+ There is always a small mismatch between SQL data types and Java data types. This is for two reasons: +

+
    +
  • SQL data types are insufficiently covered by the JDBC API.
  • +
  • Java data types are often less expressive than SQL data types
  • +
+

+ This chapter should document the most important notes about SQL, JDBC and jOOQ data types. +

+
+ + +
+ BLOBs and CLOBs + +

+ jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources. True support for LOBs is on the roadmap, though. +

+
+
+ +
+ Unsigned integer types + +

+ Some databases explicitly support unsigned integer data types. In most normal JDBC-based applications, they would just be mapped to their signed counterparts letting bit-wise shifting and tweaking to the user. jOOQ ships with a set of unsigned implementations modelling the following types: +

+
    +
  • : Unsigned byte, an 8-bit unsigned integer
  • +
  • : Unsigned short, a 16-bit unsigned integer
  • +
  • : Unsigned int, a 32-bit unsigned integer
  • +
  • : Unsigned long, a 64-bit unsigned integer
  • +
+

+ Each of these wrapper types extends , wrapping a higher-level integer type, internally: +

+
    +
  • UByte wraps
  • +
  • UShort wraps
  • +
  • UInteger wraps
  • +
  • ULong wraps
  • +
+
+
+ +
+ INTERVAL data types + +

+ jOOQ fills a gap opened by JDBC, which neglects an important SQL data type as defined by the SQL standards: INTERVAL types. SQL knows two different types of intervals: +

+
    +
  • YEAR TO MONTH: This interval type models a number of months and years
  • +
  • DAY TO SECOND: This interval type models a number of days, hours, minutes, seconds and milliseconds
  • +
+ +

+ Both interval types ship with a variant of subtypes, such as DAY TO HOUR, HOUR TO SECOND, etc. jOOQ models these types as Java objects extending : (where Number.intValue() corresponds to the absolute number of months) and (where Number.intValue() corresponds to the absolute number of milliseconds) +

+ +

Interval arithmetic

+

+ In addition to the documented previously, interval arithmetic is also supported by jOOQ. Essentially, the following operations are supported: +

+
    +
  • DATETIME - DATETIME => INTERVAL
  • +
  • DATETIME + or - INTERVAL => DATETIME
  • +
  • INTERVAL + DATETIME => DATETIME
  • +
  • INTERVAL + - INTERVAL => INTERVAL
  • +
  • INTERVAL * or / NUMERIC => INTERVAL
  • +
  • NUMERIC * INTERVAL => INTERVAL
  • +
+
+
+ +
+ XML data types + +

+ XML data types are currently not supported +

+
+
+ +
+ Geospacial data types + +

Geospacial data types

+

+ Geospacial data types are currently not supported +

+
+
+ +
+ CURSOR data types + +

+ Some databases support cursors returned from stored procedures. They are mapped to the following jOOQ data type: +

+ +> cursor;]]> + +

+ In fact, such a cursor will be fetched immediately by jOOQ and wrapped in an object. +

+
+
+ +
+ ARRAY and TABLE data types + +

+ The SQL standard specifies ARRAY data types, that can be mapped to Java arrays as such: +

+ + intArray;]]> + +

+ The above array type is supported by these SQL dialects: +

+
    +
  • H2
  • +
  • HSQLDB
  • +
  • Postgres
  • +
+ +

Oracle typed arrays

+

+ Oracle has strongly-typed arrays and table types (as opposed to the previously seen anonymously typed arrays). These arrays are wrapped by types. +

+
+
+
+
+ +
+ jOOQ's BNF pseudo-notation + +

+ This chapter will soon contain an overview over jOOQ's API using a pseudo BNF notation. +

+
+
+ +
+ Credits + +

+ jOOQ lives in a very challenging ecosystem. The Java to SQL interface is still one of the most important system interfaces. Yet there are still a lot of open questions, best practices and no "true" standard has been established. This situation gave way to a lot of tools, APIs, utilities which essentially tackle the same problem domain as jOOQ. jOOQ has gotten great inspiration from pre-existing tools and this section should give them some credit. Here is a list of inspirational tools in alphabetical order: +

+
    +
  • Avajé EBean: Play! Framework's preferred ORM has a feature called asynchronous query execution. This idea made it into jOOQ as
  • +
  • Hibernate: The de-facto standard (JPA) with its useful table-to-POJO mapping features have influenced jOOQ's facilities
  • +
  • JaQu: H2's own fluent API for querying databases
  • +
  • JPA: The de-facto standard in the javax.persistence packages, supplied by Oracle. Its annotations are useful to jOOQ as well.
  • +
  • OneWebSQL: A commercial SQL abstraction API with support for DAO source code generation, which was integrated also in jOOQ
  • +
  • QueryDSL: A "LINQ-port" to Java. It has a similar fluent API, a similar code-generation facility, yet quite a different purpose. While jOOQ is all about SQL, QueryDSL (like LINQ) is mostly about querying.
  • +
  • Spring Data: Spring's JdbcTemplate knows RowMappers, which are reflected by jOOQ's or
  • +
+
+
+
+
+ + + \ No newline at end of file diff --git a/jOOQ/src/main/java/org/jooq/DataType.java b/jOOQ/src/main/java/org/jooq/DataType.java index 216d5c5ac0..7251c76afe 100644 --- a/jOOQ/src/main/java/org/jooq/DataType.java +++ b/jOOQ/src/main/java/org/jooq/DataType.java @@ -94,14 +94,6 @@ public interface DataType extends Serializable { */ > DataType asArrayDataType(Class arrayDataType); - /** - * Retrieve the data type for a given master data type - * - * @deprecated - 2.5.0 [#1741] - This feature will be removed as of jOOQ 3.0 - */ - @Deprecated - > DataType asMasterDataType(Class masterDataType); - /** * Retrieve the data type for a given enum data type */ diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractDataType.java b/jOOQ/src/main/java/org/jooq/impl/AbstractDataType.java index 3d13336a57..2eaa9b57b0 100644 --- a/jOOQ/src/main/java/org/jooq/impl/AbstractDataType.java +++ b/jOOQ/src/main/java/org/jooq/impl/AbstractDataType.java @@ -369,11 +369,6 @@ public abstract class AbstractDataType implements DataType { return new DefaultDataType(dialect, arrayDataType, typeName, castTypeName); } - @Override - public final > DataType asMasterDataType(Class masterDataType) { - return new DefaultDataType(dialect, masterDataType, typeName, castTypeName); - } - @Override public final DataType asEnumDataType(Class enumDataType) { return new DefaultDataType(dialect, enumDataType, typeName, castTypeName);