HHH-18520 Upgrade to hibernate-models 0.9.0

This commit is contained in:
Andrea Boriero 2024-08-28 13:49:05 +02:00 committed by Steve Ebersole
parent 3c1b5c7a1d
commit 92c434dd9b
272 changed files with 1508 additions and 2659 deletions

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Access;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AccessJpaAnnotation implements Access {
@ -39,8 +35,8 @@ public class AccessJpaAnnotation implements Access {
/**
* Used in creating annotation instances from Jandex variant
*/
public AccessJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, JpaAnnotations.ACCESS, "value", modelContext );
public AccessJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (jakarta.persistence.AccessType) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
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 static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AnyAnnotation implements Any, AttributeMarker, AttributeMarker.Fetchable, AttributeMarker.Optionalable {
@ -42,9 +38,9 @@ public class AnyAnnotation implements Any, AttributeMarker, AttributeMarker.Fetc
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.fetch = extractJandexValue( annotation, HibernateAnnotations.ANY, "fetch", modelContext );
this.optional = extractJandexValue( annotation, HibernateAnnotations.ANY, "optional", modelContext );
public AnyAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.fetch = (jakarta.persistence.FetchType) attributeValues.get( "fetch" );
this.optional = (boolean) attributeValues.get( "optional" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.AnyDiscriminator;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AnyDiscriminatorAnnotation implements AnyDiscriminator {
@ -38,8 +34,8 @@ public class AnyDiscriminatorAnnotation implements AnyDiscriminator {
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyDiscriminatorAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.ANY_DISCRIMINATOR, "value", modelContext );
public AnyDiscriminatorAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (jakarta.persistence.DiscriminatorType) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.AnyDiscriminatorValue;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AnyDiscriminatorValueAnnotation implements AnyDiscriminatorValue {
@ -39,19 +35,9 @@ public class AnyDiscriminatorValueAnnotation implements AnyDiscriminatorValue {
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyDiscriminatorValueAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.discriminator = extractJandexValue(
annotation,
HibernateAnnotations.ANY_DISCRIMINATOR_VALUE,
"discriminator",
modelContext
);
this.entity = extractJandexValue(
annotation,
HibernateAnnotations.ANY_DISCRIMINATOR_VALUE,
"entity",
modelContext
);
public AnyDiscriminatorValueAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.discriminator = (String) attributeValues.get( "discriminator" );
this.entity = (Class<?>) attributeValues.get( "entity" );
}
@Override

View File

@ -6,18 +6,15 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.AnyDiscriminatorValue;
import org.hibernate.annotations.AnyDiscriminatorValues;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import org.hibernate.annotations.AnyDiscriminatorValues;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -49,13 +46,8 @@ public class AnyDiscriminatorValuesAnnotation
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyDiscriminatorValuesAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.ANY_DISCRIMINATOR_VALUES,
"value",
modelContext
);
public AnyDiscriminatorValuesAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (AnyDiscriminatorValue[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.internal.AnyKeyType;
import org.hibernate.boot.models.XmlAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AnyKeTypeAnnotation implements AnyKeyType {
@ -37,8 +33,8 @@ public class AnyKeTypeAnnotation implements AnyKeyType {
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyKeTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, XmlAnnotations.ANY_KEY_TYPE, "value", modelContext );
public AnyKeTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
}
@Override

View File

@ -7,14 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.AnyKeyJavaClass;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AnyKeyJavaClassAnnotation implements AnyKeyJavaClass {
@ -36,13 +33,8 @@ public class AnyKeyJavaClassAnnotation implements AnyKeyJavaClass {
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyKeyJavaClassAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ANY_KEY_JAVA_CLASS,
"value",
modelContext
);
public AnyKeyJavaClassAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<?>) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AnyKeyJavaTypeAnnotation implements AnyKeyJavaType {
@ -37,13 +34,8 @@ public class AnyKeyJavaTypeAnnotation implements AnyKeyJavaType {
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyKeyJavaTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ANY_KEY_JAVA_TYPE,
"value",
modelContext
);
public AnyKeyJavaTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<? extends BasicJavaType<?>>) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AnyKeyJdbcTypeAnnotation implements AnyKeyJdbcType {
@ -37,13 +34,8 @@ public class AnyKeyJdbcTypeAnnotation implements AnyKeyJdbcType {
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyKeyJdbcTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ANY_KEY_JDBC_TYPE,
"value",
modelContext
);
public AnyKeyJdbcTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<? extends JdbcType>) attributeValues.get( "value" );
}
@Override

View File

@ -7,14 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.AnyKeyJdbcTypeCode;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AnyKeyJdbcTypeCodeAnnotation implements AnyKeyJdbcTypeCode {
@ -36,13 +33,8 @@ public class AnyKeyJdbcTypeCodeAnnotation implements AnyKeyJdbcTypeCode {
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyKeyJdbcTypeCodeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ANY_KEY_JDBC_TYPE_CODE,
"value",
modelContext
);
public AnyKeyJdbcTypeCodeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (int) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.internal.Abstract;
import org.hibernate.boot.internal.AnyKeyType;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
/**
* @author Steve Ebersole
*/
@ -39,13 +36,8 @@ public class AnyKeyTypeXmlAnnotation implements AnyKeyType {
/**
* Used in creating annotation instances from Jandex variant
*/
public AnyKeyTypeXmlAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
org.hibernate.boot.models.XmlAnnotations.ANY_KEY_TYPE,
"value",
modelContext
);
public AnyKeyTypeXmlAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ArrayAnnotation implements Array {
@ -37,8 +33,8 @@ public class ArrayAnnotation implements Array {
/**
* Used in creating annotation instances from Jandex variant
*/
public ArrayAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.length = extractJandexValue( annotation, HibernateAnnotations.ARRAY, "length", modelContext );
public ArrayAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.length = (int) attributeValues.get( "length" );
}
@Override

View File

@ -7,16 +7,15 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -50,11 +49,13 @@ public class AssociationOverrideJpaAnnotation implements AssociationOverride {
/**
* Used in creating annotation instances from Jandex variant
*/
public AssociationOverrideJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext 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 );
public AssociationOverrideJpaAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.joinColumns = (jakarta.persistence.JoinColumn[]) attributeValues.get( "joinColumns" );
this.foreignKey = (jakarta.persistence.ForeignKey) attributeValues.get( "foreignKey" );
this.joinTable = (jakarta.persistence.JoinTable) attributeValues.get( "joinTable" );
}
@Override

View File

@ -7,15 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.AssociationOverrides;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -39,8 +37,10 @@ public class AssociationOverridesJpaAnnotation implements AssociationOverrides {
/**
* Used in creating annotation instances from Jandex variant
*/
public AssociationOverridesJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, JpaAnnotations.ASSOCIATION_OVERRIDES, "value", modelContext );
public AssociationOverridesJpaAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = (jakarta.persistence.AssociationOverride[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,9 +7,9 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.AttributeAccessor;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
@ -41,14 +41,10 @@ public class AttributeAccessorAnnotation implements AttributeAccessor {
/**
* Used in creating annotation instances from Jandex variant
*/
public AttributeAccessorAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.ATTRIBUTE_ACCESSOR, "value", modelContext );
this.strategy = extractJandexValue(
annotation,
HibernateAnnotations.ATTRIBUTE_ACCESSOR,
"strategy",
modelContext
);
public AttributeAccessorAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
this.strategy = (Class<? extends org.hibernate.property.access.spi.PropertyAccessStrategy>) attributeValues
.get( "strategy" );
}
@Override

View File

@ -7,14 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.AttributeBinderType;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class AttributeBinderTypeAnnotation implements AttributeBinderType {
@ -36,13 +33,8 @@ public class AttributeBinderTypeAnnotation implements AttributeBinderType {
/**
* Used in creating annotation instances from Jandex variant
*/
public AttributeBinderTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.binder = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.ATTRIBUTE_BINDER_TYPE,
"binder",
modelContext
);
public AttributeBinderTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.binder = (Class<? extends org.hibernate.binder.AttributeBinder<?>>) attributeValues.get( "binder" );
}
@Override

View File

@ -7,15 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.AttributeOverride;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -42,9 +40,9 @@ public class AttributeOverrideJpaAnnotation implements AttributeOverride {
/**
* Used in creating annotation instances from Jandex variant
*/
public AttributeOverrideJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.ATTRIBUTE_OVERRIDE, "name", modelContext );
this.column = extractJandexValue( annotation, JpaAnnotations.ATTRIBUTE_OVERRIDE, "column", modelContext );
public AttributeOverrideJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.column = (jakarta.persistence.Column) attributeValues.get( "column" );
}
@Override

View File

@ -7,15 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.AttributeOverrides;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -39,8 +37,8 @@ public class AttributeOverridesJpaAnnotation implements AttributeOverrides {
/**
* Used in creating annotation instances from Jandex variant
*/
public AttributeOverridesJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, JpaAnnotations.ATTRIBUTE_OVERRIDES, "value", modelContext );
public AttributeOverridesJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (jakarta.persistence.AttributeOverride[]) attributeValues.get( "value" );
}
@Override

View File

@ -6,13 +6,11 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Bag;
import org.hibernate.models.spi.SourceModelBuildingContext;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -32,7 +30,7 @@ public class BagAnnotation implements Bag {
/**
* Used in creating annotation instances from Jandex variant
*/
public BagAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
public BagAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
}
@Override

View File

@ -7,17 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.boot.models.annotations.spi.AttributeMarker;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Basic;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class BasicJpaAnnotation
@ -45,9 +41,9 @@ public class BasicJpaAnnotation
/**
* Used in creating annotation instances from Jandex variant
*/
public BasicJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.fetch = extractJandexValue( annotation, JpaAnnotations.BASIC, "fetch", modelContext );
this.optional = extractJandexValue( annotation, JpaAnnotations.BASIC, "optional", modelContext );
public BasicJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.fetch = (jakarta.persistence.FetchType) attributeValues.get( "fetch" );
this.optional = (boolean) attributeValues.get( "optional" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.BatchSize;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class BatchSizeAnnotation implements BatchSize {
@ -37,8 +33,8 @@ public class BatchSizeAnnotation implements BatchSize {
/**
* Used in creating annotation instances from Jandex variant
*/
public BatchSizeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.size = extractJandexValue( annotation, HibernateAnnotations.BATCH_SIZE, "size", modelContext );
public BatchSizeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.size = (int) attributeValues.get( "size" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Cache;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CacheAnnotation implements Cache {
@ -46,11 +42,11 @@ public class CacheAnnotation implements Cache {
/**
* Used in creating annotation instances from Jandex variant
*/
public CacheAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.usage = extractJandexValue( annotation, HibernateAnnotations.CACHE, "usage", modelContext );
this.region = extractJandexValue( annotation, HibernateAnnotations.CACHE, "region", modelContext );
this.includeLazy = extractJandexValue( annotation, HibernateAnnotations.CACHE, "includeLazy", modelContext );
this.include = extractJandexValue( annotation, HibernateAnnotations.CACHE, "include", modelContext );
public CacheAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.usage = (org.hibernate.annotations.CacheConcurrencyStrategy) attributeValues.get( "usage" );
this.region = (String) attributeValues.get( "region" );
this.includeLazy = (boolean) attributeValues.get( "includeLazy" );
this.include = (String) attributeValues.get( "include" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Cacheable;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CacheableJpaAnnotation implements Cacheable {
@ -39,8 +35,8 @@ public class CacheableJpaAnnotation implements Cacheable {
/**
* Used in creating annotation instances from Jandex variant
*/
public CacheableJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, JpaAnnotations.CACHEABLE, "value", modelContext );
public CacheableJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (boolean) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Cascade;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CascadeAnnotation implements Cascade {
@ -37,8 +33,8 @@ public class CascadeAnnotation implements Cascade {
/**
* Used in creating annotation instances from Jandex variant
*/
public CascadeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.CASCADE, "value", modelContext );
public CascadeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (org.hibernate.annotations.CascadeType[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,14 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Check;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CheckAnnotation implements Check {
@ -39,19 +36,9 @@ public class CheckAnnotation implements Check {
/**
* Used in creating annotation instances from Jandex variant
*/
public CheckAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.CHECK,
"name",
modelContext
);
this.constraints = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.CHECK,
"constraints",
modelContext
);
public CheckAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.constraints = (String) attributeValues.get( "constraints" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.CheckConstraint;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CheckConstraintJpaAnnotation implements CheckConstraint {
@ -45,10 +41,10 @@ public class CheckConstraintJpaAnnotation implements CheckConstraint {
/**
* Used in creating annotation instances from Jandex variant
*/
public CheckConstraintJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.CHECK_CONSTRAINT, "name", modelContext );
this.constraint = extractJandexValue( annotation, JpaAnnotations.CHECK_CONSTRAINT, "constraint", modelContext );
this.options = extractJandexValue( annotation, JpaAnnotations.CHECK_CONSTRAINT, "options", modelContext );
public CheckConstraintJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.constraint = (String) attributeValues.get( "constraint" );
this.options = (String) attributeValues.get( "options" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Check;
import org.hibernate.annotations.Checks;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -40,8 +38,8 @@ public class ChecksAnnotation implements Checks, RepeatableContainer<Check> {
/**
* Used in creating annotation instances from Jandex variant
*/
public ChecksAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.CHECKS, "value", modelContext );
public ChecksAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Check[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Collate;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CollateAnnotation implements Collate {
@ -37,8 +33,8 @@ public class CollateAnnotation implements Collate {
/**
* Used in creating annotation instances from Jandex variant
*/
public CollateAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.COLLATE, "value", modelContext );
public CollateAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.internal.CollectionClassification;
import org.hibernate.boot.internal.LimitedCollectionClassification;
import org.hibernate.boot.models.XmlAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CollectionClassificationXmlAnnotation implements CollectionClassification {
@ -41,9 +37,9 @@ public class CollectionClassificationXmlAnnotation implements CollectionClassifi
* Used in creating annotation instances from Jandex variant
*/
public CollectionClassificationXmlAnnotation(
AnnotationInstance annotation,
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, XmlAnnotations.COLLECTION_CLASSIFICATION, "value", modelContext );
this.value = (LimitedCollectionClassification) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
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;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -46,20 +44,11 @@ public class CollectionIdAnnotation implements CollectionId {
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionIdAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.column = extractJandexValue( annotation, HibernateAnnotations.COLLECTION_ID, "column", modelContext );
this.generatorImplementation = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_ID,
"generatorImplementation",
modelContext
);
this.generator = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_ID,
"generator",
modelContext
);
public CollectionIdAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.column = (jakarta.persistence.Column) attributeValues.get( "column" );
this.generatorImplementation = (Class<? extends org.hibernate.id.IdentifierGenerator>) attributeValues
.get( "generatorImplementation" );
this.generator = (String) attributeValues.get( "generator" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CollectionIdJavaType;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CollectionIdJavaTypeAnnotation implements CollectionIdJavaType {
@ -37,13 +33,8 @@ public class CollectionIdJavaTypeAnnotation implements CollectionIdJavaType {
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionIdJavaTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_ID_JAVA_TYPE,
"value",
modelContext
);
public CollectionIdJavaTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<? extends org.hibernate.type.descriptor.java.BasicJavaType<?>>) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CollectionIdJdbcType;
import org.hibernate.boot.models.HibernateAnnotations;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CollectionIdJdbcTypeAnnotation implements CollectionIdJdbcType {
@ -38,13 +34,8 @@ public class CollectionIdJdbcTypeAnnotation implements CollectionIdJdbcType {
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionIdJdbcTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_ID_JDBC_TYPE,
"value",
modelContext
);
public CollectionIdJdbcTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<? extends JdbcType>) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CollectionIdJdbcTypeCode;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CollectionIdJdbcTypeCodeAnnotation implements CollectionIdJdbcTypeCode {
@ -39,13 +35,8 @@ public class CollectionIdJdbcTypeCodeAnnotation implements CollectionIdJdbcTypeC
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionIdJdbcTypeCodeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_ID_JDBC_TYPE_CODE,
"value",
modelContext
);
public CollectionIdJdbcTypeCodeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (int) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CollectionIdMutability;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CollectionIdMutabilityAnnotation implements CollectionIdMutability {
@ -39,13 +35,8 @@ public class CollectionIdMutabilityAnnotation implements CollectionIdMutability
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionIdMutabilityAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_ID_MUTABILITY,
"value",
modelContext
);
public CollectionIdMutabilityAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<? extends org.hibernate.type.descriptor.java.MutabilityPlan<?>>) attributeValues.get( "value" );
}
@Override

View File

@ -7,14 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CollectionIdType;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -41,14 +39,9 @@ public class CollectionIdTypeAnnotation implements CollectionIdType {
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionIdTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, COLLECTION_ID_TYPE, "value", modelContext );
this.parameters = extractJandexValue(
annotation,
COLLECTION_ID_TYPE,
"parameters",
modelContext
);
public CollectionIdTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<? extends org.hibernate.usertype.UserType<?>>) attributeValues.get( "value" );
this.parameters = (org.hibernate.annotations.Parameter[]) attributeValues.get( "parameters" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.jaxb.mapping.spi.JaxbCollectionTableImpl;
import org.hibernate.boot.models.JpaAnnotations;
@ -16,12 +17,9 @@ import org.hibernate.boot.models.xml.internal.db.JoinColumnProcessing;
import org.hibernate.boot.models.xml.spi.XmlDocumentContext;
import org.hibernate.models.spi.SourceModelBuildingContext;
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;
import static org.hibernate.boot.models.xml.internal.XmlAnnotationHelper.applyOptionalString;
@ -73,25 +71,15 @@ public class CollectionTableJpaAnnotation implements CollectionTable, CommonTabl
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionTableJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext 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,
COLLECTION_TABLE,
"joinColumns",
modelContext
);
this.foreignKey = extractJandexValue( annotation, COLLECTION_TABLE, "foreignKey", modelContext );
this.uniqueConstraints = extractJandexValue(
annotation,
COLLECTION_TABLE,
"uniqueConstraints",
modelContext
);
this.indexes = extractJandexValue( annotation, COLLECTION_TABLE, "indexes", modelContext );
this.options = extractJandexValue( annotation, COLLECTION_TABLE, "options", modelContext );
public CollectionTableJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.catalog = (String) attributeValues.get( "catalog" );
this.schema = (String) attributeValues.get( "schema" );
this.joinColumns = (jakarta.persistence.JoinColumn[]) attributeValues.get( "joinColumns" );
this.foreignKey = (jakarta.persistence.ForeignKey) attributeValues.get( "foreignKey" );
this.uniqueConstraints = (jakarta.persistence.UniqueConstraint[]) attributeValues.get( "uniqueConstraints" );
this.indexes = (jakarta.persistence.Index[]) attributeValues.get( "indexes" );
this.options = (String) attributeValues.get( "options" );
}
@Override

View File

@ -7,14 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CollectionType;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -41,14 +39,9 @@ public class CollectionTypeAnnotation implements CollectionType {
/**
* Used in creating annotation instances from Jandex variant
*/
public CollectionTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.type = extractJandexValue( annotation, COLLECTION_TYPE, "type", modelContext );
this.parameters = extractJandexValue(
annotation,
COLLECTION_TYPE,
"parameters",
modelContext
);
public CollectionTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.type = (Class<? extends org.hibernate.usertype.UserCollectionType>) attributeValues.get( "type" );
this.parameters = (org.hibernate.annotations.Parameter[]) attributeValues.get( "parameters" );
}
@Override

View File

@ -7,14 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CollectionTypeRegistration;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -46,26 +44,11 @@ public class CollectionTypeRegistrationAnnotation implements CollectionTypeRegis
* Used in creating annotation instances from Jandex variant
*/
public CollectionTypeRegistrationAnnotation(
AnnotationInstance annotation,
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.classification = extractJandexValue(
annotation,
COLLECTION_TYPE_REGISTRATION,
"classification",
modelContext
);
this.type = extractJandexValue(
annotation,
COLLECTION_TYPE_REGISTRATION,
"type",
modelContext
);
this.parameters = extractJandexValue(
annotation,
COLLECTION_TYPE_REGISTRATION,
"parameters",
modelContext
);
this.classification = (org.hibernate.metamodel.CollectionClassification) attributeValues.get( "classification" );
this.type = (Class<? extends org.hibernate.usertype.UserCollectionType>) attributeValues.get( "type" );
this.parameters = (org.hibernate.annotations.Parameter[]) attributeValues.get( "parameters" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CollectionTypeRegistration;
import org.hibernate.annotations.CollectionTypeRegistrations;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -49,14 +47,9 @@ public class CollectionTypeRegistrationsAnnotation
* Used in creating annotation instances from Jandex variant
*/
public CollectionTypeRegistrationsAnnotation(
AnnotationInstance annotation,
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.COLLECTION_TYPE_REGISTRATIONS,
"value",
modelContext
);
this.value = (CollectionTypeRegistration[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.ColumnDefault;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ColumnDefaultAnnotation implements ColumnDefault {
@ -37,8 +33,8 @@ public class ColumnDefaultAnnotation implements ColumnDefault {
/**
* Used in creating annotation instances from Jandex variant
*/
public ColumnDefaultAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.COLUMN_DEFAULT, "value", modelContext );
public ColumnDefaultAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.jaxb.mapping.spi.JaxbColumnImpl;
import org.hibernate.boot.models.JpaAnnotations;
@ -18,11 +19,8 @@ import org.hibernate.boot.models.xml.spi.XmlDocumentContext;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Column;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -95,26 +93,21 @@ public class ColumnJpaAnnotation implements Column,
/**
* Used in creating annotation instances from Jandex variant
*/
public ColumnJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.COLUMN, "name", modelContext );
this.unique = extractJandexValue( annotation, JpaAnnotations.COLUMN, "unique", modelContext );
this.nullable = extractJandexValue( annotation, JpaAnnotations.COLUMN, "nullable", modelContext );
this.insertable = extractJandexValue( annotation, JpaAnnotations.COLUMN, "insertable", modelContext );
this.updatable = extractJandexValue( annotation, JpaAnnotations.COLUMN, "updatable", modelContext );
this.columnDefinition = extractJandexValue(
annotation,
JpaAnnotations.COLUMN,
"columnDefinition",
modelContext
);
this.options = extractJandexValue( annotation, JpaAnnotations.COLUMN, "options", modelContext );
this.table = extractJandexValue( annotation, JpaAnnotations.COLUMN, "table", modelContext );
this.length = extractJandexValue( annotation, JpaAnnotations.COLUMN, "length", modelContext );
this.precision = extractJandexValue( annotation, JpaAnnotations.COLUMN, "precision", modelContext );
this.scale = extractJandexValue( annotation, JpaAnnotations.COLUMN, "scale", modelContext );
this.secondPrecision = extractJandexValue( annotation, JpaAnnotations.COLUMN, "secondPrecision", modelContext );
this.check = extractJandexValue( annotation, JpaAnnotations.COLUMN, "check", modelContext );
this.comment = extractJandexValue( annotation, JpaAnnotations.COLUMN, "comment", modelContext );
public ColumnJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.unique = (boolean) attributeValues.get( "unique" );
this.nullable = (boolean) attributeValues.get( "nullable" );
this.insertable = (boolean) attributeValues.get( "insertable" );
this.updatable = (boolean) attributeValues.get( "updatable" );
this.columnDefinition = (String) attributeValues.get( "columnDefinition" );
this.options = (String) attributeValues.get( "options" );
this.table = (String) attributeValues.get( "table" );
this.length = (int) attributeValues.get( "length" );
this.precision = (int) attributeValues.get( "precision" );
this.scale = (int) attributeValues.get( "scale" );
this.secondPrecision = (int) attributeValues.get( "secondPrecision" );
this.check = (jakarta.persistence.CheckConstraint[]) attributeValues.get( "check" );
this.comment = (String) attributeValues.get( "comment" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.ColumnResult;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ColumnResultJpaAnnotation implements ColumnResult {
@ -41,9 +37,9 @@ public class ColumnResultJpaAnnotation implements ColumnResult {
/**
* Used in creating annotation instances from Jandex variant
*/
public ColumnResultJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.COLUMN_RESULT, "name", modelContext );
this.type = extractJandexValue( annotation, JpaAnnotations.COLUMN_RESULT, "type", modelContext );
public ColumnResultJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.type = (Class<?>) attributeValues.get( "type" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.ColumnTransformer;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ColumnTransformerAnnotation implements ColumnTransformer {
@ -44,15 +40,10 @@ public class ColumnTransformerAnnotation implements ColumnTransformer {
/**
* Used in creating annotation instances from Jandex variant
*/
public ColumnTransformerAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.forColumn = extractJandexValue(
annotation,
HibernateAnnotations.COLUMN_TRANSFORMER,
"forColumn",
modelContext
);
this.read = extractJandexValue( annotation, HibernateAnnotations.COLUMN_TRANSFORMER, "read", modelContext );
this.write = extractJandexValue( annotation, HibernateAnnotations.COLUMN_TRANSFORMER, "write", modelContext );
public ColumnTransformerAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.forColumn = (String) attributeValues.get( "forColumn" );
this.read = (String) attributeValues.get( "read" );
this.write = (String) attributeValues.get( "write" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.ColumnTransformer;
import org.hibernate.annotations.ColumnTransformers;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -31,8 +29,8 @@ public class ColumnTransformersAnnotation implements ColumnTransformers, Repeata
this.value = extractJdkValue( annotation, HibernateAnnotations.COLUMN_TRANSFORMERS, "value", modelContext );
}
public ColumnTransformersAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.COLUMN_TRANSFORMERS, "value", modelContext );
public ColumnTransformersAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (ColumnTransformer[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Columns;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.models.spi.AnnotationDescriptor;
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" })
@ -41,8 +39,8 @@ public class ColumnsAnnotation implements Columns {
/**
* Used in creating annotation instances from Jandex variant
*/
public ColumnsAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.columns = extractJandexValue( annotation, HibernateAnnotations.COLUMNS, "columns", modelContext );
public ColumnsAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.columns = (jakarta.persistence.Column[]) attributeValues.get( "columns" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Comment;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CommentAnnotation implements Comment {
@ -40,9 +36,9 @@ public class CommentAnnotation implements Comment {
/**
* Used in creating annotation instances from Jandex variant
*/
public CommentAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.COMMENT, "value", modelContext );
this.on = extractJandexValue( annotation, HibernateAnnotations.COMMENT, "on", modelContext );
public CommentAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
this.on = (String) attributeValues.get( "on" );
}
@Override

View File

@ -7,15 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Comments;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -40,8 +38,8 @@ public class CommentsAnnotation implements Comments, RepeatableContainer<org.hib
/**
* Used in creating annotation instances from Jandex variant
*/
public CommentsAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.COMMENTS, "value", modelContext );
public CommentsAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (org.hibernate.annotations.Comment[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CompositeType;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CompositeTypeAnnotation implements CompositeType {
@ -37,8 +33,8 @@ public class CompositeTypeAnnotation implements CompositeType {
/**
* Used in creating annotation instances from Jandex variant
*/
public CompositeTypeAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.COMPOSITE_TYPE, "value", modelContext );
public CompositeTypeAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<? extends org.hibernate.usertype.CompositeUserType<?>>) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CompositeTypeRegistration;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CompositeTypeRegistrationAnnotation implements CompositeTypeRegistration {
@ -41,19 +37,9 @@ public class CompositeTypeRegistrationAnnotation implements CompositeTypeRegistr
/**
* Used in creating annotation instances from Jandex variant
*/
public CompositeTypeRegistrationAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.embeddableClass = extractJandexValue(
annotation,
HibernateAnnotations.COMPOSITE_TYPE_REGISTRATION,
"embeddableClass",
modelContext
);
this.userType = extractJandexValue(
annotation,
HibernateAnnotations.COMPOSITE_TYPE_REGISTRATION,
"userType",
modelContext
);
public CompositeTypeRegistrationAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.embeddableClass = (Class<?>) attributeValues.get( "embeddableClass" );
this.userType = (Class<? extends org.hibernate.usertype.CompositeUserType<?>>) attributeValues.get( "userType" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CompositeTypeRegistration;
import org.hibernate.annotations.CompositeTypeRegistrations;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -49,14 +47,9 @@ public class CompositeTypeRegistrationsAnnotation
* Used in creating annotation instances from Jandex variant
*/
public CompositeTypeRegistrationsAnnotation(
AnnotationInstance annotation,
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.COMPOSITE_TYPE_REGISTRATIONS,
"value",
modelContext
);
this.value = (CompositeTypeRegistration[]) attributeValues.get( "value" );
}
@Override

View File

@ -6,17 +6,11 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.internal.OrmAnnotationDescriptor;
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 java.util.Map;
import org.hibernate.annotations.ConcreteProxy;
import org.hibernate.models.spi.SourceModelBuildingContext;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
@ -37,7 +31,7 @@ public class ConcreteProxyAnnotation implements ConcreteProxy {
/**
* Used in creating annotation instances from Jandex variant
*/
public ConcreteProxyAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
public ConcreteProxyAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
}
@Override

View File

@ -7,15 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -42,9 +40,11 @@ public class ConstructorResultJpaAnnotation implements ConstructorResult {
/**
* Used in creating annotation instances from Jandex variant
*/
public ConstructorResultJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.targetClass = extractJandexValue( annotation, CONSTRUCTOR_RESULT, "targetClass", modelContext );
this.columns = extractJandexValue( annotation, CONSTRUCTOR_RESULT, "columns", modelContext );
public ConstructorResultJpaAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.targetClass = (Class<?>) attributeValues.get( "targetClass" );
this.columns = (jakarta.persistence.ColumnResult[]) attributeValues.get( "columns" );
}
@Override

View File

@ -7,17 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ConvertJpaAnnotation implements Convert {
@ -47,15 +42,10 @@ public class ConvertJpaAnnotation implements Convert {
/**
* Used in creating annotation instances from Jandex variant
*/
public ConvertJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.converter = extractJandexValue( annotation, CONVERT, "converter", modelContext );
this.attributeName = extractJandexValue( annotation, CONVERT, "attributeName", modelContext );
this.disableConversion = extractJandexValue(
annotation,
CONVERT,
"disableConversion",
modelContext
);
public ConvertJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.converter = (Class<? extends jakarta.persistence.AttributeConverter>) attributeValues.get( "converter" );
this.attributeName = (String) attributeValues.get( "attributeName" );
this.disableConversion = (boolean) attributeValues.get( "disableConversion" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Converter;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ConverterJpaAnnotation implements Converter {
@ -40,8 +36,8 @@ public class ConverterJpaAnnotation implements Converter {
/**
* Used in creating annotation instances from Jandex variant
*/
public ConverterJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.autoApply = extractJandexValue( annotation, JpaAnnotations.CONVERTER, "autoApply", modelContext );
public ConverterJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.autoApply = (boolean) attributeValues.get( "autoApply" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.ConverterRegistration;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ConverterRegistrationAnnotation implements ConverterRegistration {
@ -43,25 +39,12 @@ public class ConverterRegistrationAnnotation implements ConverterRegistration {
/**
* Used in creating annotation instances from Jandex variant
*/
public ConverterRegistrationAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.converter = extractJandexValue(
annotation,
HibernateAnnotations.CONVERTER_REGISTRATION,
"converter",
modelContext
);
this.domainType = extractJandexValue(
annotation,
HibernateAnnotations.CONVERTER_REGISTRATION,
"domainType",
modelContext
);
this.autoApply = extractJandexValue(
annotation,
HibernateAnnotations.CONVERTER_REGISTRATION,
"autoApply",
modelContext
);
public ConverterRegistrationAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.converter = (Class<? extends jakarta.persistence.AttributeConverter<?, ?>>) attributeValues.get( "converter" );
this.domainType = (Class<?>) attributeValues.get( "domainType" );
this.autoApply = (boolean) attributeValues.get( "autoApply" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.ConverterRegistration;
import org.hibernate.annotations.ConverterRegistrations;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -43,13 +41,10 @@ public class ConverterRegistrationsAnnotation
/**
* Used in creating annotation instances from Jandex variant
*/
public ConverterRegistrationsAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.CONVERTER_REGISTRATIONS,
"value",
modelContext
);
public ConverterRegistrationsAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = (ConverterRegistration[]) attributeValues.get( "value" );
}
@Override

View File

@ -6,16 +6,15 @@
*/
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import jakarta.persistence.Converts;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -35,7 +34,7 @@ public class ConvertsJpaAnnotation implements Converts, RepeatableContainer<jaka
public ConvertsJpaAnnotation(Converts annotation, SourceModelBuildingContext modelContext) {
this.value = extractJdkValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.CONVERTS,
JpaAnnotations.CONVERTS,
"value",
modelContext
);
@ -44,13 +43,8 @@ public class ConvertsJpaAnnotation implements Converts, RepeatableContainer<jaka
/**
* Used in creating annotation instances from Jandex variant
*/
public ConvertsJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.CONVERTS,
"value",
modelContext
);
public ConvertsJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (jakarta.persistence.Convert[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CreationTimestamp;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class CreationTimestampAnnotation implements CreationTimestamp {
@ -38,8 +34,8 @@ public class CreationTimestampAnnotation implements CreationTimestamp {
/**
* Used in creating annotation instances from Jandex variant
*/
public CreationTimestampAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.source = extractJandexValue( annotation, HibernateAnnotations.CREATION_TIMESTAMP, "source", modelContext );
public CreationTimestampAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.source = (org.hibernate.annotations.SourceType) attributeValues.get( "source" );
}
@Override

View File

@ -7,14 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.CurrentTimestamp;
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.generator.EventType.INSERT;
import static org.hibernate.generator.EventType.UPDATE;
@ -43,9 +40,9 @@ public class CurrentTimestampAnnotation implements CurrentTimestamp {
/**
* Used in creating annotation instances from Jandex variant
*/
public CurrentTimestampAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.event = extractJandexValue( annotation, HibernateAnnotations.CURRENT_TIMESTAMP, "event", modelContext );
this.source = extractJandexValue( annotation, HibernateAnnotations.CURRENT_TIMESTAMP, "source", modelContext );
public CurrentTimestampAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.event = (org.hibernate.generator.EventType[]) attributeValues.get( "event" );
this.source = (org.hibernate.annotations.SourceType) attributeValues.get( "source" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.jaxb.mapping.spi.JaxbDiscriminatorColumnImpl;
import org.hibernate.boot.models.annotations.spi.ColumnDetails;
@ -14,12 +15,8 @@ import org.hibernate.boot.models.xml.spi.XmlDocumentContext;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.DiscriminatorColumn;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class DiscriminatorColumnJpaAnnotation implements DiscriminatorColumn, ColumnDetails {
@ -55,37 +52,14 @@ public class DiscriminatorColumnJpaAnnotation implements DiscriminatorColumn, Co
/**
* Used in creating annotation instances from Jandex variant
*/
public DiscriminatorColumnJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"name",
modelContext
);
this.discriminatorType = extractJandexValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"discriminatorType",
modelContext
);
this.columnDefinition = extractJandexValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"columnDefinition",
modelContext
);
this.options = extractJandexValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"options",
modelContext
);
this.length = extractJandexValue(
annotation,
org.hibernate.boot.models.JpaAnnotations.DISCRIMINATOR_COLUMN,
"length",
modelContext
);
public DiscriminatorColumnJpaAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.discriminatorType = (jakarta.persistence.DiscriminatorType) attributeValues.get( "discriminatorType" );
this.columnDefinition = (String) attributeValues.get( "columnDefinition" );
this.options = (String) attributeValues.get( "options" );
this.length = (int) attributeValues.get( "length" );
}
@Override

View File

@ -7,14 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.DiscriminatorFormula;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class DiscriminatorFormulaAnnotation implements DiscriminatorFormula {
@ -39,19 +36,11 @@ public class DiscriminatorFormulaAnnotation implements DiscriminatorFormula {
/**
* Used in creating annotation instances from Jandex variant
*/
public DiscriminatorFormulaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.DISCRIMINATOR_FORMULA,
"value",
modelContext
);
this.discriminatorType = extractJandexValue(
annotation,
org.hibernate.boot.models.HibernateAnnotations.DISCRIMINATOR_FORMULA,
"discriminatorType",
modelContext
);
public DiscriminatorFormulaAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
this.discriminatorType = (jakarta.persistence.DiscriminatorType) attributeValues.get( "discriminatorType" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.DiscriminatorOptions;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class DiscriminatorOptionsAnnotation implements DiscriminatorOptions {
@ -41,19 +37,9 @@ public class DiscriminatorOptionsAnnotation implements DiscriminatorOptions {
/**
* Used in creating annotation instances from Jandex variant
*/
public DiscriminatorOptionsAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.force = extractJandexValue(
annotation,
HibernateAnnotations.DISCRIMINATOR_OPTIONS,
"force",
modelContext
);
this.insert = extractJandexValue(
annotation,
HibernateAnnotations.DISCRIMINATOR_OPTIONS,
"insert",
modelContext
);
public DiscriminatorOptionsAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.force = (boolean) attributeValues.get( "force");
this.insert = (boolean) attributeValues.get( "insert");
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.DiscriminatorValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class DiscriminatorValueJpaAnnotation implements DiscriminatorValue {
@ -38,8 +34,10 @@ public class DiscriminatorValueJpaAnnotation implements DiscriminatorValue {
/**
* Used in creating annotation instances from Jandex variant
*/
public DiscriminatorValueJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, JpaAnnotations.DISCRIMINATOR_VALUE, "value", modelContext );
public DiscriminatorValueJpaAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.DynamicInsert;
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")
public class DynamicInsertAnnotation implements DynamicInsert {
@ -36,7 +31,7 @@ public class DynamicInsertAnnotation implements DynamicInsert {
/**
* Used in creating annotation instances from Jandex variant
*/
public DynamicInsertAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
public DynamicInsertAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.DynamicUpdate;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class DynamicUpdateAnnotation implements DynamicUpdate {
@ -36,7 +32,7 @@ public class DynamicUpdateAnnotation implements DynamicUpdate {
/**
* Used in creating annotation instances from Jandex variant
*/
public DynamicUpdateAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
public DynamicUpdateAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
}
@Override

View File

@ -7,17 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.boot.models.annotations.spi.AttributeMarker;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.ElementCollection;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ElementCollectionJpaAnnotation implements ElementCollection, AttributeMarker.Fetchable {
@ -43,14 +39,11 @@ public class ElementCollectionJpaAnnotation implements ElementCollection, Attrib
/**
* Used in creating annotation instances from Jandex variant
*/
public ElementCollectionJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.targetClass = extractJandexValue(
annotation,
JpaAnnotations.ELEMENT_COLLECTION,
"targetClass",
modelContext
);
this.fetch = extractJandexValue( annotation, JpaAnnotations.ELEMENT_COLLECTION, "fetch", modelContext );
public ElementCollectionJpaAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.targetClass = (Class<?>) attributeValues.get( "targetClass" );
this.fetch = (jakarta.persistence.FetchType) attributeValues.get( "fetch" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.EmbeddableInstantiator;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class EmbeddableInstantiatorAnnotation implements EmbeddableInstantiator {
@ -39,13 +35,10 @@ public class EmbeddableInstantiatorAnnotation implements EmbeddableInstantiator
/**
* Used in creating annotation instances from Jandex variant
*/
public EmbeddableInstantiatorAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.EMBEDDABLE_INSTANTIATOR,
"value",
modelContext
);
public EmbeddableInstantiatorAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = (Class<? extends org.hibernate.metamodel.spi.EmbeddableInstantiator>) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.EmbeddableInstantiatorRegistration;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class EmbeddableInstantiatorRegistrationAnnotation implements EmbeddableInstantiatorRegistration {
@ -42,20 +38,11 @@ public class EmbeddableInstantiatorRegistrationAnnotation implements EmbeddableI
* Used in creating annotation instances from Jandex variant
*/
public EmbeddableInstantiatorRegistrationAnnotation(
AnnotationInstance annotation,
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.embeddableClass = extractJandexValue(
annotation,
HibernateAnnotations.EMBEDDABLE_INSTANTIATOR_REGISTRATION,
"embeddableClass",
modelContext
);
this.instantiator = extractJandexValue(
annotation,
HibernateAnnotations.EMBEDDABLE_INSTANTIATOR_REGISTRATION,
"instantiator",
modelContext
);
this.embeddableClass = (Class<?>) attributeValues.get( "embeddableClass" );
this.instantiator = (Class<? extends org.hibernate.metamodel.spi.EmbeddableInstantiator>) attributeValues
.get( "instantiator" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.EmbeddableInstantiatorRegistration;
import org.hibernate.annotations.EmbeddableInstantiatorRegistrations;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -49,14 +47,9 @@ public class EmbeddableInstantiatorRegistrationsAnnotation
* Used in creating annotation instances from Jandex variant
*/
public EmbeddableInstantiatorRegistrationsAnnotation(
AnnotationInstance annotation,
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
HibernateAnnotations.EMBEDDABLE_INSTANTIATOR_REGISTRATIONS,
"value",
modelContext
);
this.value = (EmbeddableInstantiatorRegistration[]) attributeValues.get( "value" );
}
@Override

View File

@ -6,11 +6,10 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.SourceModelBuildingContext;
import jakarta.persistence.Embeddable;
@ -33,7 +32,7 @@ public class EmbeddableJpaAnnotation implements Embeddable {
/**
* Used in creating annotation instances from Jandex variant
*/
public EmbeddableJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
public EmbeddableJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
}
@Override

View File

@ -6,11 +6,10 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.SourceModelBuildingContext;
import jakarta.persistence.EmbeddedId;
@ -32,7 +31,7 @@ public class EmbeddedIdJpaAnnotation implements EmbeddedId {
/**
* Used in creating annotation instances from Jandex variant
*/
public EmbeddedIdJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
public EmbeddedIdJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
}
@Override

View File

@ -6,11 +6,10 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.SourceModelBuildingContext;
import jakarta.persistence.Embedded;
@ -33,7 +32,7 @@ public class EmbeddedJpaAnnotation implements Embedded {
/**
* Used in creating annotation instances from Jandex variant
*/
public EmbeddedJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
public EmbeddedJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Entity;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class EntityJpaAnnotation implements Entity {
@ -39,8 +35,8 @@ public class EntityJpaAnnotation implements Entity {
/**
* Used in creating annotation instances from Jandex variant
*/
public EntityJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.ENTITY, "name", modelContext );
public EntityJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.EntityListeners;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class EntityListenersJpaAnnotation implements EntityListeners {
@ -38,8 +34,8 @@ public class EntityListenersJpaAnnotation implements EntityListeners {
/**
* Used in creating annotation instances from Jandex variant
*/
public EntityListenersJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, JpaAnnotations.ENTITY_LISTENERS, "value", modelContext );
public EntityListenersJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Class<?>[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.EntityResult;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class EntityResultJpaAnnotation implements EntityResult {
@ -47,16 +43,11 @@ public class EntityResultJpaAnnotation implements EntityResult {
/**
* Used in creating annotation instances from Jandex variant
*/
public EntityResultJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.entityClass = extractJandexValue( annotation, JpaAnnotations.ENTITY_RESULT, "entityClass", modelContext );
this.lockMode = extractJandexValue( annotation, JpaAnnotations.ENTITY_RESULT, "lockMode", modelContext );
this.fields = extractJandexValue( annotation, JpaAnnotations.ENTITY_RESULT, "fields", modelContext );
this.discriminatorColumn = extractJandexValue(
annotation,
JpaAnnotations.ENTITY_RESULT,
"discriminatorColumn",
modelContext
);
public EntityResultJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.entityClass = (Class<?>) attributeValues.get( "entityClass" );
this.lockMode = (jakarta.persistence.LockModeType) attributeValues.get( "lockMode" );
this.fields = (jakarta.persistence.FieldResult[]) attributeValues.get( "fields" );
this.discriminatorColumn = (String) attributeValues.get( "discriminatorColumn" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.Enumerated;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class EnumeratedJpaAnnotation implements Enumerated {
@ -39,8 +35,8 @@ public class EnumeratedJpaAnnotation implements Enumerated {
/**
* Used in creating annotation instances from Jandex variant
*/
public EnumeratedJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, JpaAnnotations.ENUMERATED, "value", modelContext );
public EnumeratedJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (jakarta.persistence.EnumType) attributeValues.get( "value" );
}
@Override

View File

@ -7,11 +7,10 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.EnumeratedValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -32,7 +31,7 @@ public class EnumeratedValueJpaAnnotation implements EnumeratedValue {
/**
* Used in creating annotation instances from Jandex variant
*/
public EnumeratedValueJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
public EnumeratedValueJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
}
@Override

View File

@ -6,11 +6,10 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.SourceModelBuildingContext;
import jakarta.persistence.ExcludeDefaultListeners;
@ -36,7 +35,7 @@ public class ExcludeDefaultListenersJpaAnnotation implements ExcludeDefaultListe
* Used in creating annotation instances from Jandex variant
*/
public ExcludeDefaultListenersJpaAnnotation(
AnnotationInstance annotation,
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
}

View File

@ -6,11 +6,10 @@
*/
package org.hibernate.boot.models.annotations.internal;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.models.spi.SourceModelBuildingContext;
import jakarta.persistence.ExcludeSuperclassListeners;
@ -36,7 +35,7 @@ public class ExcludeSuperclassListenersJpaAnnotation implements ExcludeSuperclas
* Used in creating annotation instances from Jandex variant
*/
public ExcludeSuperclassListenersJpaAnnotation(
AnnotationInstance annotation,
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
}

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.internal.Extends;
import org.hibernate.boot.models.XmlAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ExtendsXmlAnnotation implements Extends {
@ -37,8 +33,8 @@ public class ExtendsXmlAnnotation implements Extends {
/**
* Used in creating annotation instances from Jandex variant
*/
public ExtendsXmlAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.superType = extractJandexValue( annotation, XmlAnnotations.EXTENDS, "superType", modelContext );
public ExtendsXmlAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.superType = (String) attributeValues.get( "superType" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Fetch;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class FetchAnnotation implements Fetch {
@ -37,8 +33,8 @@ public class FetchAnnotation implements Fetch {
/**
* Used in creating annotation instances from Jandex variant
*/
public FetchAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.FETCH, "value", modelContext );
public FetchAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (org.hibernate.annotations.FetchMode) attributeValues.get( "value" );
}
@Override

View File

@ -7,14 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FetchProfile;
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" })
@ -46,14 +44,9 @@ public class FetchProfileAnnotation implements FetchProfile {
/**
* Used in creating annotation instances from Jandex variant
*/
public FetchProfileAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, HibernateAnnotations.FETCH_PROFILE, "name", modelContext );
this.fetchOverrides = extractJandexValue(
annotation,
HibernateAnnotations.FETCH_PROFILE,
"fetchOverrides",
modelContext
);
public FetchProfileAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.fetchOverrides = (FetchOverride[]) attributeValues.get( "fetchOverrides" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FetchProfileOverride;
import org.hibernate.boot.models.DialectOverrideAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class FetchProfileOverrideAnnotation implements FetchProfileOverride {
@ -44,25 +40,12 @@ public class FetchProfileOverrideAnnotation implements FetchProfileOverride {
/**
* Used in creating annotation instances from Jandex variant
*/
public FetchProfileOverrideAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.mode = extractJandexValue(
annotation,
DialectOverrideAnnotations.FETCH_PROFILE_OVERRIDE,
"mode",
modelContext
);
this.fetch = extractJandexValue(
annotation,
DialectOverrideAnnotations.FETCH_PROFILE_OVERRIDE,
"fetch",
modelContext
);
this.profile = extractJandexValue(
annotation,
DialectOverrideAnnotations.FETCH_PROFILE_OVERRIDE,
"profile",
modelContext
);
public FetchProfileOverrideAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.mode = (org.hibernate.annotations.FetchMode) attributeValues.get( "mode" );
this.fetch = (jakarta.persistence.FetchType) attributeValues.get( "fetch" );
this.profile = (String) attributeValues.get( "profile" );
}
@Override

View File

@ -7,15 +7,13 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FetchProfileOverrides;
import org.hibernate.boot.models.DialectOverrideAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -45,13 +43,10 @@ public class FetchProfileOverridesAnnotation
/**
* Used in creating annotation instances from Jandex variant
*/
public FetchProfileOverridesAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue(
annotation,
DialectOverrideAnnotations.FETCH_PROFILE_OVERRIDES,
"value",
modelContext
);
public FetchProfileOverridesAnnotation(
Map<String, Object> attributeValues,
SourceModelBuildingContext modelContext) {
this.value = (org.hibernate.annotations.FetchProfileOverride[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FetchProfile;
import org.hibernate.annotations.FetchProfiles;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -40,8 +38,8 @@ public class FetchProfilesAnnotation implements FetchProfiles, RepeatableContain
/**
* Used in creating annotation instances from Jandex variant
*/
public FetchProfilesAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.FETCH_PROFILES, "value", modelContext );
public FetchProfilesAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (FetchProfile[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.FieldResult;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class FieldResultJpaAnnotation implements FieldResult {
@ -40,9 +36,9 @@ public class FieldResultJpaAnnotation implements FieldResult {
/**
* Used in creating annotation instances from Jandex variant
*/
public FieldResultJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.FIELD_RESULT, "name", modelContext );
this.column = extractJandexValue( annotation, JpaAnnotations.FIELD_RESULT, "column", modelContext );
public FieldResultJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.column = (String) attributeValues.get( "column" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Filter;
import org.hibernate.boot.jaxb.mapping.spi.JaxbFilterImpl;
@ -17,9 +18,6 @@ import org.hibernate.boot.models.xml.spi.XmlDocumentContext;
import org.hibernate.internal.util.StringHelper;
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" })
@ -52,16 +50,11 @@ public class FilterAnnotation implements Filter, FilterDetails {
/**
* Used in creating annotation instances from Jandex variant
*/
public FilterAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, HibernateAnnotations.FILTER, "name", modelContext );
this.condition = extractJandexValue( annotation, HibernateAnnotations.FILTER, "condition", modelContext );
this.deduceAliasInjectionPoints = extractJandexValue(
annotation,
HibernateAnnotations.FILTER,
"deduceAliasInjectionPoints",
modelContext
);
this.aliases = extractJandexValue( annotation, HibernateAnnotations.FILTER, "aliases", modelContext );
public FilterAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.condition = (String) attributeValues.get( "condition" );
this.deduceAliasInjectionPoints = (boolean) attributeValues.get( "deduceAliasInjectionPoints" );
this.aliases = (org.hibernate.annotations.SqlFragmentAlias[]) attributeValues.get( "aliases" );
}

View File

@ -7,14 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FilterDef;
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" })
@ -49,27 +47,12 @@ public class FilterDefAnnotation implements FilterDef {
/**
* Used in creating annotation instances from Jandex variant
*/
public FilterDefAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, HibernateAnnotations.FILTER_DEF, "name", modelContext );
this.defaultCondition = extractJandexValue(
annotation,
HibernateAnnotations.FILTER_DEF,
"defaultCondition",
modelContext
);
this.autoEnabled = extractJandexValue(
annotation,
HibernateAnnotations.FILTER_DEF,
"autoEnabled",
modelContext
);
this.applyToLoadByKey = extractJandexValue(
annotation,
HibernateAnnotations.FILTER_DEF,
"applyToLoadByKey",
modelContext
);
this.parameters = extractJandexValue( annotation, HibernateAnnotations.FILTER_DEF, "parameters", modelContext );
public FilterDefAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.defaultCondition = (String) attributeValues.get( "defaultCondition" );
this.autoEnabled = (boolean) attributeValues.get( "autoEnabled" );
this.applyToLoadByKey = (boolean) attributeValues.get( "applyToLoadByKey" );
this.parameters = (org.hibernate.annotations.ParamDef[]) attributeValues.get( "parameters" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FilterDef;
import org.hibernate.annotations.FilterDefs;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -40,8 +38,8 @@ public class FilterDefsAnnotation implements FilterDefs, RepeatableContainer<Fil
/**
* Used in creating annotation instances from Jandex variant
*/
public FilterDefsAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.FILTER_DEFS, "value", modelContext );
public FilterDefsAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (FilterDef[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FilterJoinTable;
import org.hibernate.boot.jaxb.mapping.spi.JaxbFilterImpl;
@ -16,10 +17,7 @@ import org.hibernate.boot.models.xml.spi.XmlDocumentContext;
import org.hibernate.internal.util.StringHelper;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.HibernateAnnotations.FILTER_JOIN_TABLE;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJdkValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@ -52,16 +50,11 @@ public class FilterJoinTableAnnotation implements FilterJoinTable, FilterDetails
/**
* Used in creating annotation instances from Jandex variant
*/
public FilterJoinTableAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, FILTER_JOIN_TABLE, "name", modelContext );
this.condition = extractJandexValue( annotation, FILTER_JOIN_TABLE, "condition", modelContext );
this.deduceAliasInjectionPoints = extractJandexValue(
annotation,
FILTER_JOIN_TABLE,
"deduceAliasInjectionPoints",
modelContext
);
this.aliases = extractJandexValue( annotation, FILTER_JOIN_TABLE, "aliases", modelContext );
public FilterJoinTableAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.condition = (String) attributeValues.get( "condition" );
this.deduceAliasInjectionPoints = (boolean) attributeValues.get( "deduceAliasInjectionPoints" );
this.aliases = (org.hibernate.annotations.SqlFragmentAlias[]) attributeValues.get( "aliases" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FilterJoinTable;
import org.hibernate.annotations.FilterJoinTables;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -40,8 +38,8 @@ public class FilterJoinTablesAnnotation implements FilterJoinTables, RepeatableC
/**
* Used in creating annotation instances from Jandex variant
*/
public FilterJoinTablesAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.FILTER_JOIN_TABLES, "value", modelContext );
public FilterJoinTablesAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (FilterJoinTable[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Filter;
import org.hibernate.annotations.Filters;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -40,8 +38,8 @@ public class FiltersAnnotation implements Filters, RepeatableContainer<Filter> {
/**
* Used in creating annotation instances from Jandex variant
*/
public FiltersAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.FILTERS, "value", modelContext );
public FiltersAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (Filter[]) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.ForeignKey;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class ForeignKeyJpaAnnotation implements ForeignKey {
@ -48,16 +44,11 @@ public class ForeignKeyJpaAnnotation implements ForeignKey {
/**
* Used in creating annotation instances from Jandex variant
*/
public ForeignKeyJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, JpaAnnotations.FOREIGN_KEY, "name", modelContext );
this.value = extractJandexValue( annotation, JpaAnnotations.FOREIGN_KEY, "value", modelContext );
this.foreignKeyDefinition = extractJandexValue(
annotation,
JpaAnnotations.FOREIGN_KEY,
"foreignKeyDefinition",
modelContext
);
this.options = extractJandexValue( annotation, JpaAnnotations.FOREIGN_KEY, "options", modelContext );
public ForeignKeyJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.value = (jakarta.persistence.ConstraintMode) attributeValues.get( "value" );
this.foreignKeyDefinition = (String) attributeValues.get( "foreignKeyDefinition" );
this.options = (String) attributeValues.get( "options" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Formula;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class FormulaAnnotation implements Formula {
@ -37,8 +33,8 @@ public class FormulaAnnotation implements Formula {
/**
* Used in creating annotation instances from Jandex variant
*/
public FormulaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.FORMULA, "value", modelContext );
public FormulaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.FractionalSeconds;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class FractionalSecondsAnnotation implements FractionalSeconds {
@ -37,8 +33,8 @@ public class FractionalSecondsAnnotation implements FractionalSeconds {
/**
* Used in creating annotation instances from Jandex variant
*/
public FractionalSecondsAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.FRACTIONAL_SECONDS, "value", modelContext );
public FractionalSecondsAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (int) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.Generated;
import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.generator.EventType;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class GeneratedAnnotation implements Generated {
@ -45,10 +41,10 @@ public class GeneratedAnnotation implements Generated {
/**
* Used in creating annotation instances from Jandex variant
*/
public GeneratedAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.event = extractJandexValue( annotation, HibernateAnnotations.GENERATED, "event", modelContext );
this.sql = extractJandexValue( annotation, HibernateAnnotations.GENERATED, "sql", modelContext );
this.writable = extractJandexValue( annotation, HibernateAnnotations.GENERATED, "writable", modelContext );
public GeneratedAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.event = (EventType[]) attributeValues.get( "event" );
this.sql = (String) attributeValues.get( "sql" );
this.writable = (boolean) attributeValues.get( "writable" );
}
@Override

View File

@ -7,15 +7,11 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.GeneratedColumn;
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;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class GeneratedColumnAnnotation implements GeneratedColumn {
@ -37,8 +33,8 @@ public class GeneratedColumnAnnotation implements GeneratedColumn {
/**
* Used in creating annotation instances from Jandex variant
*/
public GeneratedColumnAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.GENERATED_COLUMN, "value", modelContext );
public GeneratedColumnAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (String) attributeValues.get( "value" );
}
@Override

View File

@ -7,16 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.boot.models.JpaAnnotations;
import org.hibernate.models.spi.SourceModelBuildingContext;
import org.jboss.jandex.AnnotationInstance;
import jakarta.persistence.GeneratedValue;
import static org.hibernate.boot.models.internal.OrmAnnotationHelper.extractJandexValue;
@SuppressWarnings({ "ClassExplicitlyAnnotation", "unused" })
@jakarta.annotation.Generated("org.hibernate.orm.build.annotations.ClassGeneratorProcessor")
public class GeneratedValueJpaAnnotation implements GeneratedValue {
@ -42,9 +38,9 @@ public class GeneratedValueJpaAnnotation implements GeneratedValue {
/**
* Used in creating annotation instances from Jandex variant
*/
public GeneratedValueJpaAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.strategy = extractJandexValue( annotation, JpaAnnotations.GENERATED_VALUE, "strategy", modelContext );
this.generator = extractJandexValue( annotation, JpaAnnotations.GENERATED_VALUE, "generator", modelContext );
public GeneratedValueJpaAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.strategy = (jakarta.persistence.GenerationType) attributeValues.get( "strategy" );
this.generator = (String) attributeValues.get( "generator" );
}
@Override

View File

@ -7,14 +7,12 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.GenericGenerator;
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" })
@ -52,21 +50,11 @@ public class GenericGeneratorAnnotation implements GenericGenerator {
/**
* Used in creating annotation instances from Jandex variant
*/
public GenericGeneratorAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.name = extractJandexValue( annotation, HibernateAnnotations.GENERIC_GENERATOR, "name", modelContext );
this.type = extractJandexValue( annotation, HibernateAnnotations.GENERIC_GENERATOR, "type", modelContext );
this.strategy = extractJandexValue(
annotation,
HibernateAnnotations.GENERIC_GENERATOR,
"strategy",
modelContext
);
this.parameters = extractJandexValue(
annotation,
HibernateAnnotations.GENERIC_GENERATOR,
"parameters",
modelContext
);
public GenericGeneratorAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.name = (String) attributeValues.get( "name" );
this.type = (Class<? extends org.hibernate.generator.Generator>) attributeValues.get( "type" );
this.strategy = (String) attributeValues.get( "strategy" );
this.parameters = (org.hibernate.annotations.Parameter[]) attributeValues.get( "parameters" );
}
@Override

View File

@ -7,6 +7,7 @@
package org.hibernate.boot.models.annotations.internal;
import java.lang.annotation.Annotation;
import java.util.Map;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.GenericGenerators;
@ -14,9 +15,6 @@ import org.hibernate.boot.models.HibernateAnnotations;
import org.hibernate.boot.models.annotations.spi.RepeatableContainer;
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" })
@ -40,8 +38,8 @@ public class GenericGeneratorsAnnotation implements GenericGenerators, Repeatabl
/**
* Used in creating annotation instances from Jandex variant
*/
public GenericGeneratorsAnnotation(AnnotationInstance annotation, SourceModelBuildingContext modelContext) {
this.value = extractJandexValue( annotation, HibernateAnnotations.GENERIC_GENERATORS, "value", modelContext );
public GenericGeneratorsAnnotation(Map<String, Object> attributeValues, SourceModelBuildingContext modelContext) {
this.value = (GenericGenerator[]) attributeValues.get( "value" );
}
@Override

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