diff --git a/jOOQ-codegen/src/main/java/org/jooq/codegen/Generator.java b/jOOQ-codegen/src/main/java/org/jooq/codegen/Generator.java index fb28debcf0..7ed02ed0c4 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/codegen/Generator.java +++ b/jOOQ-codegen/src/main/java/org/jooq/codegen/Generator.java @@ -43,6 +43,7 @@ import java.util.Locale; import org.jooq.Condition; import org.jooq.Constants; +import org.jooq.Generated; import org.jooq.JSON; import org.jooq.JSONB; import org.jooq.Name; @@ -215,12 +216,6 @@ public interface Generator { */ void setGenerateInstanceFields(boolean generateInstanceFields); - /** - * Whether the {@link javax.annotation.processing.Generated} annotation - * should be generated. - */ - boolean generateGeneratedAnnotation(); - /** * The {@link VisibilityModifier} that should be used in generated code. */ @@ -232,44 +227,54 @@ public interface Generator { VisibilityModifier generateVisibilityModifier(); /** - * Whether the {@link javax.annotation.processing.Generated} annotation - * should be generated. + * Whether a {@link Generated} annotation specified by + * {@link #generateGeneratedAnnotationType()} should be used in generated + * code. + */ + boolean generateGeneratedAnnotation(); + + /** + * Whether a {@link Generated} annotation specified by + * {@link #generateGeneratedAnnotationType()} should be used in generated + * code. */ void setGenerateGeneratedAnnotation(boolean generateGeneratedAnnotation); /** - * Whether the {@link javax.annotation.processing.Generated} annotation - * should be generated. + * The type of {@link Generated} annotation to be used in generated code. */ GeneratedAnnotationType generateGeneratedAnnotationType(); /** - * Whether the {@link javax.annotation.processing.Generated} annotation - * should be generated. + * The type of {@link Generated} annotation to be used in generated code. */ void setGenerateGeneratedAnnotationType(GeneratedAnnotationType generateGeneratedAnnotationType); /** - * Whether the {@link javax.annotation.processing.Generated} annotation - * should include the date attribute. + * Whether the {@link Generated} annotation specified by + * {@link #generateGeneratedAnnotationType()} should include the + * date attribute. */ boolean generateGeneratedAnnotationDate(); /** - * Whether the {@link javax.annotation.processing.Generated} annotation - * should include the date attribute. + * Whether the {@link Generated} annotation specified by + * {@link #generateGeneratedAnnotationType()} should include the + * date attribute. */ void setGenerateGeneratedAnnotationDate(boolean generateGeneratedAnnotationDate); /** - * Whether the {@link javax.annotation.processing.Generated} annotation - * should include the jOOQ version. + * Whether the {@link Generated} annotation specified by + * {@link #generateGeneratedAnnotationType()} should include the jOOQ + * version. */ boolean generateGeneratedAnnotationJooqVersion(); /** - * Whether the {@link javax.annotation.processing.Generated} annotation - * should include the jOOQ version. + * Whether the {@link Generated} annotation specified by + * {@link #generateGeneratedAnnotationType()} should include the jOOQ + * version. */ void setGenerateGeneratedAnnotationJooqVersion(boolean generateGeneratedAnnotationJooqVersion); diff --git a/jOOQ-codegen/src/main/java/org/jooq/codegen/JavaGenerator.java b/jOOQ-codegen/src/main/java/org/jooq/codegen/JavaGenerator.java index 52281a7be9..7a93020078 100644 --- a/jOOQ-codegen/src/main/java/org/jooq/codegen/JavaGenerator.java +++ b/jOOQ-codegen/src/main/java/org/jooq/codegen/JavaGenerator.java @@ -10327,6 +10327,9 @@ public class JavaGenerator extends AbstractGenerator { case JAVAX_ANNOTATION_PROCESSING_GENERATED: generated = "javax.annotation.processing.Generated"; break; + case JAKARTA_ANNOTATION_GENERATED: + generated = "jakarta.annotation.Generated"; + break; case ORG_JOOQ_GENERATED: generated = Generated.class.getName(); break; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java index 1cbd600408..dea948e828 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java @@ -634,8 +634,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Generate the {@link javax.annotation.processing.Generated} annotation to indicate - * jOOQ version used for source code. + * Use the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} in generated code. * * @return * possible object is @@ -647,8 +646,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Generate the {@link javax.annotation.processing.Generated} annotation to indicate - * jOOQ version used for source code. + * Use the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} in generated code. * * @param value * allowed object is @@ -660,8 +658,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Generate the {@link javax.annotation.processing.Generated} annotation to indicate - * jOOQ version used for source code. + * Specify the type of {@link org.jooq.Generated} annotation to use in generated code. * */ public GeneratedAnnotationType getGeneratedAnnotationType() { @@ -669,8 +666,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Generate the {@link javax.annotation.processing.Generated} annotation to indicate - * jOOQ version used for source code. + * Specify the type of {@link org.jooq.Generated} annotation to use in generated code. * */ public void setGeneratedAnnotationType(GeneratedAnnotationType value) { @@ -678,7 +674,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Whether the {@link javax.annotation.processing.Generated} annotation should include the date attribute. + * Whether the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} should include the date attribute. * * @return * possible object is @@ -690,7 +686,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Whether the {@link javax.annotation.processing.Generated} annotation should include the date attribute. + * Whether the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} should include the date attribute. * * @param value * allowed object is @@ -702,7 +698,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Whether the {@link javax.annotation.processing.Generated} annotation should include the jOOQ version. + * Whether the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} should include the jOOQ version. * * @return * possible object is @@ -714,7 +710,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Whether the {@link javax.annotation.processing.Generated} annotation should include the jOOQ version. + * Whether the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} should include the jOOQ version. * * @param value * allowed object is @@ -3299,8 +3295,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Generate the {@link javax.annotation.processing.Generated} annotation to indicate - * jOOQ version used for source code. + * Use the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} in generated code. * */ public Generate withGeneratedAnnotation(Boolean value) { @@ -3309,8 +3304,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Generate the {@link javax.annotation.processing.Generated} annotation to indicate - * jOOQ version used for source code. + * Specify the type of {@link org.jooq.Generated} annotation to use in generated code. * */ public Generate withGeneratedAnnotationType(GeneratedAnnotationType value) { @@ -3319,7 +3313,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Whether the {@link javax.annotation.processing.Generated} annotation should include the date attribute. + * Whether the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} should include the date attribute. * */ public Generate withGeneratedAnnotationDate(Boolean value) { @@ -3328,7 +3322,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Whether the {@link javax.annotation.processing.Generated} annotation should include the jOOQ version. + * Whether the {@link org.jooq.Generated} annotation specified by {@link #getGeneratedAnnotationType()} should include the jOOQ version. * */ public Generate withGeneratedAnnotationJooqVersion(Boolean value) { diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/GeneratedAnnotationType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/GeneratedAnnotationType.java index a5ee5b6571..7b69cbb369 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/GeneratedAnnotationType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/GeneratedAnnotationType.java @@ -15,6 +15,7 @@ import jakarta.xml.bind.annotation.XmlType; * <enumeration value="DETECT_FROM_JDK"/> * <enumeration value="JAVAX_ANNOTATION_GENERATED"/> * <enumeration value="JAVAX_ANNOTATION_PROCESSING_GENERATED"/> + * <enumeration value="JAKARTA_ANNOTATION_GENERATED"/> * <enumeration value="ORG_JOOQ_GENERATED"/> * </restriction> * </simpleType> @@ -28,6 +29,7 @@ public enum GeneratedAnnotationType { DETECT_FROM_JDK, JAVAX_ANNOTATION_GENERATED, JAVAX_ANNOTATION_PROCESSING_GENERATED, + JAKARTA_ANNOTATION_GENERATED, ORG_JOOQ_GENERATED; public String value() { diff --git a/jOOQ-meta/src/main/resources/org/jooq/meta/xsd/jooq-codegen-3.20.0.xsd b/jOOQ-meta/src/main/resources/org/jooq/meta/xsd/jooq-codegen-3.20.0.xsd index f5b51bcd5f..20f1f5f51f 100644 --- a/jOOQ-meta/src/main/resources/org/jooq/meta/xsd/jooq-codegen-3.20.0.xsd +++ b/jOOQ-meta/src/main/resources/org/jooq/meta/xsd/jooq-codegen-3.20.0.xsd @@ -2508,21 +2508,19 @@ jOOQ API, without adding custom data type bindings to them.]]> - + - + - date attribute.]]> + date attribute.]]> - + @@ -3074,6 +3072,7 @@ e.g. org.jooq.generated.schema1, org.jooq.generated.schema2]]> +