[jOOQ/jOOQ#15583] UDTImpl should use Name instead of String in
constructor
This commit is contained in:
parent
fe9e97ce6d
commit
cc452c2c45
@ -3328,10 +3328,10 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
|
||||
|
||||
if (scala) {
|
||||
out.println("%sclass %s extends %s[%s](\"%s\", null, %s, %s)[[before= with ][separator= with ][%s]] {", visibility(), className, classExtends, recordType, escapeString(udt.getOutputName()), packageId, synthetic, interfaces);
|
||||
out.println("%sclass %s extends %s[%s](%s.name(\"%s\"), null, %s, %s)[[before= with ][separator= with ][%s]] {", visibility(), className, classExtends, recordType, DSL.class, escapeString(udt.getOutputName()), packageId, synthetic, interfaces);
|
||||
}
|
||||
else if (kotlin) {
|
||||
out.println("%sopen class %s : %s<%s>(\"%s\", null, %s, %s)[[before=, ][%s]] {", visibility(), className, classExtends, recordType, escapeString(udt.getOutputName()), packageId, synthetic, interfaces);
|
||||
out.println("%sopen class %s : %s<%s>(%s.name(\"%s\"), null, %s, %s)[[before=, ][%s]] {", visibility(), className, classExtends, recordType, DSL.class, escapeString(udt.getOutputName()), packageId, synthetic, interfaces);
|
||||
|
||||
out.println();
|
||||
out.println("public companion object {");
|
||||
@ -3399,7 +3399,7 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
else {
|
||||
out.javadoc(NO_FURTHER_INSTANCES_ALLOWED);
|
||||
out.println("private %s() {", className);
|
||||
out.println("super(\"%s\", null, %s, %s);", udt.getOutputName(), packageId, synthetic);
|
||||
out.println("super(%s.name(\"%s\"), null, %s, %s);", DSL.class, udt.getOutputName(), packageId, synthetic);
|
||||
out.println("}");
|
||||
}
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ final class Snapshot extends AbstractMeta {
|
||||
|
||||
private class SnapshotUDT<R extends UDTRecord<R>> extends UDTImpl<R> {
|
||||
SnapshotUDT(SnapshotSchema schema, UDT<R> udt) {
|
||||
super(udt.getName(), schema, udt.getPackage(), udt.isSynthetic());
|
||||
super(udt.getUnqualifiedName(), schema, udt.getPackage(), udt.isSynthetic());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -37,8 +37,6 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.Tools.getMappedSchema;
|
||||
|
||||
import org.jooq.Binding;
|
||||
import org.jooq.Catalog;
|
||||
import org.jooq.Context;
|
||||
@ -65,7 +63,7 @@ import org.jetbrains.annotations.ApiStatus.Internal;
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
@Internal
|
||||
public class UDTImpl<R extends UDTRecord<R>>
|
||||
public /* non-final */ class UDTImpl<R extends UDTRecord<R>>
|
||||
extends
|
||||
AbstractNamed
|
||||
implements
|
||||
@ -80,16 +78,40 @@ implements
|
||||
private final boolean synthetic;
|
||||
private transient DataType<R> type;
|
||||
|
||||
/**
|
||||
* @deprecated - [#15583] - 3.19.0 - Please re-generate your code.
|
||||
*/
|
||||
@Deprecated
|
||||
public UDTImpl(String name, Schema schema) {
|
||||
this(DSL.name(name), schema);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - [#15583] - 3.19.0 - Please re-generate your code.
|
||||
*/
|
||||
@Deprecated
|
||||
public UDTImpl(String name, Schema schema, Package pkg) {
|
||||
this(DSL.name(name), schema, pkg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated - [#15583] - 3.19.0 - Please re-generate your code.
|
||||
*/
|
||||
@Deprecated
|
||||
public UDTImpl(String name, Schema schema, Package pkg, boolean synthetic) {
|
||||
this(DSL.name(name), schema, pkg, synthetic);
|
||||
}
|
||||
|
||||
public UDTImpl(Name name, Schema schema) {
|
||||
this(name, schema, null);
|
||||
}
|
||||
|
||||
public UDTImpl(String name, Schema schema, Package pkg) {
|
||||
public UDTImpl(Name name, Schema schema, Package pkg) {
|
||||
this(name, schema, pkg, false);
|
||||
}
|
||||
|
||||
public UDTImpl(String name, Schema schema, Package pkg, boolean synthetic) {
|
||||
super(qualify(pkg != null ? pkg : schema, DSL.name(name)), CommentImpl.NO_COMMENT);
|
||||
public UDTImpl(Name name, Schema schema, Package pkg, boolean synthetic) {
|
||||
super(qualify(pkg != null ? pkg : schema, name), CommentImpl.NO_COMMENT);
|
||||
|
||||
this.fields = new FieldsImpl<>();
|
||||
this.schema = schema;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user