Class EnumArrayType

All Implemented Interfaces:
jakarta.persistence.metamodel.BasicType<Enum[]>, jakarta.persistence.metamodel.Type<Enum[]>, org.hibernate.metamodel.mapping.BasicValuedMapping, org.hibernate.metamodel.mapping.Bindable, org.hibernate.metamodel.mapping.JdbcMappingContainer, org.hibernate.metamodel.mapping.MappingModelExpressible, org.hibernate.metamodel.mapping.SqlExpressible, org.hibernate.metamodel.mapping.ValueMapping, org.hibernate.metamodel.model.domain.BasicDomainType<Enum[]>, org.hibernate.metamodel.model.domain.DomainType<Enum[]>, org.hibernate.metamodel.model.domain.ReturnableType<Enum[]>, org.hibernate.metamodel.model.domain.SimpleDomainType<Enum[]>, org.hibernate.query.sqm.SqmBindableType<Enum[]>, org.hibernate.query.sqm.SqmExpressible<Enum[]>, org.hibernate.query.sqm.tree.domain.SqmDomainType<Enum[]>, org.hibernate.type.BindableType<Enum[]>, org.hibernate.type.descriptor.java.JavaTypedExpressible, org.hibernate.type.OutputableType<Enum[]>, org.hibernate.usertype.DynamicParameterizedType, org.hibernate.usertype.ParameterizedType, org.hibernate.usertype.UserType<Enum[]>

public class EnumArrayType extends AbstractArrayType<Enum[]>
Maps an Enum[] array on a database ARRAY type. Multidimensional arrays are supported as well, as explained in this article.

The SQL_ARRAY_TYPE parameter is used to define the enum type name in the database.

For more details about how to use it, check out this article on vladmihalcea.com.

Author:
Nazir El-Kayssi, Vlad Mihalcea
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.hibernate.metamodel.mapping.Bindable

    org.hibernate.metamodel.mapping.Bindable.JdbcValuesBiConsumer<X extends Object,Y extends Object>, org.hibernate.metamodel.mapping.Bindable.JdbcValuesConsumer

    Nested classes/interfaces inherited from interface org.hibernate.usertype.DynamicParameterizedType

    org.hibernate.usertype.DynamicParameterizedType.ParameterType

    Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Type

    jakarta.persistence.metamodel.Type.PersistenceType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final EnumArrayType
     

    Fields inherited from class io.hypersistence.utils.hibernate.type.array.internal.AbstractArrayType

    SQL_ARRAY_TYPE

    Fields inherited from interface org.hibernate.usertype.DynamicParameterizedType

    ACCESS_TYPE, ENTITY, IS_DYNAMIC, IS_PRIMARY_KEY, PARAMETER_TYPE, PROPERTY, RETURNED_CLASS, XPROPERTY
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
    EnumArrayType(Class arrayClass, String sqlArrayType)
     
    EnumArrayType(org.hibernate.type.spi.TypeBootstrapContext typeBootstrapContext)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
     

    Methods inherited from class io.hypersistence.utils.hibernate.type.MutableDynamicParameterizedType

    canDoExtraction, extract, extract, getJdbcType, getPersistenceType, getSqmType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.hibernate.metamodel.model.domain.BasicDomainType

    getJavaType

    Methods inherited from interface org.hibernate.metamodel.mapping.BasicValuedMapping

    addToCacheKey, getJdbcMapping, getJdbcTypeCount, getSingleJdbcMapping

    Methods inherited from interface org.hibernate.metamodel.mapping.Bindable

    forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachDisassembledJdbcValue, forEachJdbcType, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue, forEachJdbcValue

    Methods inherited from interface org.hibernate.metamodel.model.domain.DomainType

    getExpressibleJavaType

    Methods inherited from interface org.hibernate.query.sqm.SqmBindableType

    resolveExpressible

    Methods inherited from interface org.hibernate.query.sqm.tree.domain.SqmDomainType

    getTupleLength, getTypeName

    Methods inherited from interface org.hibernate.query.sqm.SqmExpressible

    getExpressibleJavaType, getRelationalJavaType

    Methods inherited from interface jakarta.persistence.metamodel.Type

    getJavaType

    Methods inherited from interface org.hibernate.usertype.UserType

    getDefaultSqlLength, getDefaultSqlLength, getDefaultSqlPrecision, getDefaultSqlPrecision, getDefaultSqlScale, getDefaultSqlScale, getValueConverter, isComparable, nullSafeGet, nullSafeSet

    Methods inherited from interface org.hibernate.metamodel.mapping.ValueMapping

    treatAs