Class EnumArrayType

All Implemented Interfaces:
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.query.BindableType<Enum[]>, org.hibernate.query.sqm.SqmExpressible<Enum[]>, org.hibernate.type.descriptor.java.JavaTypedExpressible, 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