[#1376] Oracle UDTs in REF CURSORs are not deserialised correctly from

procedure OUT parameters
[#1377] Oracle UDTs are not deserialised correctly when the same UDT
name is present in multiple schemata
This commit is contained in:
Lukas Eder 2012-04-29 11:26:57 +02:00
parent 0f048d48f1
commit db2b2ac946
42 changed files with 157 additions and 268 deletions

View File

@ -1236,16 +1236,13 @@ public class DefaultGenerator implements Generator {
out.println("\t\tsuper(\"" + udt.getOutputName() + "\");");
}
out.println();
out.println("\t\t// Initialise data type");
out.println("\t\tgetDataType();");
out.println("\t}");
out.println("}");
out.close();
if (outS != null) {
outS.printInitialisationStatement(
"addMapping(\"" + udt.getQualifiedOutputName() + "\", " +
strategy.getFullJavaClassName(udt, Mode.RECORD) + ".class);");
}
} catch (Exception e) {
log.error("Error while generating udt " + udt, e);
}
@ -2308,18 +2305,6 @@ public class DefaultGenerator implements Generator {
}
private void printRecordTypeMethod(Definition definition, GenerationWriter out) {
out.println();
out.println("\t/**");
out.println("\t * The class holding records for this type");
out.println("\t */");
out.print("\tprivate static final ");
out.print(Class.class);
out.print("<");
out.print(strategy.getFullJavaClassName(definition, Mode.RECORD));
out.print("> __RECORD_TYPE = ");
out.print(strategy.getFullJavaClassName(definition, Mode.RECORD));
out.println(".class;");
out.println();
out.println("\t/**");
out.println("\t * The class holding records for this type");
@ -2330,7 +2315,9 @@ public class DefaultGenerator implements Generator {
out.print("<");
out.print(strategy.getFullJavaClassName(definition, Mode.RECORD));
out.println("> getRecordType() {");
out.println("\t\treturn __RECORD_TYPE;");
out.print("\t\treturn ");
out.print(strategy.getFullJavaClassName(definition, Mode.RECORD));
out.println(".class;");
out.println("\t}");
}

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.multi_schema.tables;
*/
public class TAuthor extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TAuthorRecord> {
private static final long serialVersionUID = -294859876;
private static final long serialVersionUID = 22428830;
/**
* The singleton instance of MULTI_SCHEMA.T_AUTHOR
*/
public static final org.jooq.test.oracle.generatedclasses.multi_schema.tables.TAuthor T_AUTHOR = new org.jooq.test.oracle.generatedclasses.multi_schema.tables.TAuthor();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TAuthorRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TAuthorRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TAuthorRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TAuthorRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.multi_schema.tables;
*/
public class TBook extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookRecord> {
private static final long serialVersionUID = -751508949;
private static final long serialVersionUID = 2009502471;
/**
* The singleton instance of MULTI_SCHEMA.T_BOOK
*/
public static final org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook T_BOOK = new org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBook();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.multi_schema.tables;
*/
public class TBookSale extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookSaleRecord> {
private static final long serialVersionUID = 2011577749;
private static final long serialVersionUID = -1029867998;
/**
* The singleton instance of MULTI_SCHEMA.T_BOOK_SALE
*/
public static final org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBookSale T_BOOK_SALE = new org.jooq.test.oracle.generatedclasses.multi_schema.tables.TBookSale();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookSaleRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookSaleRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookSaleRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.multi_schema.tables.records.TBookSaleRecord.class;
}
/**

View File

@ -8,7 +8,7 @@ package org.jooq.test.oracle.generatedclasses.test;
*/
public class Test extends org.jooq.impl.SchemaImpl {
private static final long serialVersionUID = -1457205035;
private static final long serialVersionUID = 1732742543;
/**
* The singleton instance of TEST
@ -22,19 +22,6 @@ public class Test extends org.jooq.impl.SchemaImpl {
super("TEST");
}
/*
* instance initialiser
*/
{
addMapping("TEST.O_INVALID_TYPE", org.jooq.test.oracle.generatedclasses.test.udt.records.OInvalidTypeRecord.class);
addMapping("TEST.U_ADDRESS_TYPE", org.jooq.test.oracle.generatedclasses.test.udt.records.UAddressTypeRecord.class);
addMapping("TEST.U_AUTHOR_TYPE", org.jooq.test.oracle.generatedclasses.test.udt.records.UAuthorTypeRecord.class);
addMapping("TEST.U_BOOK_TYPE", org.jooq.test.oracle.generatedclasses.test.udt.records.UBookTypeRecord.class);
addMapping("TEST.U_INVALID_TABLE", org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTableRecord.class);
addMapping("TEST.U_INVALID_TYPE", org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTypeRecord.class);
addMapping("TEST.U_STREET_TYPE", org.jooq.test.oracle.generatedclasses.test.udt.records.UStreetTypeRecord.class);
}
@Override
public final java.util.List<org.jooq.Sequence<?>> getSequences() {
return java.util.Arrays.<org.jooq.Sequence<?>>asList(

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TArrays extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TArraysRecord> {
private static final long serialVersionUID = -1067175958;
private static final long serialVersionUID = -2005499030;
/**
* The singleton instance of TEST.T_ARRAYS
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TArrays T_ARRAYS = new org.jooq.test.oracle.generatedclasses.test.tables.TArrays();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TArraysRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TArraysRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TArraysRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TArraysRecord.class;
}
/**

View File

@ -10,24 +10,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TAuthor extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TAuthorRecord> {
private static final long serialVersionUID = 892787808;
private static final long serialVersionUID = -542036445;
/**
* The singleton instance of TEST.T_AUTHOR
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TAuthor T_AUTHOR = new org.jooq.test.oracle.generatedclasses.test.tables.TAuthor();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TAuthorRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TAuthorRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TAuthorRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TAuthorRecord.class;
}
/**

View File

@ -10,24 +10,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TBook extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookRecord> {
private static final long serialVersionUID = 1355543379;
private static final long serialVersionUID = 120738046;
/**
* The singleton instance of TEST.T_BOOK
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TBook T_BOOK = new org.jooq.test.oracle.generatedclasses.test.tables.TBook();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TBookRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TBookRecord.class;
}
/**

View File

@ -10,24 +10,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TBookStore extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookStoreRecord> {
private static final long serialVersionUID = 230577132;
private static final long serialVersionUID = -2024049582;
/**
* The singleton instance of TEST.T_BOOK_STORE
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TBookStore T_BOOK_STORE = new org.jooq.test.oracle.generatedclasses.test.tables.TBookStore();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookStoreRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TBookStoreRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookStoreRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TBookStoreRecord.class;
}
/**

View File

@ -10,24 +10,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TBookToBookStore extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookToBookStoreRecord> {
private static final long serialVersionUID = 1810615556;
private static final long serialVersionUID = 1299930174;
/**
* The singleton instance of TEST.T_BOOK_TO_BOOK_STORE
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TBookToBookStore T_BOOK_TO_BOOK_STORE = new org.jooq.test.oracle.generatedclasses.test.tables.TBookToBookStore();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookToBookStoreRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TBookToBookStoreRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TBookToBookStoreRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TBookToBookStoreRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TBooleans extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TBooleansRecord> {
private static final long serialVersionUID = 1967935987;
private static final long serialVersionUID = 2070720036;
/**
* The singleton instance of TEST.T_BOOLEANS
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TBooleans T_BOOLEANS = new org.jooq.test.oracle.generatedclasses.test.tables.TBooleans();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TBooleansRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TBooleansRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TBooleansRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TBooleansRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TDates extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TDatesRecord> {
private static final long serialVersionUID = 874852289;
private static final long serialVersionUID = -1916070700;
/**
* The singleton instance of TEST.T_DATES
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TDates T_DATES = new org.jooq.test.oracle.generatedclasses.test.tables.TDates();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TDatesRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TDatesRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TDatesRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TDatesRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TDirectory extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord> {
private static final long serialVersionUID = 112930244;
private static final long serialVersionUID = -629533879;
/**
* The singleton instance of TEST.T_DIRECTORY
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TDirectory T_DIRECTORY = new org.jooq.test.oracle.generatedclasses.test.tables.TDirectory();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class TTriggers extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TTriggersRecord> {
private static final long serialVersionUID = -614120380;
private static final long serialVersionUID = 1412664963;
/**
* The singleton instance of TEST.T_TRIGGERS
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.TTriggers T_TRIGGERS = new org.jooq.test.oracle.generatedclasses.test.tables.TTriggers();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TTriggersRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.TTriggersRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.TTriggersRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.TTriggersRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class T_639NumbersTable extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.T_639NumbersTableRecord> {
private static final long serialVersionUID = 1821854630;
private static final long serialVersionUID = 1742982507;
/**
* The singleton instance of TEST.T_639_NUMBERS_TABLE
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.T_639NumbersTable T_639_NUMBERS_TABLE = new org.jooq.test.oracle.generatedclasses.test.tables.T_639NumbersTable();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.T_639NumbersTableRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.T_639NumbersTableRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.T_639NumbersTableRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.T_639NumbersTableRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class T_658Ref extends org.jooq.impl.TableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.T_658RefRecord> {
private static final long serialVersionUID = -1359920516;
private static final long serialVersionUID = 288951795;
/**
* 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
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.T_658RefRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.T_658RefRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.T_658RefRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.T_658RefRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class T_725LobTest extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.T_725LobTestRecord> {
private static final long serialVersionUID = -1309534462;
private static final long serialVersionUID = 406265282;
/**
* The singleton instance of TEST.T_725_LOB_TEST
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.T_725LobTest T_725_LOB_TEST = new org.jooq.test.oracle.generatedclasses.test.tables.T_725LobTest();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.T_725LobTestRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.T_725LobTestRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.T_725LobTestRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.T_725LobTestRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class T_785 extends org.jooq.impl.TableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.T_785Record> {
private static final long serialVersionUID = 1246385422;
private static final long serialVersionUID = -938418197;
/**
* The singleton instance of TEST.T_785
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.T_785 T_785 = new org.jooq.test.oracle.generatedclasses.test.tables.T_785();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.T_785Record> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.T_785Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.T_785Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.T_785Record.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class VAuthor extends org.jooq.impl.TableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.VAuthorRecord> {
private static final long serialVersionUID = -2083725464;
private static final long serialVersionUID = 818640025;
/**
* The singleton instance of TEST.V_AUTHOR
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.VAuthor V_AUTHOR = new org.jooq.test.oracle.generatedclasses.test.tables.VAuthor();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.VAuthorRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.VAuthorRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.VAuthorRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.VAuthorRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class VBook extends org.jooq.impl.TableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.VBookRecord> {
private static final long serialVersionUID = -1457728164;
private static final long serialVersionUID = -639992223;
/**
* The singleton instance of TEST.V_BOOK
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.VBook V_BOOK = new org.jooq.test.oracle.generatedclasses.test.tables.VBook();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.VBookRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.VBookRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.VBookRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.VBookRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class VIncomplete extends org.jooq.impl.TableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.VIncompleteRecord> {
private static final long serialVersionUID = 1048461901;
private static final long serialVersionUID = 571561915;
/**
* The singleton instance of TEST.V_INCOMPLETE
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.VIncomplete V_INCOMPLETE = new org.jooq.test.oracle.generatedclasses.test.tables.VIncomplete();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.VIncompleteRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.VIncompleteRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.VIncompleteRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.VIncompleteRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class VLibrary extends org.jooq.impl.TableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.VLibraryRecord> {
private static final long serialVersionUID = -973619996;
private static final long serialVersionUID = 314494363;
/**
* The singleton instance of TEST.V_LIBRARY
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.VLibrary V_LIBRARY = new org.jooq.test.oracle.generatedclasses.test.tables.VLibrary();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.VLibraryRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.VLibraryRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.VLibraryRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.VLibraryRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class XTestCase_64_69 extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_64_69Record> {
private static final long serialVersionUID = 2017279273;
private static final long serialVersionUID = -979482356;
/**
* The singleton instance of TEST.X_TEST_CASE_64_69
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.XTestCase_64_69 X_TEST_CASE_64_69 = new org.jooq.test.oracle.generatedclasses.test.tables.XTestCase_64_69();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_64_69Record> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_64_69Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_64_69Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_64_69Record.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class XTestCase_71 extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_71Record> {
private static final long serialVersionUID = -2009296289;
private static final long serialVersionUID = 1429364680;
/**
* The singleton instance of TEST.X_TEST_CASE_71
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.XTestCase_71 X_TEST_CASE_71 = new org.jooq.test.oracle.generatedclasses.test.tables.XTestCase_71();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_71Record> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_71Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_71Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_71Record.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class XTestCase_85 extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_85Record> {
private static final long serialVersionUID = 2002244259;
private static final long serialVersionUID = 663435587;
/**
* The singleton instance of TEST.X_TEST_CASE_85
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.XTestCase_85 X_TEST_CASE_85 = new org.jooq.test.oracle.generatedclasses.test.tables.XTestCase_85();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_85Record> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_85Record.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_85Record> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.XTestCase_85Record.class;
}
/**

View File

@ -10,24 +10,19 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
*/
public class XUnused extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.XUnusedRecord> {
private static final long serialVersionUID = -1436757446;
private static final long serialVersionUID = 1603790578;
/**
* The singleton instance of TEST.X_UNUSED
*/
public static final org.jooq.test.oracle.generatedclasses.test.tables.XUnused X_UNUSED = new org.jooq.test.oracle.generatedclasses.test.tables.XUnused();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.XUnusedRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.tables.records.XUnusedRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.tables.records.XUnusedRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.tables.records.XUnusedRecord.class;
}
/**

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.udt;
*/
public class OInvalidType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.generatedclasses.test.udt.records.OInvalidTypeRecord> {
private static final long serialVersionUID = -1986558646;
private static final long serialVersionUID = -2016738739;
/**
* The singleton instance of TEST.O_INVALID_TYPE
*/
public static final org.jooq.test.oracle.generatedclasses.test.udt.OInvalidType O_INVALID_TYPE = new org.jooq.test.oracle.generatedclasses.test.udt.OInvalidType();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.OInvalidTypeRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.udt.records.OInvalidTypeRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.OInvalidTypeRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.udt.records.OInvalidTypeRecord.class;
}
/**
@ -33,5 +28,8 @@ public class OInvalidType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.gen
*/
private OInvalidType() {
super("O_INVALID_TYPE", org.jooq.test.oracle.generatedclasses.test.Test.TEST);
// Initialise data type
getDataType();
}
}

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.udt;
*/
public class UAddressType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.generatedclasses.test.udt.records.UAddressTypeRecord> {
private static final long serialVersionUID = -849475538;
private static final long serialVersionUID = -418710114;
/**
* The singleton instance of TEST.U_ADDRESS_TYPE
*/
public static final org.jooq.test.oracle.generatedclasses.test.udt.UAddressType U_ADDRESS_TYPE = new org.jooq.test.oracle.generatedclasses.test.udt.UAddressType();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UAddressTypeRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.udt.records.UAddressTypeRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UAddressTypeRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.udt.records.UAddressTypeRecord.class;
}
/**
@ -73,5 +68,8 @@ public class UAddressType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.gen
*/
private UAddressType() {
super("U_ADDRESS_TYPE", org.jooq.test.oracle.generatedclasses.test.Test.TEST);
// Initialise data type
getDataType();
}
}

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.udt;
*/
public class UAuthorType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.generatedclasses.test.udt.records.UAuthorTypeRecord> implements org.jooq.Package {
private static final long serialVersionUID = -703790379;
private static final long serialVersionUID = 246883278;
/**
* The singleton instance of TEST.U_AUTHOR_TYPE
*/
public static final org.jooq.test.oracle.generatedclasses.test.udt.UAuthorType U_AUTHOR_TYPE = new org.jooq.test.oracle.generatedclasses.test.udt.UAuthorType();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UAuthorTypeRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.udt.records.UAuthorTypeRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UAuthorTypeRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.udt.records.UAuthorTypeRecord.class;
}
/**
@ -117,5 +112,8 @@ public class UAuthorType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.gene
*/
private UAuthorType() {
super("U_AUTHOR_TYPE", org.jooq.test.oracle.generatedclasses.test.Test.TEST);
// Initialise data type
getDataType();
}
}

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.udt;
*/
public class UBookType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.generatedclasses.test.udt.records.UBookTypeRecord> {
private static final long serialVersionUID = -233352372;
private static final long serialVersionUID = -1690422101;
/**
* The singleton instance of TEST.U_BOOK_TYPE
*/
public static final org.jooq.test.oracle.generatedclasses.test.udt.UBookType U_BOOK_TYPE = new org.jooq.test.oracle.generatedclasses.test.udt.UBookType();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UBookTypeRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.udt.records.UBookTypeRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UBookTypeRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.udt.records.UBookTypeRecord.class;
}
/**
@ -43,5 +38,8 @@ public class UBookType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.genera
*/
private UBookType() {
super("U_BOOK_TYPE", org.jooq.test.oracle.generatedclasses.test.Test.TEST);
// Initialise data type
getDataType();
}
}

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.udt;
*/
public class UInvalidTable extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTableRecord> {
private static final long serialVersionUID = -1097523452;
private static final long serialVersionUID = 361056103;
/**
* The singleton instance of TEST.U_INVALID_TABLE
*/
public static final org.jooq.test.oracle.generatedclasses.test.udt.UInvalidTable U_INVALID_TABLE = new org.jooq.test.oracle.generatedclasses.test.udt.UInvalidTable();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTableRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTableRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTableRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTableRecord.class;
}
/**
@ -33,5 +28,8 @@ public class UInvalidTable extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.ge
*/
private UInvalidTable() {
super("U_INVALID_TABLE", org.jooq.test.oracle.generatedclasses.test.Test.TEST);
// Initialise data type
getDataType();
}
}

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.udt;
*/
public class UInvalidType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTypeRecord> {
private static final long serialVersionUID = -1194068720;
private static final long serialVersionUID = -825181583;
/**
* The singleton instance of TEST.U_INVALID_TYPE
*/
public static final org.jooq.test.oracle.generatedclasses.test.udt.UInvalidType U_INVALID_TYPE = new org.jooq.test.oracle.generatedclasses.test.udt.UInvalidType();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTypeRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTypeRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTypeRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.udt.records.UInvalidTypeRecord.class;
}
/**
@ -33,5 +28,8 @@ public class UInvalidType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.gen
*/
private UInvalidType() {
super("U_INVALID_TYPE", org.jooq.test.oracle.generatedclasses.test.Test.TEST);
// Initialise data type
getDataType();
}
}

View File

@ -8,24 +8,19 @@ package org.jooq.test.oracle.generatedclasses.test.udt;
*/
public class UStreetType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.generatedclasses.test.udt.records.UStreetTypeRecord> {
private static final long serialVersionUID = -948161688;
private static final long serialVersionUID = 1522757917;
/**
* The singleton instance of TEST.U_STREET_TYPE
*/
public static final org.jooq.test.oracle.generatedclasses.test.udt.UStreetType U_STREET_TYPE = new org.jooq.test.oracle.generatedclasses.test.udt.UStreetType();
/**
* The class holding records for this type
*/
private static final java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UStreetTypeRecord> __RECORD_TYPE = org.jooq.test.oracle.generatedclasses.test.udt.records.UStreetTypeRecord.class;
/**
* The class holding records for this type
*/
@Override
public java.lang.Class<org.jooq.test.oracle.generatedclasses.test.udt.records.UStreetTypeRecord> getRecordType() {
return __RECORD_TYPE;
return org.jooq.test.oracle.generatedclasses.test.udt.records.UStreetTypeRecord.class;
}
/**
@ -58,5 +53,8 @@ public class UStreetType extends org.jooq.impl.UDTImpl<org.jooq.test.oracle.gene
*/
private UStreetType() {
super("U_STREET_TYPE", org.jooq.test.oracle.generatedclasses.test.Test.TEST);
// Initialise data type
getDataType();
}
}

View File

@ -55,7 +55,9 @@ public interface Schema extends NamedQueryPart {
* methods.
*
* @see UDT#getTypeMapping() for a UDT-specific type mapping
* @deprecated - 2.3.0 - Do not reuse this method
*/
@Deprecated
Map<String, Class<?>> getTypeMapping();
/**

View File

@ -56,7 +56,10 @@ public interface UDT<R extends UDTRecord<R>> extends Type<R> {
*
* @see Schema#getTypeMapping() for the {@link Schema}'s complete type
* mapping
* @deprecated - 2.3.0 - Do not reuse this method. It will be moved to
* jOOQ's internals, soon
*/
@Deprecated
Map<String, Class<?>> getTypeMapping() throws SQLException;
/**

View File

@ -175,16 +175,10 @@ public class ArrayRecordImpl<T> extends AbstractStore<T> implements ArrayRecord<
else {
Object o;
// [#1179] This is needed to load TABLE OF OBJECT
// [#1179 #1376 #1377] This is needed to load TABLE OF OBJECT
// [#884] TODO: This name is used in inlined SQL. It should be
// correctly escaped and schema mapped!
if (schema != null) {
o = array.getArray(schema.getTypeMapping());
}
else {
o = array.getArray();
}
o = array.getArray(DataTypes.udtRecords());
this.array = Convert.convert(o, type.getArrayType());
}
}

View File

@ -35,6 +35,11 @@
*/
package org.jooq.impl;
import java.sql.Array;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@ -49,7 +54,8 @@ import org.jooq.exception.DataTypeException;
*/
final class DataTypes {
private static final Map<Class<?>, Converter<?, ?>> CONVERTERS = new HashMap<Class<?>, Converter<?, ?>>();
private static final Map<Class<?>, Converter<?, ?>> CONVERTERS = new HashMap<Class<?>, Converter<?, ?>>();
private static final Map<String, Class<?>> UDT_RECORDS = new HashMap<String, Class<?>>();
// ------------------------------------------------------------------------
// XXX: Public API used for initialisation from generated artefacts
@ -102,6 +108,23 @@ final class DataTypes {
}
}
/**
* Register a type mapping for a UDT
* <p>
* This registers a Java type for a given UDT as expected in various JDBC
* methods, such as {@link Connection#setTypeMap(Map)},
* {@link ResultSet#getObject(int, Map)}, {@link Array#getArray(Map)},
* {@link CallableStatement#getObject(int, Map)}, etc.
*/
static final synchronized void registerUDTRecord(String name, Class<?> type) {
// A mapping can be registered only once
if (!UDT_RECORDS.containsKey(name)) {
UDT_RECORDS.put(name, type);
}
}
// ------------------------------------------------------------------------
// XXX: Internal API
// ------------------------------------------------------------------------
@ -113,6 +136,10 @@ final class DataTypes {
return (Converter<?, U>) CONVERTERS.get(customType);
}
static final Map<String, Class<?>> udtRecords() {
return Collections.unmodifiableMap(UDT_RECORDS);
}
/**
* No instances
*/

View File

@ -515,7 +515,7 @@ public final class FieldTypeHelper {
return (T) pgNewUDTRecord(type, rs.getObject(index));
}
return (T) rs.getObject(index, getTypeMapping(type));
return (T) rs.getObject(index, DataTypes.udtRecords());
}
else if (Result.class.isAssignableFrom(type)) {
ResultSet nested = (ResultSet) rs.getObject(index);
@ -661,6 +661,10 @@ public final class FieldTypeHelper {
}
}
/**
* @deprecated - 2.3.0 - Do not reuse this method
*/
@Deprecated
public static Map<String, Class<?>> getTypeMapping(Class<?> udtType) throws SQLException {
try {
return ((UDTRecord<?>) udtType.newInstance()).getUDT().getTypeMapping();
@ -830,7 +834,7 @@ public final class FieldTypeHelper {
return (T) pgNewUDTRecord(type, stmt.getObject(index));
}
return (T) stmt.getObject(index, getTypeMapping(type));
return (T) stmt.getObject(index, DataTypes.udtRecords());
}
else if (Result.class.isAssignableFrom(type)) {
ResultSet nested = (ResultSet) stmt.getObject(index);

View File

@ -103,10 +103,7 @@ class MetaDataFieldProvider implements FieldProvider, Serializable {
int precision = meta.getPrecision(i);
int scale = meta.getScale(i);
DataType<?> dataType = SQLDataType.OTHER;
// TODO: [#650] Find a more intelligent way to strip the
// schema from Oracle UDT names!
String type = meta.getColumnTypeName(i).replaceAll(".*\\.", "");
String type = meta.getColumnTypeName(i);
try {
dataType = FieldTypeHelper.getDialectDataType(configuration.getDialect(), type, precision, scale);

View File

@ -60,6 +60,7 @@ public class SchemaImpl extends AbstractNamedQueryPart implements Schema {
private static final long serialVersionUID = -8101463810207566546L;
@Deprecated
private final Map<String, Class<?>> typeMapping;
public SchemaImpl(String name) {
@ -82,12 +83,17 @@ public class SchemaImpl extends AbstractNamedQueryPart implements Schema {
}
@Override
@Deprecated
public final Map<String, Class<?>> getTypeMapping() {
return Collections.unmodifiableMap(typeMapping);
}
protected final void addMapping(String name, Class<?> type) {
typeMapping.put(name, type);
/**
* @deprecated - 2.3.0 - regenerate your schema
*/
@Deprecated
protected final void addMapping(String name, Class<?> recordType) {
typeMapping.put(name, recordType);
}
@Override

View File

@ -51,6 +51,20 @@ class UDTDataType<R extends UDTRecord<R>> extends AbstractDataType<R> {
@SuppressWarnings("deprecation")
UDTDataType(UDT<R> udt) {
super(SQLDialect.SQL99, null, udt.getRecordType(), udt.getName());
super(SQLDialect.SQL99, null, udt.getRecordType(), getQualifiedName(udt));
DataTypes.registerUDTRecord(getQualifiedName(udt), udt.getRecordType());
}
private static String getQualifiedName(UDT<?> udt) {
StringBuilder sb = new StringBuilder();
if (udt.getSchema() != null) {
sb.append(udt.getSchema().getName());
sb.append(".");
}
sb.append(udt.getName());
return sb.toString();
}
}

View File

@ -65,6 +65,7 @@ public class UDTImpl<R extends UDTRecord<R>> extends AbstractType<R> implements
private final FieldList fields;
private transient DataType<R> type;
@Deprecated
private transient Map<String, Class<?>> typeMapping;
public UDTImpl(String name, Schema schema) {
@ -93,6 +94,7 @@ public class UDTImpl<R extends UDTRecord<R>> extends AbstractType<R> implements
}
@Override
@Deprecated
public final synchronized Map<String, Class<?>> getTypeMapping() throws SQLException {
if (typeMapping == null) {
typeMapping = new HashMap<String, Class<?>>();