HHH-18127 - Leverage hibernate-models Annotation-as-Class

This commit is contained in:
Steve Ebersole 2024-05-29 09:25:07 -05:00
parent 8636806510
commit 6eb16b9806
192 changed files with 615 additions and 1602 deletions

View File

@ -151,7 +151,8 @@ public final class AggregateComponentBinder {
null,
context.getMetadataCollector().getDatabase().toIdentifier( sqlType )
);
} }
}
}
}
final Struct struct = returnedClassOrElement.getDirectAnnotationUsage( Struct.class );

View File

@ -14,6 +14,7 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
/**
* @author Steve Ebersole
*/
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
public class AbstractXmlAnnotation implements Abstract {
public AbstractXmlAnnotation(SourceModelBuildingContext modelContext) {
}

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Access;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,7 +33,7 @@ public class AccessJpaAnnotation implements Access {
* Used in creating annotation instances from JDK variant
*/
public AccessJpaAnnotation(Access annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, JpaAnnotations.ACCESS, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -6,18 +6,16 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.Any;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.AttributeMarker;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.Any;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -37,8 +35,8 @@ public class AnyAnnotation implements Any, AttributeMarker, AttributeMarker.Fetc
* Used in creating annotation instances from JDK variant
*/
public AnyAnnotation(Any annotation, SourceModelBuildingContext modelContext) {
this.fetch = extractJdkValue( annotation, HibernateAnnotations.ANY, "fetch", modelContext );
this.optional = extractJdkValue( annotation, HibernateAnnotations.ANY, "optional", modelContext );
this.fetch = annotation.fetch();
this.optional = annotation.optional();
}
/**

View File

@ -6,17 +6,15 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyDiscriminator;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyDiscriminator;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,7 +32,7 @@ public class AnyDiscriminatorAnnotation implements AnyDiscriminator {
* Used in creating annotation instances from JDK variant
*/
public AnyDiscriminatorAnnotation(AnyDiscriminator annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.ANY_DISCRIMINATOR, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -6,17 +6,15 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyDiscriminatorValue;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyDiscriminatorValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,18 +32,8 @@ public class AnyDiscriminatorValueAnnotation implements AnyDiscriminatorValue {
* Used in creating annotation instances from JDK variant
*/
public AnyDiscriminatorValueAnnotation(AnyDiscriminatorValue annotation, SourceModelBuildingContext modelContext) {
this.discriminator = extractJdkValue(
annotation,
HibernateAnnotations.ANY_DISCRIMINATOR_VALUE,
"discriminator",
modelContext
);
this.entity = extractJdkValue(
annotation,
HibernateAnnotations.ANY_DISCRIMINATOR_VALUE,
"entity",
modelContext
);
this.discriminator = annotation.discriminator();
this.entity = annotation.entity();
}
/**

View File

@ -8,17 +8,13 @@ package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.boot.internal.AnyKeyType;
import org.hibernate.boot.models.XmlAnnotations;
import org.hibernate.models.internal.OrmAnnotationDescriptor;
import org.hibernate.models.spi.AnnotationDescriptor;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import org.hibernate.boot.internal.AnyKeyType;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -35,7 +31,7 @@ public class AnyKeTypeAnnotation implements AnyKeyType {
* Used in creating annotation instances from JDK variant
*/
public AnyKeTypeAnnotation(AnyKeyType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, XmlAnnotations.ANY_KEY_TYPE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -6,16 +6,14 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyKeyJavaClass;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyKeyJavaClass;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,12 +30,7 @@ public class AnyKeyJavaClassAnnotation implements AnyKeyJavaClass {
* Used in creating annotation instances from JDK variant
*/
public AnyKeyJavaClassAnnotation(AnyKeyJavaClass annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ANY_KEY_JAVA_CLASS,
"value",
modelContext
);
this.value = annotation.value();
}
/**

View File

@ -6,17 +6,15 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyKeyJavaType;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.hibernate.type.descriptor.java.BasicJavaType;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,12 +31,7 @@ public class AnyKeyJavaTypeAnnotation implements AnyKeyJavaType {
* Used in creating annotation instances from JDK variant
*/
public AnyKeyJavaTypeAnnotation(AnyKeyJavaType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ANY_KEY_JAVA_TYPE,
"value",
modelContext
);
this.value = annotation.value();
}
/**

View File

@ -6,17 +6,15 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyKeyJdbcType;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.hibernate.type.descriptor.jdbc.JdbcType;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,12 +31,7 @@ public class AnyKeyJdbcTypeAnnotation implements AnyKeyJdbcType {
* Used in creating annotation instances from JDK variant
*/
public AnyKeyJdbcTypeAnnotation(AnyKeyJdbcType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ANY_KEY_JDBC_TYPE,
"value",
modelContext
);
this.value = annotation.value();
}
/**

View File

@ -6,16 +6,14 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyKeyJdbcTypeCode;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyKeyJdbcTypeCode;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,12 +30,7 @@ public class AnyKeyJdbcTypeCodeAnnotation implements AnyKeyJdbcTypeCode {
* Used in creating annotation instances from JDK variant
*/
public AnyKeyJdbcTypeCodeAnnotation(AnyKeyJdbcTypeCode annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ANY_KEY_JDBC_TYPE_CODE,
"value",
modelContext
);
this.value = annotation.value();
}
/**

View File

@ -15,11 +15,11 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
/**
* @author Steve Ebersole
*/
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
public class AnyKeyTypeXmlAnnotation implements AnyKeyType {
private String value;
@ -33,12 +33,7 @@ public class AnyKeyTypeXmlAnnotation implements AnyKeyType {
* Used in creating annotation instances from JDK variant
*/
public AnyKeyTypeXmlAnnotation(AnyKeyType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
org.hibernate.boot.models.XmlAnnotations.ANY_KEY_TYPE,
"value",
modelContext
);
this.value = annotation.value();
}
/**

View File

@ -6,20 +6,15 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.hibernate.models.spi.AnnotationDescriptor;
import org.hibernate.models.spi.AttributeDescriptor;
import org.jboss.jandex.AnnotationInstance;
import org.jboss.jandex.AnnotationValue;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.Array;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -36,7 +31,7 @@ public class ArrayAnnotation implements Array {
* Used in creating annotation instances from JDK variant
*/
public ArrayAnnotation(Array annotation, SourceModelBuildingContext modelContext) {
this.length = extractJdkValue( annotation, HibernateAnnotations.ARRAY, "length", modelContext );
this.length = annotation.length();
}
/**

View File

@ -6,15 +6,16 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import jakarta.persistence.AssociationOverride;
import static org.hibernate.boot.models.JpaAnnotations.ASSOCIATION_OVERRIDE;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@ -32,57 +33,28 @@ public class AssociationOverrideJpaAnnotation implements AssociationOverride {
*/
public AssociationOverrideJpaAnnotation(SourceModelBuildingContext modelContext) {
this.joinColumns = new jakarta.persistence.JoinColumn[0];
this.foreignKey = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.ForeignKey.class )
.createUsage( modelContext );
this.joinTable = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.JoinTable.class )
.createUsage( modelContext );
this.foreignKey = JpaAnnotations.FOREIGN_KEY.createUsage( modelContext );
this.joinTable = JpaAnnotations.JOIN_TABLE.createUsage( modelContext );
}
/**
* Used in creating annotation instances from JDK variant
*/
public AssociationOverrideJpaAnnotation(AssociationOverride annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.ASSOCIATION_OVERRIDE, "name", modelContext );
this.joinColumns = extractJdkValue(
annotation,
JpaAnnotations.ASSOCIATION_OVERRIDE,
"joinColumns",
modelContext
);
this.foreignKey = extractJdkValue(
annotation,
JpaAnnotations.ASSOCIATION_OVERRIDE,
"foreignKey",
modelContext
);
this.joinTable = extractJdkValue( annotation, JpaAnnotations.ASSOCIATION_OVERRIDE, "joinTable", modelContext );
this.name = annotation.name();
this.joinColumns = extractJdkValue( annotation, ASSOCIATION_OVERRIDE, "joinColumns", modelContext );
this.foreignKey = extractJdkValue( annotation, ASSOCIATION_OVERRIDE, "foreignKey", modelContext );
this.joinTable = extractJdkValue( annotation, ASSOCIATION_OVERRIDE, "joinTable", modelContext );
}
/**
* Used in creating annotation instances from Jandex variant
*/
public AssociationOverrideJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.ASSOCIATION_OVERRIDE, "name", modelContext );
this.joinColumns = extractJandexValue(
annotation,
JpaAnnotations.ASSOCIATION_OVERRIDE,
"joinColumns",
modelContext
);
this.foreignKey = extractJandexValue(
annotation,
JpaAnnotations.ASSOCIATION_OVERRIDE,
"foreignKey",
modelContext
);
this.joinTable = extractJandexValue(
annotation,
JpaAnnotations.ASSOCIATION_OVERRIDE,
"joinTable",
modelContext
);
this.name = extractJandexValue( annotation, ASSOCIATION_OVERRIDE, "name", modelContext );
this.joinColumns = extractJandexValue( annotation, ASSOCIATION_OVERRIDE, "joinColumns", modelContext );
this.foreignKey = extractJandexValue( annotation, ASSOCIATION_OVERRIDE, "foreignKey", modelContext );
this.joinTable = extractJandexValue( annotation, ASSOCIATION_OVERRIDE, "joinTable", modelContext );
}
@Override

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -35,13 +34,8 @@ public class AttributeAccessorAnnotation implements AttributeAccessor {
* Used in creating annotation instances from JDK variant
*/
public AttributeAccessorAnnotation(AttributeAccessor annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.ATTRIBUTE_ACCESSOR, "value", modelContext );
this.strategy = extractJdkValue(
annotation,
HibernateAnnotations.ATTRIBUTE_ACCESSOR,
"strategy",
modelContext
);
this.value = annotation.value();
this.strategy = annotation.strategy();
}
/**

View File

@ -6,16 +6,14 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AttributeBinderType;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AttributeBinderType;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,12 +30,7 @@ public class AttributeBinderTypeAnnotation implements AttributeBinderType {
* Used in creating annotation instances from JDK variant
*/
public AttributeBinderTypeAnnotation(AttributeBinderType annotation, SourceModelBuildingContext modelContext) {
this.binder = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ATTRIBUTE_BINDER_TYPE,
"binder",
modelContext
);
this.binder = annotation.binder();
}
/**

View File

@ -35,7 +35,7 @@ public class AttributeOverrideJpaAnnotation implements AttributeOverride {
* Used in creating annotation instances from JDK variant
*/
public AttributeOverrideJpaAnnotation(AttributeOverride annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.ATTRIBUTE_OVERRIDE, "name", modelContext );
this.name = annotation.name();
this.column = extractJdkValue( annotation, JpaAnnotations.ATTRIBUTE_OVERRIDE, "column", modelContext );
}

