[#3451] Add XMLDatabase to generate a database schema from an XML file - First draft

This commit is contained in:
Lukas Eder 2014-07-25 16:38:44 +02:00
parent ed4817fc83
commit d1db55a556
20 changed files with 1760 additions and 13 deletions

View File

@ -189,15 +189,10 @@ public class GenerationTool {
// Initialise connection
// ---------------------
if (connection == null) {
errorIfNull(j, "The <jdbc/> tag is mandatory.");
if (connection == null && j != null) {
Class<? extends Driver> driver = (Class<? extends Driver>) loadClass(driverClass(j));
Properties properties = new Properties();
for (Property p : j.getProperties()) {
properties.put(p.getKey(), p.getValue());
}
Properties properties = properties(j.getProperties());
if (!properties.containsKey("user"))
properties.put("user", defaultString(j.getUser()));
if (!properties.containsKey("password"))
@ -246,6 +241,7 @@ public class GenerationTool {
? databaseClass(j)
: (Class<? extends Database>) loadClass(databaseName);
Database database = databaseClass.newInstance();
database.setProperties(properties(d.getProperties()));
List<Schema> schemata = d.getSchemata();
@ -384,6 +380,16 @@ public class GenerationTool {
}
}
private Properties properties(List<Property> properties) {
Properties result = new Properties();
for (Property p : properties) {
result.put(p.getKey(), p.getValue());
}
return result;
}
private String driverClass(Jdbc j) {
String result = j.getDriver();

View File

@ -46,6 +46,7 @@ import static org.jooq.tools.StringUtils.defaultString;
import java.io.File;
import java.lang.reflect.TypeVariable;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Arrays;
@ -141,9 +142,12 @@ public class JavaGenerator extends AbstractGenerator {
public final void generate(Database db) {
this.database = db;
String url = null;
String url = "";
try {
url = database.getConnection().getMetaData().getURL();
Connection connection = database.getConnection();
if (connection != null)
url = connection.getMetaData().getURL();
}
catch (SQLException ignore) {}

View File

@ -37,7 +37,7 @@
<version>0.8.1</version>
<executions>
<execution>
<id>configuration</id>
<id>codegen</id>
<goals>
<goal>generate</goal>
</goals>
@ -46,9 +46,9 @@
<extension>true</extension>
<strict>false</strict>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<bindingDirectory>src/main/resources/xjb</bindingDirectory>
<bindingDirectory>src/main/resources/xjb/codegen</bindingDirectory>
<schemaIncludes>
<include>jooq-codegen-3.4.0.xsd</include>
<include>jooq-codegen-3.5.0.xsd</include>
</schemaIncludes>
<generatePackage>org.jooq.util.jaxb</generatePackage>
<args>
@ -79,7 +79,55 @@
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-annotate</artifactId>
<version>0.6.2</version>
</plugin>
</plugin>
</plugins>
</configuration>
</execution>
<execution>
<id>xml</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<forceRegenerate>true</forceRegenerate>
<extension>true</extension>
<strict>false</strict>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<bindingDirectory>src/main/resources/xjb/meta</bindingDirectory>
<schemaIncludes>
<include>jooq-meta-3.5.0.xsd</include>
</schemaIncludes>
<generatePackage>org.jooq.util.xml.jaxb</generatePackage>
<args>
<arg>-Xxew</arg>
<arg>-Xxew:instantiate lazy</arg>
<arg>-Xxew:delete</arg>
<arg>-Xfluent-api</arg>
<arg>-Xdefault-value</arg>
<arg>-Xannotate</arg>
</args>
<plugins>
<plugin>
<groupId>com.github.jaxb-xew-plugin</groupId>
<artifactId>jaxb-xew-plugin</artifactId>
<version>1.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-fluent-api</artifactId>
<version>3.0</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-default-value</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-annotate</artifactId>
<version>0.6.2</version>
</plugin>
</plugins>
</configuration>
</execution>

View File

@ -55,6 +55,7 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Pattern;
import javax.xml.bind.JAXB;
@ -86,6 +87,7 @@ public abstract class AbstractDatabase implements Database {
// Configuration elements
// -------------------------------------------------------------------------
private Properties properties;
private SQLDialect dialect;
private Connection connection;
private DSLContext create;
@ -283,6 +285,15 @@ public abstract class AbstractDatabase implements Database {
this.configuredSchemata = schemata;
}
@Override
public final void setProperties(Properties properties) {
this.properties = properties;
}
public final Properties getProperties() {
return properties;
}
@Override
public final void setExcludes(String[] excludes) {
this.excludes = excludes;

View File

@ -43,6 +43,7 @@ package org.jooq.util;
import java.sql.Connection;
import java.util.List;
import java.util.Properties;
import org.jooq.DSLContext;
import org.jooq.SQLDialect;
@ -375,4 +376,9 @@ public interface Database {
* Check for the existence of a table in the dictionary views.
*/
boolean exists(Table<?> table);
/**
* Database properties.
*/
void setProperties(Properties properties);
}

View File

@ -0,0 +1,210 @@
/**
* Copyright (c) 2009-2014, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* This work is dual-licensed
* - under the Apache Software License 2.0 (the "ASL")
* - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
* =============================================================================
* You may choose which license applies to you:
*
* - If you're using this work with Open Source databases, you may choose
* either ASL or jOOQ License.
* - If you're using this work with at least one commercial database, you must
* choose jOOQ License
*
* For more information, please visit http://www.jooq.org/licenses
*
* Apache Software License 2.0:
* -----------------------------------------------------------------------------
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* jOOQ License and Maintenance Agreement:
* -----------------------------------------------------------------------------
* Data Geekery grants the Customer the non-exclusive, timely limited and
* non-transferable license to install and use the Software under the terms of
* the jOOQ License and Maintenance Agreement.
*
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
*/
package org.jooq.util.xml;
import java.io.File;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXB;
import org.jooq.DSLContext;
import org.jooq.SQLDialect;
import org.jooq.impl.DSL;
import org.jooq.util.AbstractDatabase;
import org.jooq.util.ArrayDefinition;
import org.jooq.util.DataTypeDefinition;
import org.jooq.util.DefaultDataTypeDefinition;
import org.jooq.util.DefaultRelations;
import org.jooq.util.DefaultSequenceDefinition;
import org.jooq.util.EnumDefinition;
import org.jooq.util.PackageDefinition;
import org.jooq.util.RoutineDefinition;
import org.jooq.util.SchemaDefinition;
import org.jooq.util.SequenceDefinition;
import org.jooq.util.TableDefinition;
import org.jooq.util.UDTDefinition;
import org.jooq.util.xml.jaxb.InformationSchema;
import org.jooq.util.xml.jaxb.Schema;
import org.jooq.util.xml.jaxb.Sequence;
import org.jooq.util.xml.jaxb.Table;
/**
* The XML Database.
*
* @author Lukas Eder
*/
public class XMLDatabase extends AbstractDatabase {
InformationSchema info;
private InformationSchema info() {
if (info == null) {
info = JAXB.unmarshal(new File(getProperties().getProperty("xml-file")), InformationSchema.class);
}
return info;
}
@Override
protected DSLContext create0() {
@SuppressWarnings("deprecation")
SQLDialect dialect = SQLDialect.SQL99;
try {
dialect = SQLDialect.valueOf(getProperties().getProperty("dialect"));
}
catch (Exception ignore) {}
return DSL.using(dialect);
}
@Override
protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException {
}
@Override
protected void loadUniqueKeys(DefaultRelations relations) throws SQLException {
}
@Override
protected void loadForeignKeys(DefaultRelations relations) throws SQLException {
}
@Override
protected void loadCheckConstraints(DefaultRelations r) throws SQLException {
}
@Override
protected List<SchemaDefinition> getSchemata0() throws SQLException {
List<SchemaDefinition> result = new ArrayList<SchemaDefinition>();
for (Schema schema : info().getSchemata()) {
if (getInputSchemata().contains(schema.getSchemaName())) {
result.add(new SchemaDefinition(this, schema.getSchemaName(), null));
}
}
return result;
}
@Override
protected List<SequenceDefinition> getSequences0() throws SQLException {
List<SequenceDefinition> result = new ArrayList<SequenceDefinition>();
for (Sequence sequence : info().getSequences()) {
if (getInputSchemata().contains(sequence.getSequenceSchema())) {
SchemaDefinition schema = getSchema(sequence.getSequenceSchema());
DataTypeDefinition type = new DefaultDataTypeDefinition(
this,
schema,
sequence.getDataType(),
sequence.getCharacterMaximumLength(),
sequence.getNumericPrecision(),
sequence.getNumericScale(),
false,
false
);
result.add(new DefaultSequenceDefinition(schema, sequence.getSequenceName(), type));
}
}
return result;
}
@Override
protected List<TableDefinition> getTables0() throws SQLException {
List<TableDefinition> result = new ArrayList<TableDefinition>();
for (Table table : info().getTables()) {
if (getInputSchemata().contains(table.getTableSchema())) {
SchemaDefinition schema = getSchema(table.getTableSchema());
result.add(new XMLTableDefinition(schema, info(), table));
}
}
return result;
}
@Override
protected List<EnumDefinition> getEnums0() throws SQLException {
List<EnumDefinition> result = new ArrayList<EnumDefinition>();
return result;
}
@Override
protected List<UDTDefinition> getUDTs0() throws SQLException {
List<UDTDefinition> result = new ArrayList<UDTDefinition>();
return result;
}
@Override
protected List<ArrayDefinition> getArrays0() throws SQLException {
List<ArrayDefinition> result = new ArrayList<ArrayDefinition>();
return result;
}
@Override
protected List<RoutineDefinition> getRoutines0() throws SQLException {
List<RoutineDefinition> result = new ArrayList<RoutineDefinition>();
return result;
}
@Override
protected List<PackageDefinition> getPackages0() throws SQLException {
List<PackageDefinition> result = new ArrayList<PackageDefinition>();
return result;
}
static int unbox(Integer i) {
return i == null ? 0 : i.intValue();
}
static long unbox(Long l) {
return l == null ? 0L : l.longValue();
}
}

View File

@ -0,0 +1,110 @@
/**
* Copyright (c) 2009-2014, Data Geekery GmbH (http://www.datageekery.com)
* All rights reserved.
*
* This work is dual-licensed
* - under the Apache Software License 2.0 (the "ASL")
* - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
* =============================================================================
* You may choose which license applies to you:
*
* - If you're using this work with Open Source databases, you may choose
* either ASL or jOOQ License.
* - If you're using this work with at least one commercial database, you must
* choose jOOQ License
*
* For more information, please visit http://www.jooq.org/licenses
*
* Apache Software License 2.0:
* -----------------------------------------------------------------------------
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* jOOQ License and Maintenance Agreement:
* -----------------------------------------------------------------------------
* Data Geekery grants the Customer the non-exclusive, timely limited and
* non-transferable license to install and use the Software under the terms of
* the jOOQ License and Maintenance Agreement.
*
* This library is distributed with a LIMITED WARRANTY. See the jOOQ License
* and Maintenance Agreement for more details: http://www.jooq.org/licensing
*/
package org.jooq.util.xml;
import static org.jooq.util.xml.XMLDatabase.unbox;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.jooq.tools.StringUtils;
import org.jooq.util.AbstractTableDefinition;
import org.jooq.util.ColumnDefinition;
import org.jooq.util.DataTypeDefinition;
import org.jooq.util.DefaultColumnDefinition;
import org.jooq.util.DefaultDataTypeDefinition;
import org.jooq.util.SchemaDefinition;
import org.jooq.util.xml.jaxb.Column;
import org.jooq.util.xml.jaxb.InformationSchema;
import org.jooq.util.xml.jaxb.Table;
/**
* @author Lukas Eder
*/
public class XMLTableDefinition extends AbstractTableDefinition {
private final InformationSchema info;
private final Table table;
public XMLTableDefinition(SchemaDefinition schema, InformationSchema info, Table table) {
super(schema, table.getTableName(), "");
this.info = info;
this.table = table;
}
@Override
protected List<ColumnDefinition> getElements0() throws SQLException {
List<ColumnDefinition> result = new ArrayList<ColumnDefinition>();
for (Column column : info.getColumns()) {
if (StringUtils.equals(table.getTableCatalog(), column.getTableCatalog()) &&
StringUtils.equals(table.getTableSchema(), column.getTableSchema()) &&
StringUtils.equals(table.getTableName(), column.getTableName())) {
SchemaDefinition schema = getDatabase().getSchema(column.getTableSchema());
DataTypeDefinition type = new DefaultDataTypeDefinition(
getDatabase(),
schema,
column.getDataType(),
unbox(column.getCharacterMaximumLength()),
unbox(column.getNumericPrecision()),
unbox(column.getNumericScale()),
column.isIsNullable(),
column.getColumnDefault() != null
);
result.add(new DefaultColumnDefinition(
this,
column.getColumnName(),
unbox(column.getOrdinalPosition()),
type,
column.getIdentityGeneration() != null,
""
));
}
}
return result;
}
}

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:annox="http://annox.dev.java.net"
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
version="2.1">
<jaxb:globalBindings>
<!-- Force all classes implements Serializable -->
<xjc:serializable uid="350" />
<!-- [#2401] Trim unnecessary whitespace from configuration -->
<xjc:javaType name="java.lang.String" xmlType="xs:string" adapter="org.jooq.util.jaxb.tools.TrimAdapter"/>
</jaxb:globalBindings>
<!-- Annotate the following classes with @SuppressWarnings -->
<jaxb:bindings schemaLocation="../../xsd/jooq-codegen-3.5.0.xsd" multiple="true" node="//xs:complexType">
<annox:annotate>
<annox:annotate annox:class="java.lang.SuppressWarnings" value="all" />
</annox:annotate>
</jaxb:bindings>
</jaxb:bindings>

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:annox="http://annox.dev.java.net"
xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"
version="2.1">
<jaxb:globalBindings>
<!-- Force all classes implements Serializable -->
<xjc:serializable uid="350" />
<!-- [#2401] Trim unnecessary whitespace from configuration -->
<xjc:javaType name="java.lang.String" xmlType="xs:string" adapter="org.jooq.util.jaxb.tools.TrimAdapter"/>
</jaxb:globalBindings>
<!-- Annotate the following classes with @SuppressWarnings -->
<jaxb:bindings schemaLocation="../../xsd/jooq-meta-3.5.0.xsd" multiple="true" node="//xs:complexType">
<annox:annotate>
<annox:annotate annox:class="java.lang.SuppressWarnings" value="all" />
</annox:annotate>
</jaxb:bindings>
</jaxb:bindings>

View File

@ -0,0 +1,692 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.jooq.org/xsd/jooq-codegen-3.5.0.xsd"
targetNamespace="http://www.jooq.org/xsd/jooq-codegen-3.5.0.xsd"
elementFormDefault="qualified">
<element name="configuration">
<complexType>
<all>
<!--
The JDBC configuration element contains information about how
to set up the database connection used for source code generation
-->
<element name="jdbc" type="tns:Jdbc" minOccurs="1"
maxOccurs="1" />
<!--
The GENERATOR configuration element contains information about
source code generation itself
-->
<element name="generator" type="tns:Generator" minOccurs="1"
maxOccurs="1" />
</all>
</complexType>
</element>
<complexType name="Jdbc">
<all>
<!-- The JDBC driver -->
<element name="driver" type="string" minOccurs="1" maxOccurs="1" />
<!-- The JDBC connection URL -->
<element name="url" type="string" minOccurs="1" maxOccurs="1" />
<!-- Deprecated. Use database schema configuration elements instead -->
<element name="schema" type="string" minOccurs="0" maxOccurs="1" />
<!--
The JDBC connection user. Be sure this user has all required
GRANTs to the dictionary views/tables to generate the desired artefacts
-->
<element name="user" type="string" minOccurs="0" maxOccurs="1" />
<!-- The JDBC connection password -->
<element name="password" type="string" minOccurs="0" maxOccurs="1" />
<!--
Enlist custom JDBC driver properties that are provided to the
java.sql.DriverManager when fetching a connection
-->
<element name="properties" type="tns:Properties" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
<complexType name="Properties">
<sequence>
<element name="property" type="tns:Property" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="Property">
<all>
<element name="key" type="string" minOccurs="1" maxOccurs="1"/>
<element name="value" type="string" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<complexType name="Generator">
<all>
<!--
The class used to generate source code. You may override this with
your custom source code generator
-->
<element name="name" type="string" default="org.jooq.util.DefaultGenerator"
minOccurs="0" maxOccurs="1" />
<!-- The naming strategy used for class and field names -->
<element name="strategy" type="tns:Strategy" minOccurs="0" maxOccurs="1" />
<!-- The jooq-meta configuration -->
<element name="database" type="tns:Database" minOccurs="1" maxOccurs="1" />
<!-- The jooq-codegen configuration -->
<element name="generate" type="tns:Generate" minOccurs="0" maxOccurs="1" />
<!-- Some information about generation output -->
<element name="target" type="tns:Target" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
<complexType name="Strategy">
<choice>
<!--
The class used to provide a naming strategy for generated source
code. You may override this with your custom naming strategy
-->
<element name="name" type="string" minOccurs="0" maxOccurs="1"
default="org.jooq.util.DefaultGeneratorStrategy" />
<!--
The matcher strategy configuration used when applying an
XML-based strategy
-->
<element name="matchers" type="tns:Matchers" minOccurs="0" maxOccurs="1"/>
</choice>
</complexType>
<!--
Matchers can be used to provide a naming strategy by regular expression configuration.
-->
<complexType name="Matchers">
<sequence>
<!--
Specify 0..n schema matchers in order to provide a naming strategy for objects
created from schemas.
-->
<element name="schemas" type="tns:MatchersSchemasType" minOccurs="0" maxOccurs="1"/>
<!--
Specify 0..n table matchers in order to provide a naming strategy for objects
created from database tables.
-->
<element name="tables" type="tns:MatchersTablesType" minOccurs="0" maxOccurs="1"/>
<!--
Specify 0..n field matchers in order to provide a naming strategy for objects
created from table fields.
-->
<element name="fields" type="tns:MatchersFieldsType" minOccurs="0" maxOccurs="1"/>
<!--
Specify 0..n routine matchers in order to provide a naming strategy for objects
created from routines.
-->
<element name="routines" type="tns:MatchersRoutinesType" minOccurs="0" maxOccurs="1"/>
<!--
Specify 0..n sequence matchers in order to provide a naming strategy for objects
created from sequences.
-->
<element name="sequences" type="tns:MatchersSequencesType" minOccurs="0" maxOccurs="1"/>
</sequence>
</complexType>
<complexType name="MatchersSchemasType">
<sequence>
<element name="schema" type="tns:MatchersSchemaType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="MatchersSchemaType">
<all>
<!--
This schema matcher applies to all unqualified or qualified schema names
matched by this expression. If left empty, this matcher applies to all schemas.
-->
<element name="expression" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of a generated org.jooq.Schema object.
-->
<element name="schemaClass" type="tns:MatcherRule" minOccurs="0" maxOccurs="1" />
<element name="schemaIdentifier" type="tns:MatcherRule" minOccurs="0" maxOccurs="1" />
<element name="schemaImplements" type="string" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
<complexType name="MatchersTablesType">
<sequence>
<element name="table" type="tns:MatchersTableType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="MatchersTableType">
<all>
<!--
This table matcher applies to all unqualified or qualified table names
matched by this expression. If left empty, this matcher applies to all tables.
-->
<element name="expression" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of a generated org.jooq.Table object.
-->
<element name="tableClass" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="tableIdentifier" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="tableImplements" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of a generated org.jooq.Record object.
-->
<element name="recordClass" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="recordImplements" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of a generated interface, implemented by
generated org.jooq.Record objects and by generated POJOs.
-->
<element name="interfaceClass" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="interfaceImplements" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of a generated org.jooq.DAO object.
-->
<element name="daoClass" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="daoImplements" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of a generated POJO object.
-->
<element name="pojoClass" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="pojoExtends" type="string" minOccurs="0" maxOccurs="1"/>
<element name="pojoImplements" type="string" minOccurs="0" maxOccurs="1"/>
</all>
</complexType>
<complexType name="MatchersFieldsType">
<sequence>
<element name="field" type="tns:MatchersFieldType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="MatchersFieldType">
<all>
<!--
This field matcher applies to all unqualified or qualified field names
matched by this expression. If left empty, this matcher applies to all fields.
-->
<element name="expression" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of a generated org.jooq.Field object.
-->
<element name="fieldIdentifier" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="fieldMember" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="fieldSetter" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
<element name="fieldGetter" type="tns:MatcherRule" minOccurs="0" maxOccurs="1"/>
</all>
</complexType>
<complexType name="MatchersRoutinesType">
<sequence>
<element name="routine" type="tns:MatchersRoutineType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="MatchersRoutineType">
<all>
<!--
This routine matcher applies to all unqualified or qualified routine names
matched by this expression. If left empty, this matcher applies to all routines.
-->
<element name="expression" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of a generated org.jooq.Routine object.
-->
<element name="routineClass" type="tns:MatcherRule" minOccurs="0" maxOccurs="1" />
<element name="routineMethod" type="tns:MatcherRule" minOccurs="0" maxOccurs="1" />
<element name="routineImplements" type="string" minOccurs="0" maxOccurs="1"/>
</all>
</complexType>
<complexType name="MatchersSequencesType">
<sequence>
<element name="sequence" type="tns:MatchersSequenceType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="MatchersSequenceType">
<all>
<!--
This sequence matcher applies to all unqualified or qualified sequence names
matched by this expression. If left empty, this matcher applies to all sequences.
-->
<element name="expression" type="string" minOccurs="0" maxOccurs="1"/>
<!--
These elements influence the naming of the generated Sequences class.
-->
<element name="sequenceIdentifier" type="tns:MatcherRule" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
<complexType name="MatcherRule">
<all>
<element name="transform" type="tns:MatcherTransformType" minOccurs="0" maxOccurs="1"/>
<element name="expression" type="string" minOccurs="1" maxOccurs="1"/>
</all>
</complexType>
<simpleType name="MatcherTransformType">
<restriction base="string">
<enumeration value="AS_IS"/>
<enumeration value="LOWER"/>
<enumeration value="UPPER"/>
<enumeration value="CAMEL"/>
<enumeration value="PASCAL"/>
</restriction>
</simpleType>
<complexType name="Database">
<all>
<!--
The database dialect from jooq-meta. Available dialects are
named org.util.[database].[database]Database.
Natively supported values are:
org.jooq.util.ase.ASEDatabase
org.jooq.util.cubrid.CUBRIDDatabase
org.jooq.util.db2.DB2Database
org.jooq.util.derby.DerbyDatabase
org.jooq.util.firebird.FirebirdDatabase
org.jooq.util.h2.H2Database
org.jooq.util.hsqldb.HSQLDBDatabase
org.jooq.util.ingres.IngresDatabase
org.jooq.util.mariadb.MariaDBDatabase
org.jooq.util.mysql.MySQLDatabase
org.jooq.util.oracle.OracleDatabase
org.jooq.util.postgres.PostgresDatabase
org.jooq.util.sqlite.SQLiteDatabaes
org.jooq.util.sqlserver.SQLServerDatabase
org.jooq.util.sybase.SybaseDatabase
This value can be used to reverse-engineer generic JDBC DatabaseMetaData (e.g. for MS Access)
org.jooq.util.jdbc.JDBCDatabase
This value can be used to reverse-engineer standard jOOQ-meta XML formats
org.jooq.util.xml.XMLDatabase
You can also provide your own org.jooq.util.Database implementation
here, if your database is currently not supported
-->
<element name="name" type="string" minOccurs="1" maxOccurs="1" />
<!--
The properties that will be passed to the Database instance as configured above.
Known supported properties include:
org.jooq.util.xml.XMLDatabase
dialect=ORACLE
xml-file=C:\path\to\database.xml
xsl-files=C:\path\to\1.xsl,C:\path\to\2.xsl
-->
<element name="properties" type="tns:Properties" minOccurs="0" maxOccurs="1" />
<!--
All elements that are generated from your schema (A Java regular expression.
Use the pipe to separate several expressions) Watch out for
case-sensitivity. Depending on your database, this might be
important!
You can create case-insensitive regular expressions
using this syntax: (?i:expr)
Whitespace is ignored and comments are possible.
-->
<element name="includes" type="string" default=".*" minOccurs="0" maxOccurs="1" />
<!--
All elements that are excluded from your schema (A Java regular expression.
Use the pipe to separate several expressions). Excludes match before
includes
-->
<element name="excludes" type="string" default="" minOccurs="0" maxOccurs="1" />
<!--
This flag indicates whether include / exclude patterns should also match
columns within tables.
-->
<element name="includeExcludeColumns" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
<!--
All table and view columns that are used as "version" fields for
optimistic locking (A Java regular expression. Use the pipe to separate several expressions).
See UpdatableRecord.store() and UpdatableRecord.delete() for details
-->
<element name="recordVersionFields" type="string" default="" minOccurs="0" maxOccurs="1" />
<!--
All table and view columns that are used as "timestamp" fields for
optimistic locking (A Java regular expression. Use the pipe to separate several expressions).
See UpdatableRecord.store() and UpdatableRecord.delete() for details
-->
<element name="recordTimestampFields" type="string" default="" minOccurs="0" maxOccurs="1" />
<!--
A regular expression matching all columns that participate in "synthetic" primary keys,
which should be placed on generated UpdatableRecords, to be used with
- UpdatableRecord.store()
- UpdatableRecord.update()
- UpdatableRecord.delete()
- UpdatableRecord.refresh()
Synthetic primary keys will override existing primary keys.
-->
<element name="syntheticPrimaryKeys" type="string" default="" minOccurs="0" maxOccurs="1" />
<!--
All (UNIQUE) key names that should be used instead of primary keys on
generated UpdatableRecords, to be used with
- UpdatableRecord.store()
- UpdatableRecord.update()
- UpdatableRecord.delete()
- UpdatableRecord.refresh()
If several keys match, a warning is emitted and the first one encountered will be used.
This flag will also replace synthetic primary keys, if it matches.
-->
<element name="overridePrimaryKeys" type="string" default="" minOccurs="0" maxOccurs="1" />
<!--
Generate java.sql.Timestamp fields for DATE columns. This is
particularly useful for Oracle databases
-->
<element name="dateAsTimestamp" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
<!--
Generate jOOU data types for your unsigned data types, which are
not natively supported in Java
-->
<element name="unsignedTypes" type="boolean" default="true" minOccurs="0" maxOccurs="1" />
<!--
The schema that is used locally as a source for meta information.
This could be your development schema or the production schema, etc
This cannot be combined with the schemata element.
If left empty (and without any schemata element), jOOQ will generate all available schemata.
For backwards compatibility, this defaults to jdbc/schema
-->
<element name="inputSchema" type="string" default="" minOccurs="0" maxOccurs="1" />
<!--
The schema that is used in generated source code. This will be the
production schema. Use this to override your local development
schema name for source code generation. If not specified, this
will be the same as the input-schema.
This will be ignored if outputSchemaToDefault is set to true
-->
<element name="outputSchema" type="string" minOccurs="0" maxOccurs="1" />
<!--
A flag to indicate that the outputSchema should be the "default" schema,
which generates schema-less, unqualified tables, procedures, etc.
-->
<element name="outputSchemaToDefault" type="boolean" minOccurs="0" maxOccurs="1" default="false" />
<!--
A configuration element to configure several input and/or output
schemata for jooq-meta, in case you're using jooq-meta in a multi-
schema environment
-->
<element name="schemata" type="tns:Schemata" minOccurs="0" maxOccurs="1"/>
<!--
A configuration element to configure custom types introduced to jOOQ
using converters
-->
<element name="customTypes" type="tns:CustomTypes" minOccurs="0" maxOccurs="1"/>
<!--
A configuration element to configure synthetic enum types
This is EXPERIMENTAL / DEPRECATED functionality. Do not re-use
-->
<element name="enumTypes" type="tns:EnumTypes" minOccurs="0" maxOccurs="1"/>
<!--
A configuration element to configure type overrides for generated
artefacts (e.g. in combination with enumTypes)
-->
<element name="forcedTypes" type="tns:ForcedTypes" minOccurs="0" maxOccurs="1"/>
</all>
</complexType>
<complexType name="Schemata">
<sequence>
<!--
A configuration element for a single schema in multi-schema
environments
-->
<element name="schema" type="tns:Schema" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="Schema">
<all>
<!-- See also database/inputSchema -->
<element name="inputSchema" type="string" default="" minOccurs="1" maxOccurs="1" />
<!-- See also database/outputSchema -->
<element name="outputSchema" type="string" minOccurs="0" maxOccurs="1" />
<!-- See also database/outputSchemaDefault -->
<element name="outputSchemaToDefault" type="boolean" minOccurs="0" maxOccurs="1" default="false" />
</all>
</complexType>
<complexType name="CustomTypes">
<sequence>
<!-- A configuration element for a custom type -->
<element name="customType" type="tns:CustomType" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="EnumTypes">
<sequence>
<!-- A configuration element for a synthetic enum type -->
<element name="enumType" type="tns:EnumType" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="ForcedTypes">
<sequence>
<!-- A configuration element for a forced type override -->
<element name="forcedType" type="tns:ForcedType" minOccurs="0" maxOccurs="unbounded" />
</sequence>
</complexType>
<complexType name="CustomType">
<all>
<!-- The name of the custom type -->
<element name="name" type="string" minOccurs="1" maxOccurs="1" />
<!-- The type of the custom type - e.g. java.time.LocalDateTime.
For backwards-compatibility reasons, this information is optional. If left undefined,
the "type" value will default to the "name" value. -->
<element name="type" type="string" minOccurs="0" maxOccurs="1" />
<!-- A converter implementation for the custom type -->
<element name="converter" type="string" minOccurs="1" maxOccurs="1" />
</all>
</complexType>
<complexType name="EnumType">
<all>
<!-- The name of the synthetic enum type -->
<element name="name" type="string" minOccurs="1" maxOccurs="1" />
<!-- A comma separated (CSV format) list of enum literals -->
<element name="literals" type="string" minOccurs="1" maxOccurs="1" />
</all>
</complexType>
<complexType name="ForcedType">
<all>
<!-- The name of the type to be forced upon various artefacts -->
<element name="name" type="string" minOccurs="1" maxOccurs="1" />
<!--
A Java regular expression matching columns, parameters, attributes,
etc to be forced to have this type. If provided, both "expressions" and
"types" must match.
-->
<element name="expression" type="string" minOccurs="0" maxOccurs="1" />
<!--
The same as expression. This is kept for backwards compatibility reasons.
-->
<element name="expressions" type="string" minOccurs="0" maxOccurs="1" />
<!--
A Java regular expression matching data types to be forced to have this
type. If provided, both "expressions" and "types" must match.
-->
<element name="types" type="string" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
<complexType name="Generate">
<all>
<!--
Primary key / foreign key relations should be generated and used.
This is a prerequisite for various advanced features
-->
<element name="relations" type="boolean" default="true" minOccurs="0" maxOccurs="1" />
<!-- Generate deprecated code for backwards compatibility -->
<element name="deprecated" type="boolean" default="true" minOccurs="0" maxOccurs="1" />
<!--
Do not reuse this property. It is deprecated as of jOOQ 3.3.0
-->
<element name="instanceFields" type="boolean" default="true" minOccurs="0" maxOccurs="1" />
<!--
Generate the javax.annotation.Generated annotation to indicate
jOOQ version used for source code
-->
<element name="generatedAnnotation" type="boolean" default="true" minOccurs="0" maxOccurs="1" />
<!--
Generate TableRecord classes. Disable this when you don't
need the additional type-safety
-->
<element name="records" type="boolean" default="true" minOccurs="0" maxOccurs="1" />
<!--
Generate POJOs for usage of the ResultQuery.fetchInto(Class) API
-->
<element name="pojos" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
<!--
Generate immutable POJOs for usage of the ResultQuery.fetchInto(Class) API
This overrides any value set in <pojos/>
-->
<element name="immutablePojos" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
<!--
Generate interfaces that will be implemented by records and/or pojos.
You can also use these interfaces in Record.into(Class<?>) and similar
methods, to let jOOQ return proxy objects for them.
-->
<element name="interfaces" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
<!--
Generate DAOs in addition to POJO classes
-->
<element name="daos" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
<!--
Annotate POJOs and Records with JPA annotations for increased
compatibility and better integration with JPA/Hibernate, etc
-->
<element name="jpaAnnotations" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
<!--
Annotate POJOs and Records with JSR-303 validation annotations
-->
<element name="validationAnnotations" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
<!--
Allow to turn off the generation of global object references, which include
- Tables.java
- Sequences.java
- UDTs.java
Turning off the generation of the above files may be necessary for very
large schemas, which exceed the amount of allowed constants in a class's
constant pool (64k) or, whose static initialiser would exceed 64k of
byte code
-->
<element name="globalObjectReferences" type="boolean" default="true" minOccurs="0" maxOccurs="1" />
<!--
Generate fluent setters in
- records
- pojos
- interfaces
Fluent setters are against the JavaBeans specification, but can be quite
useful to those users who do not depend on EL, JSP, JSF, etc.
-->
<element name="fluentSetters" type="boolean" default="false" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
<complexType name="Target">
<all>
<!--
The destination package of your generated classes (within the
destination directory)
jOOQ may append the schema name to this package if generating multiple schemas,
e.g. org.jooq.generated.schema1
org.jooq.generated.schema2
-->
<element name="packageName" type="string" default="org.jooq.generated" minOccurs="0" maxOccurs="1" />
<!-- The destination directory of your generated classes -->
<element name="directory" type="string" default="target/generated-sources/jooq" />
</all>
</complexType>
</schema>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.jooq.org/xsd/jooq-meta-3.5.0.xsd"
targetNamespace="http://www.jooq.org/xsd/jooq-meta-3.5.0.xsd"
elementFormDefault="qualified">
<element name="information_schema">
<complexType>
<all>
<element name="schemata" type="tns:Schemata" minOccurs="0" maxOccurs="1" />
<element name="sequences" type="tns:Sequences" minOccurs="0" maxOccurs="1" />
<element name="tables" type="tns:Tables" minOccurs="0" maxOccurs="1" />
<element name="columns" type="tns:Columns" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
</element>
<complexType name="Schemata">
<all>
<element name="schema" type="tns:Schema" minOccurs="0" maxOccurs="unbounded" />
</all>
</complexType>
<complexType name="Schema">
<all>
<element name="catalog_name" type="string" minOccurs="0" maxOccurs="1" />
<element name="schema_name" type="string" minOccurs="1" maxOccurs="1" />
</all>
</complexType>
<complexType name="Sequences">
<all>
<element name="sequence" type="tns:Sequence" minOccurs="0" maxOccurs="unbounded" />
</all>
</complexType>
<complexType name="Sequence">
<all>
<element name="sequence_catalog" type="string" minOccurs="0" maxOccurs="1" />
<element name="sequence_schema" type="string" minOccurs="0" maxOccurs="1" />
<element name="sequence_name" type="string" minOccurs="1" maxOccurs="1" />
<element name="data_type" type="string" minOccurs="1" maxOccurs="1" />
<element name="character_maximum_length" type="int" minOccurs="0" maxOccurs="1" />
<element name="numeric_precision" type="int" minOccurs="0" maxOccurs="1" />
<element name="numeric_scale" type="int" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
<complexType name="Tables">
<all>
<element name="table" type="tns:Table" minOccurs="0" maxOccurs="unbounded" />
</all>
</complexType>
<complexType name="Table">
<all>
<element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
<element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
<element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
</all>
</complexType>
<complexType name="Columns">
<all>
<element name="column" type="tns:Column" minOccurs="0" maxOccurs="unbounded" />
</all>
</complexType>
<complexType name="Column">
<all>
<element name="table_catalog" type="string" minOccurs="0" maxOccurs="1" />
<element name="table_schema" type="string" minOccurs="0" maxOccurs="1" />
<element name="table_name" type="string" minOccurs="1" maxOccurs="1" />
<element name="column_name" type="string" minOccurs="1" maxOccurs="1" />
<element name="data_type" type="string" minOccurs="1" maxOccurs="1" />
<element name="character_maximum_length" type="int" minOccurs="0" maxOccurs="1" />
<element name="numeric_precision" type="int" minOccurs="0" maxOccurs="1" />
<element name="numeric_scale" type="int" minOccurs="0" maxOccurs="1" />
<element name="ordinal_position" type="int" minOccurs="0" maxOccurs="1" />
<element name="identity_generation" type="string" minOccurs="0" maxOccurs="1" />
<element name="is_nullable" type="boolean" minOccurs="0" maxOccurs="1" />
<element name="column_default" type="string" minOccurs="0" maxOccurs="1" />
</all>
</complexType>
</schema>

View File

@ -4237,6 +4237,166 @@
xxxxxxxxxx
xxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxx
xxxxxxxxx
xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxx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xxxxxxxxxxx
xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxxxxx
xxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxx
xxxxxxxxxx
xxxxxxxx
xxxxxxxxxx
xxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxx

View File

@ -0,0 +1,36 @@
<?xml version="1.0"?>
<information_schema xmlns="http://www.jooq.org/xsd/jooq-meta-3.5.0.xsd">
<schemata>
<schema>
<schema_name>TEST</schema_name>
</schema>
</schemata>
<tables>
<table>
<table_schema>TEST</table_schema>
<table_name>T_AUTHOR</table_name>
</table>
</tables>
<columns>
<column>
<table_schema>TEST</table_schema>
<table_name>T_AUTHOR</table_name>
<column_name>ID</column_name>
<data_type>NUMBER</data_type>
<numeric_precision>7</numeric_precision>
<ordinal_position>1</ordinal_position>
<is_nullable>false</is_nullable>
</column>
</columns>
<sequences>
<sequence>
<sequence_schema>TEST</sequence_schema>
<sequence_name>S_AUTHOR_ID</sequence_name>
<data_type>NUMBER</data_type>
<numeric_precision>7</numeric_precision>
</sequence>
</sequences>
</information_schema>

View File

@ -0,0 +1,33 @@
/**
* This class is generated by jOOQ
*/
package org.jooq.test.oracle4.generatedclasses;
/**
* This class is generated by jOOQ.
*
* A class modelling foreign key relationships between tables of the <code>TEST</code>
* schema
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Keys {
// -------------------------------------------------------------------------
// IDENTITY definitions
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// UNIQUE and PRIMARY KEY definitions
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// FOREIGN KEY definitions
// -------------------------------------------------------------------------
// -------------------------------------------------------------------------
// [#1459] distribute members to avoid static initialisers > 64kb
// -------------------------------------------------------------------------
}

View File

@ -0,0 +1,18 @@
/**
* This class is generated by jOOQ
*/
package org.jooq.test.oracle4.generatedclasses;
/**
* This class is generated by jOOQ.
*
* Convenience access to all sequences in TEST
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Sequences {
/**
* The sequence <code>TEST.S_AUTHOR_ID</code>
*/
public static final org.jooq.Sequence<java.lang.Integer> S_AUTHOR_ID = new org.jooq.impl.SequenceImpl<java.lang.Integer>("S_AUTHOR_ID", org.jooq.test.oracle4.generatedclasses.Test.TEST, org.jooq.impl.SQLDataType.INTEGER.nullable(false));
}

View File

@ -0,0 +1,18 @@
/**
* This class is generated by jOOQ
*/
package org.jooq.test.oracle4.generatedclasses;
/**
* This class is generated by jOOQ.
*
* Convenience access to all tables in TEST
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Tables {
/**
* The table TEST.T_AUTHOR
*/
public static final org.jooq.test.oracle4.generatedclasses.tables.TAuthor T_AUTHOR = org.jooq.test.oracle4.generatedclasses.tables.TAuthor.T_AUTHOR;
}

View File

@ -0,0 +1,49 @@
/**
* This class is generated by jOOQ
*/
package org.jooq.test.oracle4.generatedclasses;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Test extends org.jooq.impl.SchemaImpl {
private static final long serialVersionUID = 1552778377;
/**
* The singleton instance of <code>TEST</code>
*/
public static final Test TEST = new Test();
/**
* No further instances allowed
*/
private Test() {
super("TEST");
}
@Override
public final java.util.List<org.jooq.Sequence<?>> getSequences() {
java.util.List result = new java.util.ArrayList();
result.addAll(getSequences0());
return result;
}
private final java.util.List<org.jooq.Sequence<?>> getSequences0() {
return java.util.Arrays.<org.jooq.Sequence<?>>asList(
org.jooq.test.oracle4.generatedclasses.Sequences.S_AUTHOR_ID);
}
@Override
public final java.util.List<org.jooq.Table<?>> getTables() {
java.util.List result = new java.util.ArrayList();
result.addAll(getTables0());
return result;
}
private final java.util.List<org.jooq.Table<?>> getTables0() {
return java.util.Arrays.<org.jooq.Table<?>>asList(
org.jooq.test.oracle4.generatedclasses.tables.TAuthor.T_AUTHOR);
}
}

View File

@ -0,0 +1,68 @@
/**
* This class is generated by jOOQ
*/
package org.jooq.test.oracle4.generatedclasses.tables;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class TAuthor extends org.jooq.impl.TableImpl<org.jooq.test.oracle4.generatedclasses.tables.records.TAuthorRecord> {
private static final long serialVersionUID = 799437775;
/**
* The singleton instance of <code>TEST.T_AUTHOR</code>
*/
public static final org.jooq.test.oracle4.generatedclasses.tables.TAuthor T_AUTHOR = new org.jooq.test.oracle4.generatedclasses.tables.TAuthor();
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle4.generatedclasses.tables.records.TAuthorRecord> getRecordType() {
return org.jooq.test.oracle4.generatedclasses.tables.records.TAuthorRecord.class;
}
/**
* The column <code>TEST.T_AUTHOR.ID</code>.
*/
public final org.jooq.TableField<org.jooq.test.oracle4.generatedclasses.tables.records.TAuthorRecord, java.lang.Integer> ID = createField("ID", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");
/**
* Create a <code>TEST.T_AUTHOR</code> table reference
*/
public TAuthor() {
this("T_AUTHOR", null);
}
/**
* Create an aliased <code>TEST.T_AUTHOR</code> table reference
*/
public TAuthor(java.lang.String alias) {
this(alias, org.jooq.test.oracle4.generatedclasses.tables.TAuthor.T_AUTHOR);
}
private TAuthor(java.lang.String alias, org.jooq.Table<org.jooq.test.oracle4.generatedclasses.tables.records.TAuthorRecord> aliased) {
this(alias, aliased, null);
}
private TAuthor(java.lang.String alias, org.jooq.Table<org.jooq.test.oracle4.generatedclasses.tables.records.TAuthorRecord> aliased, org.jooq.Field<?>[] parameters) {
super(alias, org.jooq.test.oracle4.generatedclasses.Test.TEST, aliased, parameters, "");
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.test.oracle4.generatedclasses.tables.TAuthor as(java.lang.String alias) {
return new org.jooq.test.oracle4.generatedclasses.tables.TAuthor(alias, this);
}
/**
* Rename this table
*/
public org.jooq.test.oracle4.generatedclasses.tables.TAuthor rename(java.lang.String name) {
return new org.jooq.test.oracle4.generatedclasses.tables.TAuthor(name, null);
}
}

View File

@ -0,0 +1,35 @@
/**
* This class is generated by jOOQ
*/
package org.jooq.test.oracle4.generatedclasses.tables.pojos;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
@javax.persistence.Entity
@javax.persistence.Table(name = "T_AUTHOR", schema = "TEST")
public class TAuthor implements java.io.Serializable {
private static final long serialVersionUID = -2112424480;
private java.lang.Integer id;
public TAuthor() {}
public TAuthor(
java.lang.Integer id
) {
this.id = id;
}
@javax.persistence.Column(name = "ID", nullable = false, precision = 7)
@javax.validation.constraints.NotNull
public java.lang.Integer getId() {
return this.id;
}
public void setId(java.lang.Integer id) {
this.id = id;
}
}

View File

@ -0,0 +1,104 @@
/**
* This class is generated by jOOQ
*/
package org.jooq.test.oracle4.generatedclasses.tables.records;
/**
* This class is generated by jOOQ.
*/
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
@javax.persistence.Entity
@javax.persistence.Table(name = "T_AUTHOR", schema = "TEST")
public class TAuthorRecord extends org.jooq.impl.TableRecordImpl<org.jooq.test.oracle4.generatedclasses.tables.records.TAuthorRecord> implements org.jooq.Record1<java.lang.Integer> {
private static final long serialVersionUID = -115873836;
/**
* Setter for <code>TEST.T_AUTHOR.ID</code>.
*/
public void setId(java.lang.Integer value) {
setValue(0, value);
}
/**
* Getter for <code>TEST.T_AUTHOR.ID</code>.
*/
@javax.persistence.Column(name = "ID", nullable = false, precision = 7)
@javax.validation.constraints.NotNull
public java.lang.Integer getId() {
return (java.lang.Integer) getValue(0);
}
// -------------------------------------------------------------------------
// Record1 type implementation
// -------------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row1<java.lang.Integer> fieldsRow() {
return (org.jooq.Row1) super.fieldsRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Row1<java.lang.Integer> valuesRow() {
return (org.jooq.Row1) super.valuesRow();
}
/**
* {@inheritDoc}
*/
@Override
public org.jooq.Field<java.lang.Integer> field1() {
return org.jooq.test.oracle4.generatedclasses.tables.TAuthor.T_AUTHOR.ID;
}
/**
* {@inheritDoc}
*/
@Override
public java.lang.Integer value1() {
return getId();
}
/**
* {@inheritDoc}
*/
@Override
public TAuthorRecord value1(java.lang.Integer value) {
setId(value);
return this;
}
/**
* {@inheritDoc}
*/
@Override
public TAuthorRecord values(java.lang.Integer value1) {
return this;
}
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
/**
* Create a detached TAuthorRecord
*/
public TAuthorRecord() {
super(org.jooq.test.oracle4.generatedclasses.tables.TAuthor.T_AUTHOR);
}
/**
* Create a detached, initialised TAuthorRecord
*/
public TAuthorRecord(java.lang.Integer id) {
super(org.jooq.test.oracle4.generatedclasses.tables.TAuthor.T_AUTHOR);
setValue(0, id);
}
}