diff --git a/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/sys-test.properties b/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/sys-test.properties index 007a3a62db..4332729487 100644 --- a/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/sys-test.properties +++ b/jOOQ-test/configuration/org/jooq/configuration/lukas/oracle/sys-test.properties @@ -7,7 +7,7 @@ jdbc.Password=TEST generator=org.jooq.util.DefaultGenerator generator.database=org.jooq.util.oracle.OracleDatabase -generator.database.includes=DBMS_XPLAN +generator.database.includes=DBMS_XPLAN,DBMS_XPLAN_TYPE_TABLE,DBMS_XPLAN_TYPE generator.database.excludes= generator.generate.deprecated=false generator.generate.instance-fields= diff --git a/jOOQ-test/examples/org/jooq/examples/DBMS_XPLAN.java b/jOOQ-test/examples/org/jooq/examples/DBMS_XPLAN.java new file mode 100644 index 0000000000..7849618eb4 --- /dev/null +++ b/jOOQ-test/examples/org/jooq/examples/DBMS_XPLAN.java @@ -0,0 +1,68 @@ +/** + * 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.examples; + +import static org.jooq.impl.Factory.table; + +import java.sql.Connection; +import java.sql.DriverManager; + +import org.jooq.examples.oracle.sys.packages.DbmsXplan; +import org.jooq.util.oracle.OracleFactory; + +public class DBMS_XPLAN { + + /** + * @param args + */ + public static void main(String[] args) throws Exception { + Class.forName("oracle.jdbc.OracleDriver"); + Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe", "TEST", "TEST"); + + OracleFactory ora = new OracleFactory(connection); + ora.fetch("select * from t_book"); + + // TODO [#1113] This doesn't work yet +// for (DbmsXplanTypeRecord record : DbmsXplan.displayCursor(ora, null, null, "ALLSTATS LAST").get()) { +// System.out.println(record.getPlanTableOutput()); +// } + + // [#1114] Unnesting TABLE of OBJECT + ora.select().from(table(DbmsXplan.displayCursor(null, null, "ALLSTATS LAST"))).fetch(); +// select * from table(dbms_xplan.display_cursor('851kf9fa1z8sv')); + } + +} diff --git a/jOOQ-test/examples/org/jooq/examples/oracle/sys/Sys.java b/jOOQ-test/examples/org/jooq/examples/oracle/sys/Sys.java index 64a37f842e..9615f7dcaa 100644 --- a/jOOQ-test/examples/org/jooq/examples/oracle/sys/Sys.java +++ b/jOOQ-test/examples/org/jooq/examples/oracle/sys/Sys.java @@ -8,7 +8,7 @@ package org.jooq.examples.oracle.sys; */ public class Sys extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = 229459502; + private static final long serialVersionUID = 2134291205; /** * The singleton instance of SYS @@ -21,4 +21,16 @@ public class Sys extends org.jooq.impl.SchemaImpl { private Sys() { super("SYS"); } + + /* + * instance initialiser + */ + { + addMapping("SYS.DBMS_XPLAN_TYPE", org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeRecord.class); + } + + @Override + public final java.util.List> getUDTs() { + return java.util.Arrays.>asList(org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE); + } } diff --git a/jOOQ-test/examples/org/jooq/examples/oracle/sys/UDTs.java b/jOOQ-test/examples/org/jooq/examples/oracle/sys/UDTs.java new file mode 100644 index 0000000000..87258f5d7c --- /dev/null +++ b/jOOQ-test/examples/org/jooq/examples/oracle/sys/UDTs.java @@ -0,0 +1,22 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.examples.oracle.sys; + +/** + * This class is generated by jOOQ. + * + * Convenience access to all UDTs in SYS + */ +public final class UDTs { + + /** + * The type SYS.DBMS_XPLAN_TYPE + */ + public static org.jooq.examples.oracle.sys.udt.DbmsXplanType DBMS_XPLAN_TYPE = org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE; + + /** + * No instances + */ + private UDTs() {} +} diff --git a/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/DbmsXplan.java b/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/DbmsXplan.java index 99ed269185..233bb3dbe5 100644 --- a/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/DbmsXplan.java +++ b/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/DbmsXplan.java @@ -10,7 +10,7 @@ package org.jooq.examples.oracle.sys.packages; */ public final class DbmsXplan extends org.jooq.impl.PackageImpl { - private static final long serialVersionUID = 1703556324; + private static final long serialVersionUID = -1690923682; /** * The singleton instance of DBMS_XPLAN @@ -350,7 +350,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param filterPreds * @throws org.jooq.exception.DataAccessException if something went wrong executing the query */ - public static java.lang.Object display(org.jooq.Configuration configuration, java.lang.String tableName, java.lang.String statementId, java.lang.String format, java.lang.String filterPreds) { + public static org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord display(org.jooq.Configuration configuration, java.lang.String tableName, java.lang.String statementId, java.lang.String format, java.lang.String filterPreds) { org.jooq.examples.oracle.sys.packages.dbms_xplan.Display f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.Display(); f.setTableName(tableName); f.setStatementId(statementId); @@ -369,7 +369,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param format * @param filterPreds */ - public static org.jooq.Field display(java.lang.String tableName, java.lang.String statementId, java.lang.String format, java.lang.String filterPreds) { + public static org.jooq.Field display(java.lang.String tableName, java.lang.String statementId, java.lang.String format, java.lang.String filterPreds) { org.jooq.examples.oracle.sys.packages.dbms_xplan.Display f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.Display(); f.setTableName(tableName); f.setStatementId(statementId); @@ -387,7 +387,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param format * @param filterPreds */ - public static org.jooq.Field display(org.jooq.Field tableName, org.jooq.Field statementId, org.jooq.Field format, org.jooq.Field filterPreds) { + public static org.jooq.Field display(org.jooq.Field tableName, org.jooq.Field statementId, org.jooq.Field format, org.jooq.Field filterPreds) { org.jooq.examples.oracle.sys.packages.dbms_xplan.Display f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.Display(); f.setTableName(tableName); f.setStatementId(statementId); @@ -406,7 +406,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param format * @throws org.jooq.exception.DataAccessException if something went wrong executing the query */ - public static java.lang.Object displayAwr(org.jooq.Configuration configuration, java.lang.String sqlId, java.math.BigInteger planHashValue, java.math.BigInteger dbId, java.lang.String format) { + public static org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord displayAwr(org.jooq.Configuration configuration, java.lang.String sqlId, java.math.BigInteger planHashValue, java.math.BigInteger dbId, java.lang.String format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayAwr f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayAwr(); f.setSqlId(sqlId); f.setPlanHashValue(planHashValue); @@ -425,7 +425,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param dbId * @param format */ - public static org.jooq.Field displayAwr(java.lang.String sqlId, java.math.BigInteger planHashValue, java.math.BigInteger dbId, java.lang.String format) { + public static org.jooq.Field displayAwr(java.lang.String sqlId, java.math.BigInteger planHashValue, java.math.BigInteger dbId, java.lang.String format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayAwr f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayAwr(); f.setSqlId(sqlId); f.setPlanHashValue(planHashValue); @@ -443,7 +443,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param dbId * @param format */ - public static org.jooq.Field displayAwr(org.jooq.Field sqlId, org.jooq.Field planHashValue, org.jooq.Field dbId, org.jooq.Field format) { + public static org.jooq.Field displayAwr(org.jooq.Field sqlId, org.jooq.Field planHashValue, org.jooq.Field dbId, org.jooq.Field format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayAwr f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayAwr(); f.setSqlId(sqlId); f.setPlanHashValue(planHashValue); @@ -461,7 +461,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param format * @throws org.jooq.exception.DataAccessException if something went wrong executing the query */ - public static java.lang.Object displayCursor(org.jooq.Configuration configuration, java.lang.String sqlId, java.math.BigInteger cursorChildNo, java.lang.String format) { + public static org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord displayCursor(org.jooq.Configuration configuration, java.lang.String sqlId, java.math.BigInteger cursorChildNo, java.lang.String format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayCursor f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayCursor(); f.setSqlId(sqlId); f.setCursorChildNo(cursorChildNo); @@ -478,7 +478,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param cursorChildNo * @param format */ - public static org.jooq.Field displayCursor(java.lang.String sqlId, java.math.BigInteger cursorChildNo, java.lang.String format) { + public static org.jooq.Field displayCursor(java.lang.String sqlId, java.math.BigInteger cursorChildNo, java.lang.String format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayCursor f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayCursor(); f.setSqlId(sqlId); f.setCursorChildNo(cursorChildNo); @@ -494,7 +494,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param cursorChildNo * @param format */ - public static org.jooq.Field displayCursor(org.jooq.Field sqlId, org.jooq.Field cursorChildNo, org.jooq.Field format) { + public static org.jooq.Field displayCursor(org.jooq.Field sqlId, org.jooq.Field cursorChildNo, org.jooq.Field format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayCursor f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplayCursor(); f.setSqlId(sqlId); f.setCursorChildNo(cursorChildNo); @@ -573,7 +573,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param format * @throws org.jooq.exception.DataAccessException if something went wrong executing the query */ - public static java.lang.Object displaySqlPlanBaseline(org.jooq.Configuration configuration, java.lang.String sqlHandle, java.lang.String planName, java.lang.String format) { + public static org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord displaySqlPlanBaseline(org.jooq.Configuration configuration, java.lang.String sqlHandle, java.lang.String planName, java.lang.String format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlPlanBaseline f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlPlanBaseline(); f.setSqlHandle(sqlHandle); f.setPlanName(planName); @@ -590,7 +590,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param planName * @param format */ - public static org.jooq.Field displaySqlPlanBaseline(java.lang.String sqlHandle, java.lang.String planName, java.lang.String format) { + public static org.jooq.Field displaySqlPlanBaseline(java.lang.String sqlHandle, java.lang.String planName, java.lang.String format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlPlanBaseline f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlPlanBaseline(); f.setSqlHandle(sqlHandle); f.setPlanName(planName); @@ -606,7 +606,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param planName * @param format */ - public static org.jooq.Field displaySqlPlanBaseline(org.jooq.Field sqlHandle, org.jooq.Field planName, org.jooq.Field format) { + public static org.jooq.Field displaySqlPlanBaseline(org.jooq.Field sqlHandle, org.jooq.Field planName, org.jooq.Field format) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlPlanBaseline f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlPlanBaseline(); f.setSqlHandle(sqlHandle); f.setPlanName(planName); @@ -625,7 +625,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param sqlsetOwner * @throws org.jooq.exception.DataAccessException if something went wrong executing the query */ - public static java.lang.Object displaySqlset(org.jooq.Configuration configuration, java.lang.String sqlsetName, java.lang.String sqlId, java.math.BigInteger planHashValue, java.lang.String format, java.lang.String sqlsetOwner) { + public static org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord displaySqlset(org.jooq.Configuration configuration, java.lang.String sqlsetName, java.lang.String sqlId, java.math.BigInteger planHashValue, java.lang.String format, java.lang.String sqlsetOwner) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlset f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlset(); f.setSqlsetName(sqlsetName); f.setSqlId(sqlId); @@ -646,7 +646,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param format * @param sqlsetOwner */ - public static org.jooq.Field displaySqlset(java.lang.String sqlsetName, java.lang.String sqlId, java.math.BigInteger planHashValue, java.lang.String format, java.lang.String sqlsetOwner) { + public static org.jooq.Field displaySqlset(java.lang.String sqlsetName, java.lang.String sqlId, java.math.BigInteger planHashValue, java.lang.String format, java.lang.String sqlsetOwner) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlset f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlset(); f.setSqlsetName(sqlsetName); f.setSqlId(sqlId); @@ -666,7 +666,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param format * @param sqlsetOwner */ - public static org.jooq.Field displaySqlset(org.jooq.Field sqlsetName, org.jooq.Field sqlId, org.jooq.Field planHashValue, org.jooq.Field format, org.jooq.Field sqlsetOwner) { + public static org.jooq.Field displaySqlset(org.jooq.Field sqlsetName, org.jooq.Field sqlId, org.jooq.Field planHashValue, org.jooq.Field format, org.jooq.Field sqlsetOwner) { org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlset f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.DisplaySqlset(); f.setSqlsetName(sqlsetName); f.setSqlId(sqlId); @@ -962,7 +962,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param iFormatFlags * @throws org.jooq.exception.DataAccessException if something went wrong executing the query */ - public static java.lang.Object prepareRecords(org.jooq.Configuration configuration, org.jooq.Result planCur, java.lang.Integer iFormatFlags) { + public static org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord prepareRecords(org.jooq.Configuration configuration, org.jooq.Result planCur, java.lang.Integer iFormatFlags) { org.jooq.examples.oracle.sys.packages.dbms_xplan.PrepareRecords f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.PrepareRecords(); f.setPlanCur(planCur); f.setIFormatFlags(iFormatFlags); @@ -977,7 +977,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param planCur * @param iFormatFlags */ - public static org.jooq.Field prepareRecords(org.jooq.Result planCur, java.lang.Integer iFormatFlags) { + public static org.jooq.Field prepareRecords(org.jooq.Result planCur, java.lang.Integer iFormatFlags) { org.jooq.examples.oracle.sys.packages.dbms_xplan.PrepareRecords f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.PrepareRecords(); f.setPlanCur(planCur); f.setIFormatFlags(iFormatFlags); @@ -991,7 +991,7 @@ public final class DbmsXplan extends org.jooq.impl.PackageImpl { * @param planCur * @param iFormatFlags */ - public static org.jooq.Field prepareRecords(org.jooq.Field> planCur, org.jooq.Field iFormatFlags) { + public static org.jooq.Field prepareRecords(org.jooq.Field> planCur, org.jooq.Field iFormatFlags) { org.jooq.examples.oracle.sys.packages.dbms_xplan.PrepareRecords f = new org.jooq.examples.oracle.sys.packages.dbms_xplan.PrepareRecords(); f.setPlanCur(planCur); f.setIFormatFlags(iFormatFlags); diff --git a/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/Display.java b/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/Display.java index 5a5fbd6a39..f59e66caf0 100644 --- a/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/Display.java +++ b/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/Display.java @@ -6,18 +6,15 @@ package org.jooq.examples.oracle.sys.packages.dbms_xplan; /** * This class is generated by jOOQ. */ -public class Display extends org.jooq.impl.AbstractRoutine { +public class Display extends org.jooq.impl.AbstractRoutine { - private static final long serialVersionUID = 430031880; + private static final long serialVersionUID = -1631181207; /** * An uncommented item - * - * The SQL type of this item (TABLE, DBMS_XPLAN_TYPE_TABLE) could not be mapped.
- * Deserialising this field might not work! */ - public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.util.oracle.OracleDataType.getDefaultDataType("TABLE")); + public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType().asArrayDataType(org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord.class)); /** * An uncommented item @@ -43,7 +40,7 @@ public class Display extends org.jooq.impl.AbstractRoutine { * Create a new routine call instance */ public Display() { - super(org.jooq.SQLDialect.ORACLE, "DISPLAY", org.jooq.examples.oracle.sys.Sys.SYS, org.jooq.examples.oracle.sys.packages.DbmsXplan.DBMS_XPLAN, org.jooq.util.oracle.OracleDataType.getDefaultDataType("TABLE")); + super(org.jooq.SQLDialect.ORACLE, "DISPLAY", org.jooq.examples.oracle.sys.Sys.SYS, org.jooq.examples.oracle.sys.packages.DbmsXplan.DBMS_XPLAN, org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType().asArrayDataType(org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord.class)); setReturnParameter(RETURN_VALUE); addInParameter(TABLE_NAME); diff --git a/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/DisplayAwr.java b/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/DisplayAwr.java index 303ade50fc..c6ee86975f 100644 --- a/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/DisplayAwr.java +++ b/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/DisplayAwr.java @@ -6,18 +6,15 @@ package org.jooq.examples.oracle.sys.packages.dbms_xplan; /** * This class is generated by jOOQ. */ -public class DisplayAwr extends org.jooq.impl.AbstractRoutine { +public class DisplayAwr extends org.jooq.impl.AbstractRoutine { - private static final long serialVersionUID = -1809119387; + private static final long serialVersionUID = -2009883404; /** * An uncommented item - * - * The SQL type of this item (TABLE, DBMS_XPLAN_TYPE_TABLE) could not be mapped.
- * Deserialising this field might not work! */ - public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.util.oracle.OracleDataType.getDefaultDataType("TABLE")); + public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType().asArrayDataType(org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord.class)); /** * An uncommented item @@ -43,7 +40,7 @@ public class DisplayAwr extends org.jooq.impl.AbstractRoutine * Create a new routine call instance */ public DisplayAwr() { - super(org.jooq.SQLDialect.ORACLE, "DISPLAY_AWR", org.jooq.examples.oracle.sys.Sys.SYS, org.jooq.examples.oracle.sys.packages.DbmsXplan.DBMS_XPLAN, org.jooq.util.oracle.OracleDataType.getDefaultDataType("TABLE")); + super(org.jooq.SQLDialect.ORACLE, "DISPLAY_AWR", org.jooq.examples.oracle.sys.Sys.SYS, org.jooq.examples.oracle.sys.packages.DbmsXplan.DBMS_XPLAN, org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType().asArrayDataType(org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord.class)); setReturnParameter(RETURN_VALUE); addInParameter(SQL_ID); diff --git a/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/DisplayCursor.java b/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/DisplayCursor.java index 07d1739980..b63796ef45 100644 --- a/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/DisplayCursor.java +++ b/jOOQ-test/examples/org/jooq/examples/oracle/sys/packages/dbms_xplan/DisplayCursor.java @@ -6,18 +6,15 @@ package org.jooq.examples.oracle.sys.packages.dbms_xplan; /** * This class is generated by jOOQ. */ -public class DisplayCursor extends org.jooq.impl.AbstractRoutine { +public class DisplayCursor extends org.jooq.impl.AbstractRoutine { - private static final long serialVersionUID = -1511371830; + private static final long serialVersionUID = -520700923; /** * An uncommented item - * - * The SQL type of this item (TABLE, DBMS_XPLAN_TYPE_TABLE) could not be mapped.
- * Deserialising this field might not work! */ - public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.util.oracle.OracleDataType.getDefaultDataType("TABLE")); + public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType().asArrayDataType(org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord.class)); /** * An uncommented item @@ -38,7 +35,7 @@ public class DisplayCursor extends org.jooq.impl.AbstractRoutine { +public class DisplaySqlPlanBaseline extends org.jooq.impl.AbstractRoutine { - private static final long serialVersionUID = 447700993; + private static final long serialVersionUID = 1736754896; /** * An uncommented item - * - * The SQL type of this item (TABLE, DBMS_XPLAN_TYPE_TABLE) could not be mapped.
- * Deserialising this field might not work! */ - public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.util.oracle.OracleDataType.getDefaultDataType("TABLE")); + public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType().asArrayDataType(org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord.class)); /** * An uncommented item @@ -38,7 +35,7 @@ public class DisplaySqlPlanBaseline extends org.jooq.impl.AbstractRoutine { +public class DisplaySqlset extends org.jooq.impl.AbstractRoutine { - private static final long serialVersionUID = 865564927; + private static final long serialVersionUID = 463536992; /** * An uncommented item - * - * The SQL type of this item (TABLE, DBMS_XPLAN_TYPE_TABLE) could not be mapped.
- * Deserialising this field might not work! */ - public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.util.oracle.OracleDataType.getDefaultDataType("TABLE")); + public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType().asArrayDataType(org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord.class)); /** * An uncommented item @@ -48,7 +45,7 @@ public class DisplaySqlset extends org.jooq.impl.AbstractRoutine { +public class PrepareRecords extends org.jooq.impl.AbstractRoutine { - private static final long serialVersionUID = -969119677; + private static final long serialVersionUID = 1188041584; /** * An uncommented item - * - * The SQL type of this item (TABLE, DBMS_XPLAN_TYPE_TABLE) could not be mapped.
- * Deserialising this field might not work! */ - public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.util.oracle.OracleDataType.getDefaultDataType("TABLE")); + public static final org.jooq.Parameter RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType().asArrayDataType(org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeTableRecord.class)); /** * An uncommented item @@ -33,7 +30,7 @@ public class PrepareRecords extends org.jooq.impl.AbstractRoutine { + + private static final long serialVersionUID = -1806027566; + + /** + * The singleton instance of DBMS_XPLAN_TYPE + */ + public static final org.jooq.examples.oracle.sys.udt.DbmsXplanType DBMS_XPLAN_TYPE = new org.jooq.examples.oracle.sys.udt.DbmsXplanType(); + + /** + * The class holding records for this type + */ + private static final java.lang.Class __RECORD_TYPE = org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeRecord.class; + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return __RECORD_TYPE; + } + + /** + * An uncommented item + */ + public static final org.jooq.UDTField PLAN_TABLE_OUTPUT = createField("PLAN_TABLE_OUTPUT", org.jooq.impl.SQLDataType.VARCHAR, DBMS_XPLAN_TYPE); + + /** + * No further instances allowed + */ + private DbmsXplanType() { + super("DBMS_XPLAN_TYPE", org.jooq.examples.oracle.sys.Sys.SYS); + } +} diff --git a/jOOQ-test/examples/org/jooq/examples/oracle/sys/udt/records/DbmsXplanTypeRecord.java b/jOOQ-test/examples/org/jooq/examples/oracle/sys/udt/records/DbmsXplanTypeRecord.java new file mode 100644 index 0000000000..6ed3150926 --- /dev/null +++ b/jOOQ-test/examples/org/jooq/examples/oracle/sys/udt/records/DbmsXplanTypeRecord.java @@ -0,0 +1,31 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.examples.oracle.sys.udt.records; + +/** + * This class is generated by jOOQ. + */ +public class DbmsXplanTypeRecord extends org.jooq.impl.UDTRecordImpl { + + private static final long serialVersionUID = -323908679; + + + /** + * An uncommented item + */ + public void setPlanTableOutput(java.lang.String value) { + setValue(org.jooq.examples.oracle.sys.udt.DbmsXplanType.PLAN_TABLE_OUTPUT, value); + } + + /** + * An uncommented item + */ + public java.lang.String getPlanTableOutput() { + return getValue(org.jooq.examples.oracle.sys.udt.DbmsXplanType.PLAN_TABLE_OUTPUT); + } + + public DbmsXplanTypeRecord() { + super(org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE); + } +} diff --git a/jOOQ-test/examples/org/jooq/examples/oracle/sys/udt/records/DbmsXplanTypeTableRecord.java b/jOOQ-test/examples/org/jooq/examples/oracle/sys/udt/records/DbmsXplanTypeTableRecord.java new file mode 100644 index 0000000000..573e4d6628 --- /dev/null +++ b/jOOQ-test/examples/org/jooq/examples/oracle/sys/udt/records/DbmsXplanTypeTableRecord.java @@ -0,0 +1,26 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.examples.oracle.sys.udt.records; + +/** + * This class is generated by jOOQ. + */ +public class DbmsXplanTypeTableRecord extends org.jooq.impl.ArrayRecordImpl { + + private static final long serialVersionUID = -1946214818; + + public DbmsXplanTypeTableRecord(org.jooq.Configuration configuration) { + super("SYS.DBMS_XPLAN_TYPE_TABLE", org.jooq.examples.oracle.sys.udt.DbmsXplanType.DBMS_XPLAN_TYPE.getDataType(), configuration); + } + + public DbmsXplanTypeTableRecord(org.jooq.Configuration configuration, org.jooq.examples.oracle.sys.udt.records.DbmsXplanTypeRecord... array) { + this(configuration); + set(array); + } + + public DbmsXplanTypeTableRecord(org.jooq.Configuration configuration, java.util.List list) { + this(configuration); + setList(list); + } +} diff --git a/jOOQ-test/launch/GenerationTool Oracle sys-test.launch b/jOOQ-test/launch/GenerationTool Oracle sys-test.launch index 34322b12e1..3b0e7bbe8c 100644 --- a/jOOQ-test/launch/GenerationTool Oracle sys-test.launch +++ b/jOOQ-test/launch/GenerationTool Oracle sys-test.launch @@ -12,14 +12,13 @@ - - + - - + +