View File

@ -17,7 +17,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Basic;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -39,8 +38,8 @@ public class BasicJpaAnnotation
* Used in creating annotation instances from JDK variant
*/
public BasicJpaAnnotation(Basic annotation, SourceModelBuildingContext modelContext) {
this.fetch = extractJdkValue( annotation, JpaAnnotations.BASIC, "fetch", modelContext );
this.optional = extractJdkValue( annotation, JpaAnnotations.BASIC, "optional", modelContext );
this.fetch = annotation.fetch();
this.optional = annotation.optional();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class BatchSizeAnnotation implements BatchSize {
* Used in creating annotation instances from JDK variant
*/
public BatchSizeAnnotation(BatchSize annotation, SourceModelBuildingContext modelContext) {
this.size = extractJdkValue( annotation, HibernateAnnotations.BATCH_SIZE, "size", modelContext );
this.size = annotation.size();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -38,10 +37,10 @@ public class CacheAnnotation implements Cache {
* Used in creating annotation instances from JDK variant
*/
public CacheAnnotation(Cache annotation, SourceModelBuildingContext modelContext) {
this.usage = extractJdkValue( annotation, HibernateAnnotations.CACHE, "usage", modelContext );
this.region = extractJdkValue( annotation, HibernateAnnotations.CACHE, "region", modelContext );
this.includeLazy = extractJdkValue( annotation, HibernateAnnotations.CACHE, "includeLazy", modelContext );
this.include = extractJdkValue( annotation, HibernateAnnotations.CACHE, "include", modelContext );
this.usage = annotation.usage();
this.region = annotation.region();
this.includeLazy = annotation.includeLazy();
this.include = annotation.include();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Cacheable;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,7 +33,7 @@ public class CacheableJpaAnnotation implements Cacheable {
* Used in creating annotation instances from JDK variant
*/
public CacheableJpaAnnotation(Cacheable annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, JpaAnnotations.CACHEABLE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class CascadeAnnotation implements Cascade {
* Used in creating annotation instances from JDK variant
*/
public CascadeAnnotation(Cascade annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.CASCADE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -6,16 +6,14 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.Check;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.Check;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,18 +32,8 @@ public class CheckAnnotation implements Check {
* Used in creating annotation instances from JDK variant
*/
public CheckAnnotation(Check annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.CHECK,
"name",
modelContext
);
this.constraints = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.CHECK,
"constraints",
modelContext
);
this.name = annotation.name();
this.constraints = annotation.constraints();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.CheckConstraint;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -38,9 +37,9 @@ public class CheckConstraintJpaAnnotation implements CheckConstraint {
* Used in creating annotation instances from JDK variant
*/
public CheckConstraintJpaAnnotation(CheckConstraint annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.CHECK_CONSTRAINT, "name", modelContext );
this.constraint = extractJdkValue( annotation, JpaAnnotations.CHECK_CONSTRAINT, "constraint", modelContext );
this.options = extractJdkValue( annotation, JpaAnnotations.CHECK_CONSTRAINT, "options", modelContext );
this.name = annotation.name();
this.constraint = annotation.constraint();
this.options = annotation.options();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class CollateAnnotation implements Collate {
* Used in creating annotation instances from JDK variant
*/
public CollateAnnotation(Collate annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.COLLATE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -16,7 +16,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -35,7 +34,7 @@ public class CollectionClassificationXmlAnnotation implements CollectionClassifi
public CollectionClassificationXmlAnnotation(
CollectionClassification annotation,
SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, XmlAnnotations.COLLECTION_CLASSIFICATION, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -10,6 +10,7 @@ import java.lang.annotation.Annotation;
import org.hibernate.annotations.CollectionId;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
@ -28,9 +29,7 @@ public class CollectionIdAnnotation implements CollectionId {
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public CollectionIdAnnotation(SourceModelBuildingContext modelContext) {
this.column = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.Column.class )
.createUsage( modelContext );
this.column = JpaAnnotations.COLUMN.createUsage( modelContext );
this.generatorImplementation = org.hibernate.id.IdentifierGenerator.class;
this.generator = "";
}
@ -40,13 +39,8 @@ public class CollectionIdAnnotation implements CollectionId {
*/
public CollectionIdAnnotation(CollectionId annotation, SourceModelBuildingContext modelContext) {
this.column = extractJdkValue( annotation, HibernateAnnotations.COLLECTION_ID, "column", modelContext );
this.generatorImplementation = extractJdkValue(
annotation,
HibernateAnnotations.COLLECTION_ID,
"generatorImplementation",
modelContext
);
this.generator = extractJdkValue( annotation, HibernateAnnotations.COLLECTION_ID, "generator", modelContext );
this.generatorImplementation = annotation.generatorImplementation();
this.generator = annotation.generator();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class CollectionIdJavaTypeAnnotation implements CollectionIdJavaType {
* Used in creating annotation instances from JDK variant
*/
public CollectionIdJavaTypeAnnotation(CollectionIdJavaType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.COLLECTION_ID_JAVA_TYPE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -16,7 +16,6 @@ import org.hibernate.type.descriptor.jdbc.JdbcType;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class CollectionIdJdbcTypeAnnotation implements CollectionIdJdbcType {
* Used in creating annotation instances from JDK variant
*/
public CollectionIdJdbcTypeAnnotation(CollectionIdJdbcType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.COLLECTION_ID_JDBC_TYPE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,12 +33,7 @@ public class CollectionIdJdbcTypeCodeAnnotation implements CollectionIdJdbcTypeC
public CollectionIdJdbcTypeCodeAnnotation(
CollectionIdJdbcTypeCode annotation,
SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
HibernateAnnotations.COLLECTION_ID_JDBC_TYPE_CODE,
"value",
modelContext
);
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,12 +33,7 @@ public class CollectionIdMutabilityAnnotation implements CollectionIdMutability
public CollectionIdMutabilityAnnotation(
CollectionIdMutability annotation,
SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
HibernateAnnotations.COLLECTION_ID_MUTABILITY,
"value",
modelContext
);
this.value = annotation.value();
}
/**

View File

@ -9,11 +9,11 @@ package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.CollectionIdType;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.HibernateAnnotations.COLLECTION_ID_TYPE;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@ -34,23 +34,18 @@ public class CollectionIdTypeAnnotation implements CollectionIdType {
* Used in creating annotation instances from JDK variant
*/
public CollectionIdTypeAnnotation(CollectionIdType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.COLLECTION_ID_TYPE, "value", modelContext );
this.parameters = extractJdkValue(
annotation,
HibernateAnnotations.COLLECTION_ID_TYPE,
"parameters",
modelContext
);
this.value = annotation.value();
this.parameters = extractJdkValue( annotation, COLLECTION_ID_TYPE, "parameters", modelContext );
}
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionIdTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.COLLECTION_ID_TYPE, "value", modelContext );
this.value = extractJandexValue( annotation, COLLECTION_ID_TYPE, "value", modelContext );
this.parameters = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_ID_TYPE,
COLLECTION_ID_TYPE,
"parameters",
modelContext
);

View File

@ -9,7 +9,6 @@ package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.boot.jaxb.mapping.spi.JaxbCollectionTableImpl;
import org.hibernate.boot.jaxb.mapping.spi.JaxbJoinTableImpl;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.boot.models.annotations.spi.CommonTableDetails;
import org.hibernate.boot.models.xml.internal.db.ForeignKeyProcessing;
@ -21,6 +20,7 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.CollectionTable;
import static org.hibernate.boot.models.JpaAnnotations.COLLECTION_TABLE;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
import static org.hibernate.boot.models.xml.internal.XmlAnnotationHelper.applyCatalog;
@ -50,9 +50,7 @@ public class CollectionTableJpaAnnotation implements CollectionTable, CommonTabl
this.catalog = "";
this.schema = "";
this.joinColumns = new jakarta.persistence.JoinColumn[0];
this.foreignKey = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.ForeignKey.class )
.createUsage( modelContext );
this.foreignKey = JpaAnnotations.FOREIGN_KEY.createUsage( modelContext );
this.uniqueConstraints = new jakarta.persistence.UniqueConstraint[0];
this.indexes = new jakarta.persistence.Index[0];
this.options = "";
@ -62,43 +60,38 @@ public class CollectionTableJpaAnnotation implements CollectionTable, CommonTabl
* Used in creating annotation instances from JDK variant
*/
public CollectionTableJpaAnnotation(CollectionTable annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.COLLECTION_TABLE, "name", modelContext );
this.catalog = extractJdkValue( annotation, JpaAnnotations.COLLECTION_TABLE, "catalog", modelContext );
this.schema = extractJdkValue( annotation, JpaAnnotations.COLLECTION_TABLE, "schema", modelContext );
this.joinColumns = extractJdkValue( annotation, JpaAnnotations.COLLECTION_TABLE, "joinColumns", modelContext );
this.foreignKey = extractJdkValue( annotation, JpaAnnotations.COLLECTION_TABLE, "foreignKey", modelContext );
this.uniqueConstraints = extractJdkValue(
annotation,
JpaAnnotations.COLLECTION_TABLE,
"uniqueConstraints",
modelContext
);
this.indexes = extractJdkValue( annotation, JpaAnnotations.COLLECTION_TABLE, "indexes", modelContext );
this.options = extractJdkValue( annotation, JpaAnnotations.COLLECTION_TABLE, "options", modelContext );
this.name = annotation.name();
this.catalog = annotation.catalog();
this.schema = annotation.schema();
this.joinColumns = extractJdkValue( annotation, COLLECTION_TABLE, "joinColumns", modelContext );
this.foreignKey = extractJdkValue( annotation, COLLECTION_TABLE, "foreignKey", modelContext );
this.uniqueConstraints = extractJdkValue( annotation, COLLECTION_TABLE, "uniqueConstraints", modelContext );
this.indexes = extractJdkValue( annotation, COLLECTION_TABLE, "indexes", modelContext );
this.options = extractJdkValue( annotation, COLLECTION_TABLE, "options", modelContext );
}
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionTableJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.COLLECTION_TABLE, "name", modelContext );
this.catalog = extractJandexValue( annotation, JpaAnnotations.COLLECTION_TABLE, "catalog", modelContext );
this.schema = extractJandexValue( annotation, JpaAnnotations.COLLECTION_TABLE, "schema", modelContext );
this.name = extractJandexValue( annotation, COLLECTION_TABLE, "name", modelContext );
this.catalog = extractJandexValue( annotation, COLLECTION_TABLE, "catalog", modelContext );
this.schema = extractJandexValue( annotation, COLLECTION_TABLE, "schema", modelContext );
this.joinColumns = extractJandexValue(
annotation,
JpaAnnotations.COLLECTION_TABLE,
COLLECTION_TABLE,
"joinColumns",
modelContext
);
this.foreignKey = extractJandexValue( annotation, JpaAnnotations.COLLECTION_TABLE, "foreignKey", modelContext );
this.foreignKey = extractJandexValue( annotation, COLLECTION_TABLE, "foreignKey", modelContext );
this.uniqueConstraints = extractJandexValue(
annotation,
JpaAnnotations.COLLECTION_TABLE,
COLLECTION_TABLE,
"uniqueConstraints",
modelContext
);
this.indexes = extractJandexValue( annotation, JpaAnnotations.COLLECTION_TABLE, "indexes", modelContext );
this.options = extractJandexValue( annotation, JpaAnnotations.COLLECTION_TABLE, "options", modelContext );
this.indexes = extractJandexValue( annotation, COLLECTION_TABLE, "indexes", modelContext );
this.options = extractJandexValue( annotation, COLLECTION_TABLE, "options", modelContext );
}
@Override

View File

@ -9,11 +9,11 @@ package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.CollectionType;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.HibernateAnnotations.COLLECTION_TYPE;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@ -34,23 +34,18 @@ public class CollectionTypeAnnotation implements CollectionType {
* Used in creating annotation instances from JDK variant
*/
public CollectionTypeAnnotation(CollectionType annotation, SourceModelBuildingContext modelContext) {
this.type = extractJdkValue( annotation, HibernateAnnotations.COLLECTION_TYPE, "type", modelContext );
this.parameters = extractJdkValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE,
"parameters",
modelContext
);
this.type = annotation.type();
this.parameters = extractJdkValue( annotation, COLLECTION_TYPE, "parameters", modelContext );
}
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.type = extractJandexValue( annotation, HibernateAnnotations.COLLECTION_TYPE, "type", modelContext );
this.type = extractJandexValue( annotation, COLLECTION_TYPE, "type", modelContext );
this.parameters = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE,
COLLECTION_TYPE,
"parameters",
modelContext
);

View File

@ -9,11 +9,11 @@ package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.CollectionTypeRegistration;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.HibernateAnnotations.COLLECTION_TYPE_REGISTRATION;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@ -37,24 +37,9 @@ public class CollectionTypeRegistrationAnnotation implements CollectionTypeRegis
public CollectionTypeRegistrationAnnotation(
CollectionTypeRegistration annotation,
SourceModelBuildingContext modelContext) {
this.classification = extractJdkValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE_REGISTRATION,
"classification",
modelContext
);
this.type = extractJdkValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE_REGISTRATION,
"type",
modelContext
);
this.parameters = extractJdkValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE_REGISTRATION,
"parameters",
modelContext
);
this.classification = annotation.classification();
this.type = annotation.type();
this.parameters = extractJdkValue( annotation, COLLECTION_TYPE_REGISTRATION, "parameters", modelContext );
}
/**
@ -65,19 +50,19 @@ public class CollectionTypeRegistrationAnnotation implements CollectionTypeRegis
SourceModelBuildingContext modelContext) {
this.classification = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE_REGISTRATION,
COLLECTION_TYPE_REGISTRATION,
"classification",
modelContext
);
this.type = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE_REGISTRATION,
COLLECTION_TYPE_REGISTRATION,
"type",
modelContext
);
this.parameters = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE_REGISTRATION,
COLLECTION_TYPE_REGISTRATION,
"parameters",
modelContext
);

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class ColumnDefaultAnnotation implements ColumnDefault {
* Used in creating annotation instances from JDK variant
*/
public ColumnDefaultAnnotation(ColumnDefault annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.COLUMN_DEFAULT, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -76,20 +76,20 @@ public class ColumnJpaAnnotation implements Column,
* Used in creating annotation instances from JDK variant
*/
public ColumnJpaAnnotation(Column annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.COLUMN, "name", modelContext );
this.unique = extractJdkValue( annotation, JpaAnnotations.COLUMN, "unique", modelContext );
this.nullable = extractJdkValue( annotation, JpaAnnotations.COLUMN, "nullable", modelContext );
this.insertable = extractJdkValue( annotation, JpaAnnotations.COLUMN, "insertable", modelContext );
this.updatable = extractJdkValue( annotation, JpaAnnotations.COLUMN, "updatable", modelContext );
this.columnDefinition = extractJdkValue( annotation, JpaAnnotations.COLUMN, "columnDefinition", modelContext );
this.options = extractJdkValue( annotation, JpaAnnotations.COLUMN, "options", modelContext );
this.table = extractJdkValue( annotation, JpaAnnotations.COLUMN, "table", modelContext );
this.length = extractJdkValue( annotation, JpaAnnotations.COLUMN, "length", modelContext );
this.precision = extractJdkValue( annotation, JpaAnnotations.COLUMN, "precision", modelContext );
this.scale = extractJdkValue( annotation, JpaAnnotations.COLUMN, "scale", modelContext );
this.secondPrecision = extractJdkValue( annotation, JpaAnnotations.COLUMN, "secondPrecision", modelContext );
this.name = annotation.name();
this.unique = annotation.unique();
this.nullable = annotation.nullable();
this.insertable = annotation.insertable();
this.updatable = annotation.updatable();
this.columnDefinition = annotation.columnDefinition();
this.options = annotation.options();
this.table = annotation.table();
this.length = annotation.length();
this.precision = annotation.precision();
this.scale = annotation.scale();
this.secondPrecision = annotation.secondPrecision();
this.check = extractJdkValue( annotation, JpaAnnotations.COLUMN, "check", modelContext );
this.comment = extractJdkValue( annotation, JpaAnnotations.COLUMN, "comment", modelContext );
this.comment = annotation.comment();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.ColumnResult;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -35,8 +34,8 @@ public class ColumnResultJpaAnnotation implements ColumnResult {
* Used in creating annotation instances from JDK variant
*/
public ColumnResultJpaAnnotation(ColumnResult annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.COLUMN_RESULT, "name", modelContext );
this.type = extractJdkValue( annotation, JpaAnnotations.COLUMN_RESULT, "type", modelContext );
this.name = annotation.name();
this.type = annotation.type();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -37,14 +36,9 @@ public class ColumnTransformerAnnotation implements ColumnTransformer {
* Used in creating annotation instances from JDK variant
*/
public ColumnTransformerAnnotation(ColumnTransformer annotation, SourceModelBuildingContext modelContext) {
this.forColumn = extractJdkValue(
annotation,
HibernateAnnotations.COLUMN_TRANSFORMER,
"forColumn",
modelContext
);
this.read = extractJdkValue( annotation, HibernateAnnotations.COLUMN_TRANSFORMER, "read", modelContext );
this.write = extractJdkValue( annotation, HibernateAnnotations.COLUMN_TRANSFORMER, "write", modelContext );
this.forColumn = annotation.forColumn();
this.read = annotation.read();
this.write = annotation.write();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,8 +33,8 @@ public class CommentAnnotation implements Comment {
* Used in creating annotation instances from JDK variant
*/
public CommentAnnotation(Comment annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.COMMENT, "value", modelContext );
this.on = extractJdkValue( annotation, HibernateAnnotations.COMMENT, "on", modelContext );
this.value = annotation.value();
this.on = annotation.on();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class CompositeTypeAnnotation implements CompositeType {
* Used in creating annotation instances from JDK variant
*/
public CompositeTypeAnnotation(CompositeType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.COMPOSITE_TYPE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -35,18 +34,8 @@ public class CompositeTypeRegistrationAnnotation implements CompositeTypeRegistr
public CompositeTypeRegistrationAnnotation(
CompositeTypeRegistration annotation,
SourceModelBuildingContext modelContext) {
this.embeddableClass = extractJdkValue(
annotation,
HibernateAnnotations.COMPOSITE_TYPE_REGISTRATION,
"embeddableClass",
modelContext
);
this.userType = extractJdkValue(
annotation,
HibernateAnnotations.COMPOSITE_TYPE_REGISTRATION,
"userType",
modelContext
);
this.embeddableClass = annotation.embeddableClass();
this.userType = annotation.userType();
}
/**

View File

@ -8,13 +8,13 @@ package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.ConstructorResult;
import static org.hibernate.boot.models.JpaAnnotations.CONSTRUCTOR_RESULT;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@ -35,26 +35,16 @@ public class ConstructorResultJpaAnnotation implements ConstructorResult {
* Used in creating annotation instances from JDK variant
*/
public ConstructorResultJpaAnnotation(ConstructorResult annotation, SourceModelBuildingContext modelContext) {
this.targetClass = extractJdkValue(
annotation,
JpaAnnotations.CONSTRUCTOR_RESULT,
"targetClass",
modelContext
);
this.columns = extractJdkValue( annotation, JpaAnnotations.CONSTRUCTOR_RESULT, "columns", modelContext );
this.targetClass = annotation.targetClass();
this.columns = extractJdkValue( annotation, CONSTRUCTOR_RESULT, "columns", modelContext );
}
/**
* Used in creating annotation instances from Jandex variant
*/
public ConstructorResultJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.targetClass = extractJandexValue(
annotation,
JpaAnnotations.CONSTRUCTOR_RESULT,
"targetClass",
modelContext
);
this.columns = extractJandexValue( annotation, JpaAnnotations.CONSTRUCTOR_RESULT, "columns", modelContext );
this.targetClass = extractJandexValue( annotation, CONSTRUCTOR_RESULT, "targetClass", modelContext );
this.columns = extractJandexValue( annotation, CONSTRUCTOR_RESULT, "columns", modelContext );
}
@Override

View File

@ -15,8 +15,8 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Convert;
import static org.hibernate.boot.models.JpaAnnotations.CONVERT;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -39,25 +39,20 @@ public class ConvertJpaAnnotation implements Convert {
* Used in creating annotation instances from JDK variant
*/
public ConvertJpaAnnotation(Convert annotation, SourceModelBuildingContext modelContext) {
this.converter = extractJdkValue( annotation, JpaAnnotations.CONVERT, "converter", modelContext );
this.attributeName = extractJdkValue( annotation, JpaAnnotations.CONVERT, "attributeName", modelContext );
this.disableConversion = extractJdkValue(
annotation,
JpaAnnotations.CONVERT,
"disableConversion",
modelContext
);
this.converter = annotation.converter();
this.attributeName = annotation.attributeName();
this.disableConversion = annotation.disableConversion();
}
/**
* Used in creating annotation instances from Jandex variant
*/
public ConvertJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.converter = extractJandexValue( annotation, JpaAnnotations.CONVERT, "converter", modelContext );
this.attributeName = extractJandexValue( annotation, JpaAnnotations.CONVERT, "attributeName", modelContext );
this.converter = extractJandexValue( annotation, CONVERT, "converter", modelContext );
this.attributeName = extractJandexValue( annotation, CONVERT, "attributeName", modelContext );
this.disableConversion = extractJandexValue(
annotation,
JpaAnnotations.CONVERT,
CONVERT,
"disableConversion",
modelContext
);

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Converter;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -35,7 +34,7 @@ public class ConverterJpaAnnotation implements Converter {
* Used in creating annotation instances from JDK variant
*/
public ConverterJpaAnnotation(Converter annotation, SourceModelBuildingContext modelContext) {
this.autoApply = extractJdkValue( annotation, JpaAnnotations.CONVERTER, "autoApply", modelContext );
this.autoApply = annotation.autoApply();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -36,24 +35,9 @@ public class ConverterRegistrationAnnotation implements ConverterRegistration {
* Used in creating annotation instances from JDK variant
*/
public ConverterRegistrationAnnotation(ConverterRegistration annotation, SourceModelBuildingContext modelContext) {
this.converter = extractJdkValue(
annotation,
HibernateAnnotations.CONVERTER_REGISTRATION,
"converter",
modelContext
);
this.domainType = extractJdkValue(
annotation,
HibernateAnnotations.CONVERTER_REGISTRATION,
"domainType",
modelContext
);
this.autoApply = extractJdkValue(
annotation,
HibernateAnnotations.CONVERTER_REGISTRATION,
"autoApply",
modelContext
);
this.converter = annotation.converter();
this.domainType = annotation.domainType();
this.autoApply = annotation.autoApply();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class CreationTimestampAnnotation implements CreationTimestamp {
* Used in creating annotation instances from JDK variant
*/
public CreationTimestampAnnotation(CreationTimestamp annotation, SourceModelBuildingContext modelContext) {
this.source = extractJdkValue( annotation, HibernateAnnotations.CREATION_TIMESTAMP, "source", modelContext );
this.source = annotation.source();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -37,9 +36,9 @@ public class CurrentTimestampAnnotation implements CurrentTimestamp {
* Used in creating annotation instances from JDK variant
*/
public CurrentTimestampAnnotation(CurrentTimestamp annotation, SourceModelBuildingContext modelContext) {
this.event = extractJdkValue( annotation, HibernateAnnotations.CURRENT_TIMESTAMP, "event", modelContext );
this.timing = extractJdkValue( annotation, HibernateAnnotations.CURRENT_TIMESTAMP, "timing", modelContext );
this.source = extractJdkValue( annotation, HibernateAnnotations.CURRENT_TIMESTAMP, "source", modelContext );
this.event = annotation.event();
this.timing = annotation.timing();
this.source = annotation.source();
}
/**

View File

@ -6,6 +6,8 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.boot.jaxb.mapping.spi.JaxbDiscriminatorColumnImpl;
import org.hibernate.boot.models.annotations.spi.ColumnDetails;
import org.hibernate.boot.models.xml.spi.XmlDocumentContext;
@ -14,12 +16,9 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import jakarta.persistence.DiscriminatorColumn;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -46,36 +45,11 @@ public class DiscriminatorColumnJpaAnnotation implements DiscriminatorColumn, Co
* Used in creating annotation instances from JDK variant
*/
public DiscriminatorColumnJpaAnnotation(DiscriminatorColumn annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"name",
modelContext
);
this.discriminatorType = extractJdkValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"discriminatorType",
modelContext
);
this.columnDefinition = extractJdkValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"columnDefinition",
modelContext
);
this.options = extractJdkValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"options",
modelContext
);
this.length = extractJdkValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"length",
modelContext
);
this.name = annotation.name();
this.discriminatorType = annotation.discriminatorType();
this.columnDefinition = annotation.columnDefinition();
this.options = annotation.options();
this.length = annotation.length();
}
/**

View File

@ -6,16 +6,14 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.DiscriminatorFormula;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.DiscriminatorFormula;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,18 +32,8 @@ public class DiscriminatorFormulaAnnotation implements DiscriminatorFormula {
* Used in creating annotation instances from JDK variant
*/
public DiscriminatorFormulaAnnotation(DiscriminatorFormula annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.DISCRIMINATOR_FORMULA,
"value",
modelContext
);
this.discriminatorType = extractJdkValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.DISCRIMINATOR_FORMULA,
"discriminatorType",
modelContext
);
this.value = annotation.value();
this.discriminatorType = annotation.discriminatorType();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -35,8 +34,8 @@ public class DiscriminatorOptionsAnnotation implements DiscriminatorOptions {
* Used in creating annotation instances from JDK variant
*/
public DiscriminatorOptionsAnnotation(DiscriminatorOptions annotation, SourceModelBuildingContext modelContext) {
this.force = extractJdkValue( annotation, HibernateAnnotations.DISCRIMINATOR_OPTIONS, "force", modelContext );
this.insert = extractJdkValue( annotation, HibernateAnnotations.DISCRIMINATOR_OPTIONS, "insert", modelContext );
this.force = annotation.force();
this.insert = annotation.insert();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.DiscriminatorValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class DiscriminatorValueJpaAnnotation implements DiscriminatorValue {
* Used in creating annotation instances from JDK variant
*/
public DiscriminatorValueJpaAnnotation(DiscriminatorValue annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, JpaAnnotations.DISCRIMINATOR_VALUE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -33,7 +33,7 @@ public class DynamicInsertAnnotation implements DynamicInsert {
* Used in creating annotation instances from JDK variant
*/
public DynamicInsertAnnotation(DynamicInsert annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.DYNAMIC_INSERT, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class DynamicUpdateAnnotation implements DynamicUpdate {
* Used in creating annotation instances from JDK variant
*/
public DynamicUpdateAnnotation(DynamicUpdate annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.DYNAMIC_UPDATE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -17,7 +17,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.ElementCollection;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -37,13 +36,8 @@ public class ElementCollectionJpaAnnotation implements ElementCollection, Attrib
* Used in creating annotation instances from JDK variant
*/
public ElementCollectionJpaAnnotation(ElementCollection annotation, SourceModelBuildingContext modelContext) {
this.targetClass = extractJdkValue(
annotation,
JpaAnnotations.ELEMENT_COLLECTION,
"targetClass",
modelContext
);
this.fetch = extractJdkValue( annotation, JpaAnnotations.ELEMENT_COLLECTION, "fetch", modelContext );
this.targetClass = annotation.targetClass();
this.fetch = annotation.fetch();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,7 +33,7 @@ public class EmbeddableInstantiatorAnnotation implements EmbeddableInstantiator
public EmbeddableInstantiatorAnnotation(
EmbeddableInstantiator annotation,
SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.EMBEDDABLE_INSTANTIATOR, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -35,18 +34,8 @@ public class EmbeddableInstantiatorRegistrationAnnotation implements EmbeddableI
public EmbeddableInstantiatorRegistrationAnnotation(
EmbeddableInstantiatorRegistration annotation,
SourceModelBuildingContext modelContext) {
this.embeddableClass = extractJdkValue(
annotation,
HibernateAnnotations.EMBEDDABLE_INSTANTIATOR_REGISTRATION,
"embeddableClass",
modelContext
);
this.instantiator = extractJdkValue(
annotation,
HibernateAnnotations.EMBEDDABLE_INSTANTIATOR_REGISTRATION,
"instantiator",
modelContext
);
this.embeddableClass = annotation.embeddableClass();
this.instantiator = annotation.instantiator();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Entity;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,7 +33,7 @@ public class EntityJpaAnnotation implements Entity {
* Used in creating annotation instances from JDK variant
*/
public EntityJpaAnnotation(Entity annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.ENTITY, "name", modelContext );
this.name = annotation.name();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.EntityListeners;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class EntityListenersJpaAnnotation implements EntityListeners {
* Used in creating annotation instances from JDK variant
*/
public EntityListenersJpaAnnotation(EntityListeners annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, JpaAnnotations.ENTITY_LISTENERS, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.EntityResult;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -39,15 +38,10 @@ public class EntityResultJpaAnnotation implements EntityResult {
* Used in creating annotation instances from JDK variant
*/
public EntityResultJpaAnnotation(EntityResult annotation, SourceModelBuildingContext modelContext) {
this.entityClass = extractJdkValue( annotation, JpaAnnotations.ENTITY_RESULT, "entityClass", modelContext );
this.lockMode = extractJdkValue( annotation, JpaAnnotations.ENTITY_RESULT, "lockMode", modelContext );
this.fields = extractJdkValue( annotation, JpaAnnotations.ENTITY_RESULT, "fields", modelContext );
this.discriminatorColumn = extractJdkValue(
annotation,
JpaAnnotations.ENTITY_RESULT,
"discriminatorColumn",
modelContext
);
this.entityClass = annotation.entityClass();
this.lockMode = annotation.lockMode();
this.fields = annotation.fields();
this.discriminatorColumn = annotation.discriminatorColumn();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Enumerated;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,7 +33,7 @@ public class EnumeratedJpaAnnotation implements Enumerated {
* Used in creating annotation instances from JDK variant
*/
public EnumeratedJpaAnnotation(Enumerated annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, JpaAnnotations.ENUMERATED, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class ExtendsXmlAnnotation implements Extends {
* Used in creating annotation instances from JDK variant
*/
public ExtendsXmlAnnotation(Extends annotation, SourceModelBuildingContext modelContext) {
this.superType = extractJdkValue( annotation, XmlAnnotations.EXTENDS, "superType", modelContext );
this.superType = annotation.superType();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class FetchAnnotation implements Fetch {
* Used in creating annotation instances from JDK variant
*/
public FetchAnnotation(Fetch annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.FETCH, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -34,7 +34,7 @@ public class FetchProfileAnnotation implements FetchProfile {
* Used in creating annotation instances from JDK variant
*/
public FetchProfileAnnotation(FetchProfile annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, HibernateAnnotations.FETCH_PROFILE, "name", modelContext );
this.name = annotation.name();
this.fetchOverrides = extractJdkValue(
annotation,
HibernateAnnotations.FETCH_PROFILE,

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -37,24 +36,9 @@ public class FetchProfileOverrideAnnotation implements FetchProfileOverride {
* Used in creating annotation instances from JDK variant
*/
public FetchProfileOverrideAnnotation(FetchProfileOverride annotation, SourceModelBuildingContext modelContext) {
this.mode = extractJdkValue(
annotation,
DialectOverrideAnnotations.FETCH_PROFILE_OVERRIDE,
"mode",
modelContext
);
this.fetch = extractJdkValue(
annotation,
DialectOverrideAnnotations.FETCH_PROFILE_OVERRIDE,
"fetch",
modelContext
);
this.profile = extractJdkValue(
annotation,
DialectOverrideAnnotations.FETCH_PROFILE_OVERRIDE,
"profile",
modelContext
);
this.mode = annotation.mode();
this.fetch = annotation.fetch();
this.profile = annotation.profile();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.FieldResult;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,8 +33,8 @@ public class FieldResultJpaAnnotation implements FieldResult {
* Used in creating annotation instances from JDK variant
*/
public FieldResultJpaAnnotation(FieldResult annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.FIELD_RESULT, "name", modelContext );
this.column = extractJdkValue( annotation, JpaAnnotations.FIELD_RESULT, "column", modelContext );
this.name = annotation.name();
this.column = annotation.column();
}
/**

View File

@ -43,14 +43,9 @@ public class FilterAnnotation implements Filter, FilterDetails {
* Used in creating annotation instances from JDK variant
*/
public FilterAnnotation(Filter annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, HibernateAnnotations.FILTER, "name", modelContext );
this.condition = extractJdkValue( annotation, HibernateAnnotations.FILTER, "condition", modelContext );
this.deduceAliasInjectionPoints = extractJdkValue(
annotation,
HibernateAnnotations.FILTER,
"deduceAliasInjectionPoints",
modelContext
);
this.name = annotation.name();
this.condition = annotation.condition();
this.deduceAliasInjectionPoints = annotation.deduceAliasInjectionPoints();
this.aliases = extractJdkValue( annotation, HibernateAnnotations.FILTER, "aliases", modelContext );
}

View File

@ -38,15 +38,10 @@ public class FilterDefAnnotation implements FilterDef {
* Used in creating annotation instances from JDK variant
*/
public FilterDefAnnotation(FilterDef annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, HibernateAnnotations.FILTER_DEF, "name", modelContext );
this.defaultCondition = extractJdkValue(
annotation,
HibernateAnnotations.FILTER_DEF,
"defaultCondition",
modelContext
);
this.name = annotation.name();
this.defaultCondition = annotation.defaultCondition();
this.parameters = extractJdkValue( annotation, HibernateAnnotations.FILTER_DEF, "parameters", modelContext );
this.autoEnabled = extractJdkValue( annotation, HibernateAnnotations.FILTER_DEF, "autoEnabled", modelContext );
this.autoEnabled = annotation.autoEnabled();
}
/**

View File

@ -43,14 +43,9 @@ public class FilterJoinTableAnnotation implements FilterJoinTable, FilterDetails
* Used in creating annotation instances from JDK variant
*/
public FilterJoinTableAnnotation(FilterJoinTable annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, FILTER_JOIN_TABLE, "name", modelContext );
this.condition = extractJdkValue( annotation, FILTER_JOIN_TABLE, "condition", modelContext );
this.deduceAliasInjectionPoints = extractJdkValue(
annotation,
FILTER_JOIN_TABLE,
"deduceAliasInjectionPoints",
modelContext
);
this.name = annotation.name();
this.condition = annotation.condition();
this.deduceAliasInjectionPoints = annotation.deduceAliasInjectionPoints();
this.aliases = extractJdkValue( annotation, FILTER_JOIN_TABLE, "aliases", modelContext );
}

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.ForeignKey;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -40,15 +39,10 @@ public class ForeignKeyJpaAnnotation implements ForeignKey {
* Used in creating annotation instances from JDK variant
*/
public ForeignKeyJpaAnnotation(ForeignKey annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.FOREIGN_KEY, "name", modelContext );
this.value = extractJdkValue( annotation, JpaAnnotations.FOREIGN_KEY, "value", modelContext );
this.foreignKeyDefinition = extractJdkValue(
annotation,
JpaAnnotations.FOREIGN_KEY,
"foreignKeyDefinition",
modelContext
);
this.options = extractJdkValue( annotation, JpaAnnotations.FOREIGN_KEY, "options", modelContext );
this.name = annotation.name();
this.value = annotation.value();
this.foreignKeyDefinition = annotation.foreignKeyDefinition();
this.options = annotation.options();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class FormulaAnnotation implements Formula {
* Used in creating annotation instances from JDK variant
*/
public FormulaAnnotation(Formula annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.FORMULA, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class FractionalSecondsAnnotation implements FractionalSeconds {
* Used in creating annotation instances from JDK variant
*/
public FractionalSecondsAnnotation(FractionalSeconds annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.FRACTIONAL_SECONDS, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -39,10 +38,10 @@ public class GeneratedAnnotation implements Generated {
* Used in creating annotation instances from JDK variant
*/
public GeneratedAnnotation(Generated annotation, SourceModelBuildingContext modelContext) {
this.event = extractJdkValue( annotation, HibernateAnnotations.GENERATED, "event", modelContext );
this.value = extractJdkValue( annotation, HibernateAnnotations.GENERATED, "value", modelContext );
this.sql = extractJdkValue( annotation, HibernateAnnotations.GENERATED, "sql", modelContext );
this.writable = extractJdkValue( annotation, HibernateAnnotations.GENERATED, "writable", modelContext );
this.event = annotation.event();
this.value = annotation.value();
this.sql = annotation.sql();
this.writable = annotation.writable();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class GeneratedColumnAnnotation implements GeneratedColumn {
* Used in creating annotation instances from JDK variant
*/
public GeneratedColumnAnnotation(GeneratedColumn annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.GENERATED_COLUMN, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.GeneratedValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -36,8 +35,8 @@ public class GeneratedValueJpaAnnotation implements GeneratedValue {
* Used in creating annotation instances from JDK variant
*/
public GeneratedValueJpaAnnotation(GeneratedValue annotation, SourceModelBuildingContext modelContext) {
this.strategy = extractJdkValue( annotation, JpaAnnotations.GENERATED_VALUE, "strategy", modelContext );
this.generator = extractJdkValue( annotation, JpaAnnotations.GENERATED_VALUE, "generator", modelContext );
this.strategy = annotation.strategy();
this.generator = annotation.generator();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,8 +33,8 @@ public class GeneratorTypeAnnotation implements GeneratorType {
* Used in creating annotation instances from JDK variant
*/
public GeneratorTypeAnnotation(GeneratorType annotation, SourceModelBuildingContext modelContext) {
this.type = extractJdkValue( annotation, HibernateAnnotations.GENERATOR_TYPE, "type", modelContext );
this.when = extractJdkValue( annotation, HibernateAnnotations.GENERATOR_TYPE, "when", modelContext );
this.type = annotation.type();
this.when = annotation.when();
}
/**

View File

@ -38,9 +38,9 @@ public class GenericGeneratorAnnotation implements GenericGenerator {
* Used in creating annotation instances from JDK variant
*/
public GenericGeneratorAnnotation(GenericGenerator annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, HibernateAnnotations.GENERIC_GENERATOR, "name", modelContext );
this.type = extractJdkValue( annotation, HibernateAnnotations.GENERIC_GENERATOR, "type", modelContext );
this.strategy = extractJdkValue( annotation, HibernateAnnotations.GENERIC_GENERATOR, "strategy", modelContext );
this.name = annotation.name();
this.type = annotation.type();
this.strategy = annotation.strategy();
this.parameters = extractJdkValue(
annotation,
HibernateAnnotations.GENERIC_GENERATOR,

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,7 +33,7 @@ public class HQLSelectAnnotation implements HQLSelect {
* Used in creating annotation instances from JDK variant
*/
public HQLSelectAnnotation(HQLSelect annotation, SourceModelBuildingContext modelContext) {
this.query = extractJdkValue( annotation, HibernateAnnotations.HQL_SELECT, "query", modelContext );
this.query = annotation.query();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.IdClass;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class IdClassJpaAnnotation implements IdClass {
* Used in creating annotation instances from JDK variant
*/
public IdClassJpaAnnotation(IdClass annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, JpaAnnotations.ID_CLASS, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class IdGeneratorTypeAnnotation implements IdGeneratorType {
* Used in creating annotation instances from JDK variant
*/
public IdGeneratorTypeAnnotation(IdGeneratorType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.ID_GENERATOR_TYPE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class ImportedAnnotation implements Imported {
* Used in creating annotation instances from JDK variant
*/
public ImportedAnnotation(Imported annotation, SourceModelBuildingContext modelContext) {
this.rename = extractJdkValue( annotation, HibernateAnnotations.IMPORTED, "rename", modelContext );
this.rename = annotation.rename();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -38,15 +37,10 @@ public class IndexColumnAnnotation implements IndexColumn {
* Used in creating annotation instances from JDK variant
*/
public IndexColumnAnnotation(IndexColumn annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, HibernateAnnotations.INDEX_COLUMN, "name", modelContext );
this.base = extractJdkValue( annotation, HibernateAnnotations.INDEX_COLUMN, "base", modelContext );
this.nullable = extractJdkValue( annotation, HibernateAnnotations.INDEX_COLUMN, "nullable", modelContext );
this.columnDefinition = extractJdkValue(
annotation,
HibernateAnnotations.INDEX_COLUMN,
"columnDefinition",
modelContext
);
this.name = annotation.name();
this.base = annotation.base();
this.nullable = annotation.nullable();
this.columnDefinition = annotation.columnDefinition();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Index;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -39,10 +38,10 @@ public class IndexJpaAnnotation implements Index {
* Used in creating annotation instances from JDK variant
*/
public IndexJpaAnnotation(Index annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.INDEX, "name", modelContext );
this.columnList = extractJdkValue( annotation, JpaAnnotations.INDEX, "columnList", modelContext );
this.unique = extractJdkValue( annotation, JpaAnnotations.INDEX, "unique", modelContext );
this.options = extractJdkValue( annotation, JpaAnnotations.INDEX, "options", modelContext );
this.name = annotation.name();
this.columnList = annotation.columnList();
this.unique = annotation.unique();
this.options = annotation.options();
}
/**

View File

@ -16,7 +16,6 @@ import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Inheritance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,7 +33,7 @@ public class InheritanceJpaAnnotation implements Inheritance {
* Used in creating annotation instances from JDK variant
*/
public InheritanceJpaAnnotation(Inheritance annotation, SourceModelBuildingContext modelContext) {
this.strategy = extractJdkValue( annotation, JpaAnnotations.INHERITANCE, "strategy", modelContext );
this.strategy = annotation.strategy();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class InstantiatorAnnotation implements Instantiator {
* Used in creating annotation instances from JDK variant
*/
public InstantiatorAnnotation(Instantiator annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.INSTANTIATOR, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class JavaTypeAnnotation implements JavaType {
* Used in creating annotation instances from JDK variant
*/
public JavaTypeAnnotation(JavaType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.JAVA_TYPE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,18 +32,8 @@ public class JavaTypeRegistrationAnnotation implements JavaTypeRegistration {
* Used in creating annotation instances from JDK variant
*/
public JavaTypeRegistrationAnnotation(JavaTypeRegistration annotation, SourceModelBuildingContext modelContext) {
this.javaType = extractJdkValue(
annotation,
HibernateAnnotations.JAVA_TYPE_REGISTRATION,
"javaType",
modelContext
);
this.descriptorClass = extractJdkValue(
annotation,
HibernateAnnotations.JAVA_TYPE_REGISTRATION,
"descriptorClass",
modelContext
);
this.javaType = annotation.javaType();
this.descriptorClass = annotation.descriptorClass();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class JdbcTypeAnnotation implements JdbcType {
* Used in creating annotation instances from JDK variant
*/
public JdbcTypeAnnotation(JdbcType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.JDBC_TYPE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class JdbcTypeCodeAnnotation implements JdbcTypeCode {
* Used in creating annotation instances from JDK variant
*/
public JdbcTypeCodeAnnotation(JdbcTypeCode annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.JDBC_TYPE_CODE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,13 +33,8 @@ public class JdbcTypeRegistrationAnnotation implements JdbcTypeRegistration {
* Used in creating annotation instances from JDK variant
*/
public JdbcTypeRegistrationAnnotation(JdbcTypeRegistration annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.JDBC_TYPE_REGISTRATION, "value", modelContext );
this.registrationCode = extractJdkValue(
annotation,
HibernateAnnotations.JDBC_TYPE_REGISTRATION,
"registrationCode",
modelContext
);
this.value = annotation.value();
this.registrationCode = annotation.registrationCode();
}
/**

View File

@ -55,9 +55,7 @@ public class JoinColumnJpaAnnotation implements JoinColumn {
this.columnDefinition = "";
this.options = "";
this.table = "";
this.foreignKey = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.ForeignKey.class )
.createUsage( modelContext );
this.foreignKey = JpaAnnotations.FOREIGN_KEY.createUsage( modelContext );
this.check = new jakarta.persistence.CheckConstraint[0];
this.comment = "";
}
@ -66,28 +64,18 @@ public class JoinColumnJpaAnnotation implements JoinColumn {
* Used in creating annotation instances from JDK variant
*/
public JoinColumnJpaAnnotation(JoinColumn annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "name", modelContext );
this.referencedColumnName = extractJdkValue(
annotation,
JpaAnnotations.JOIN_COLUMN,
"referencedColumnName",
modelContext
);
this.unique = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "unique", modelContext );
this.nullable = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "nullable", modelContext );
this.insertable = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "insertable", modelContext );
this.updatable = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "updatable", modelContext );
this.columnDefinition = extractJdkValue(
annotation,
JpaAnnotations.JOIN_COLUMN,
"columnDefinition",
modelContext
);
this.options = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "options", modelContext );
this.table = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "table", modelContext );
this.name = annotation.name();
this.referencedColumnName = annotation.referencedColumnName();
this.unique = annotation.unique();
this.nullable = annotation.nullable();
this.insertable = annotation.insertable();
this.updatable = annotation.updatable();
this.columnDefinition = annotation.columnDefinition();
this.options = annotation.options();
this.table = annotation.table();
this.foreignKey = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "foreignKey", modelContext );
this.check = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "check", modelContext );
this.comment = extractJdkValue( annotation, JpaAnnotations.JOIN_COLUMN, "comment", modelContext );
this.comment = annotation.comment();
}
/**

View File

@ -10,10 +10,12 @@ import java.lang.annotation.Annotation;
import org.hibernate.annotations.JoinColumnOrFormula;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.HibernateAnnotations.JOIN_COLUMN_OR_FORMULA;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@ -27,48 +29,24 @@ public class JoinColumnOrFormulaAnnotation implements JoinColumnOrFormula {
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public JoinColumnOrFormulaAnnotation(SourceModelBuildingContext modelContext) {
this.formula = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( org.hibernate.annotations.JoinFormula.class )
.createUsage( modelContext );
this.column = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.JoinColumn.class )
.createUsage( modelContext );
this.formula = HibernateAnnotations.JOIN_FORMULA.createUsage( modelContext );
this.column = JpaAnnotations.JOIN_COLUMN.createUsage( modelContext );
}
/**
* Used in creating annotation instances from JDK variant
*/
public JoinColumnOrFormulaAnnotation(JoinColumnOrFormula annotation, SourceModelBuildingContext modelContext) {
this.formula = extractJdkValue(
annotation,
HibernateAnnotations.JOIN_COLUMN_OR_FORMULA,
"formula",
modelContext
);
this.column = extractJdkValue(
annotation,
HibernateAnnotations.JOIN_COLUMN_OR_FORMULA,
"column",
modelContext
);
this.formula = extractJdkValue( annotation, JOIN_COLUMN_OR_FORMULA, "formula", modelContext );
this.column = extractJdkValue( annotation, JOIN_COLUMN_OR_FORMULA, "column", modelContext );
}
/**
* Used in creating annotation instances from Jandex variant
*/
public JoinColumnOrFormulaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.formula = extractJandexValue(
annotation,
HibernateAnnotations.JOIN_COLUMN_OR_FORMULA,
"formula",
modelContext
);
this.column = extractJandexValue(
annotation,
HibernateAnnotations.JOIN_COLUMN_OR_FORMULA,
"column",
modelContext
);
this.formula = extractJandexValue( annotation, JOIN_COLUMN_OR_FORMULA, "formula", modelContext );
this.column = extractJandexValue( annotation, JOIN_COLUMN_OR_FORMULA, "column", modelContext );
}
@Override

View File

@ -30,9 +30,7 @@ public class JoinColumnsJpaAnnotation implements JoinColumns, RepeatableContaine
* Used in creating dynamic annotation instances (e.g. from XML)
*/
public JoinColumnsJpaAnnotation(SourceModelBuildingContext modelContext) {
this.foreignKey = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.ForeignKey.class )
.createUsage( modelContext );
this.foreignKey = JpaAnnotations.FOREIGN_KEY.createUsage( modelContext );
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -34,13 +33,8 @@ public class JoinFormulaAnnotation implements JoinFormula {
* Used in creating annotation instances from JDK variant
*/
public JoinFormulaAnnotation(JoinFormula annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.JOIN_FORMULA, "value", modelContext );
this.referencedColumnName = extractJdkValue(
annotation,
HibernateAnnotations.JOIN_FORMULA,
"referencedColumnName",
modelContext
);
this.value = annotation.value();
this.referencedColumnName = annotation.referencedColumnName();
}
/**

View File

@ -57,12 +57,8 @@ public class JoinTableJpaAnnotation implements JoinTable, CommonTableDetails {
this.schema = "";
this.joinColumns = new jakarta.persistence.JoinColumn[0];
this.inverseJoinColumns = new jakarta.persistence.JoinColumn[0];
this.foreignKey = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.ForeignKey.class )
.createUsage( modelContext );
this.inverseForeignKey = modelContext.getAnnotationDescriptorRegistry()
.getDescriptor( jakarta.persistence.ForeignKey.class )
.createUsage( modelContext );
this.foreignKey = JpaAnnotations.FOREIGN_KEY.createUsage( modelContext );
this.inverseForeignKey = JpaAnnotations.FOREIGN_KEY.createUsage( modelContext );
this.uniqueConstraints = new jakarta.persistence.UniqueConstraint[0];
this.indexes = new jakarta.persistence.Index[0];
this.check = new jakarta.persistence.CheckConstraint[0];
@ -74,9 +70,9 @@ public class JoinTableJpaAnnotation implements JoinTable, CommonTableDetails {
* Used in creating annotation instances from JDK variant
*/
public JoinTableJpaAnnotation(JoinTable annotation, SourceModelBuildingContext modelContext) {
this.name = extractJdkValue( annotation, JpaAnnotations.JOIN_TABLE, "name", modelContext );
this.catalog = extractJdkValue( annotation, JpaAnnotations.JOIN_TABLE, "catalog", modelContext );
this.schema = extractJdkValue( annotation, JpaAnnotations.JOIN_TABLE, "schema", modelContext );
this.name = annotation.name();
this.catalog = annotation.catalog();
this.schema = annotation.schema();
this.joinColumns = extractJdkValue( annotation, JpaAnnotations.JOIN_TABLE, "joinColumns", modelContext );
this.inverseJoinColumns = extractJdkValue(
annotation,
@ -99,8 +95,8 @@ public class JoinTableJpaAnnotation implements JoinTable, CommonTableDetails {
);
this.indexes = extractJdkValue( annotation, JpaAnnotations.JOIN_TABLE, "indexes", modelContext );
this.check = extractJdkValue( annotation, JpaAnnotations.JOIN_TABLE, "check", modelContext );
this.comment = extractJdkValue( annotation, JpaAnnotations.JOIN_TABLE, "comment", modelContext );
this.options = extractJdkValue( annotation, JpaAnnotations.JOIN_TABLE, "options", modelContext );
this.comment = annotation.comment();
this.options = annotation.options();
}
/**

View File

@ -9,11 +9,8 @@ package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.LazyCollection;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class LazyCollectionAnnotation implements LazyCollection {
@ -30,7 +27,7 @@ public class LazyCollectionAnnotation implements LazyCollection {
* Used in creating annotation instances from JDK variant
*/
public LazyCollectionAnnotation(LazyCollection annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.LAZY_COLLECTION, "value", modelContext );
this.value = annotation.value();
}

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class LazyGroupAnnotation implements LazyGroup {
* Used in creating annotation instances from JDK variant
*/
public LazyGroupAnnotation(LazyGroup annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.LAZY_GROUP, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class LazyToOneAnnotation implements LazyToOne {
* Used in creating annotation instances from JDK variant
*/
public LazyToOneAnnotation(LazyToOne annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.LAZY_TO_ONE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -33,7 +32,7 @@ public class ListIndexBaseAnnotation implements ListIndexBase {
* Used in creating annotation instances from JDK variant
*/
public ListIndexBaseAnnotation(ListIndexBase annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.LIST_INDEX_BASE, "value", modelContext );
this.value = annotation.value();
}
/**

View File

@ -15,7 +15,6 @@ import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +31,7 @@ public class ListIndexJavaTypeAnnotation implements ListIndexJavaType {
* Used in creating annotation instances from JDK variant
*/
public ListIndexJavaTypeAnnotation(ListIndexJavaType annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue( annotation, HibernateAnnotations.LIST_INDEX_JAVA_TYPE, "value", modelContext );
this.value = annotation.value();
}
/**

Some files were not shown because too many files have changed in this diff Show More