Class EnumStringType
java.lang.Object
org.hibernate.type.EnumType
com.atlassian.bamboo.hibernate.type.EnumStringType
- All Implemented Interfaces:
Serializable
,org.hibernate.type.spi.TypeConfigurationAware
,org.hibernate.usertype.DynamicParameterizedType
,org.hibernate.usertype.EnhancedUserType
,org.hibernate.usertype.LoggableUserType
,org.hibernate.usertype.ParameterizedType
,org.hibernate.usertype.UserType
Deprecated.
since 6.5 use @Enumerated(EnumType.STRING) instead
Specialization of Hibernate's EnumType that always stores value in string format thus allowing us to avoid
cumbersome part of configuration.
So instead of
<property name="propertyName" column="COLUMN_NAME">
<type name="org.hibernate.type.EnumType">
<param name="enumClass">com.atlassian.bamboo.enum.class.name</param>
<param name="type">12</param> <!-- Types.VARCHAR == 12 -->
</type>
</property>
we now have
<property name="propertyName" column="COLUMN_NAME">
<type name="com.atlassian.bamboo.hibernate.type.EnumStringType">
<param name="enumClass">com.atlassian.bamboo.enum.class.name</param>
</type>
</property>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.usertype.DynamicParameterizedType
org.hibernate.usertype.DynamicParameterizedType.ParameterType
-
Field Summary
Fields inherited from class org.hibernate.type.EnumType
ENUM, NAMED, 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
-
Method Summary
Modifier and TypeMethodDescriptionfromXMLString
(String xmlValue) Deprecated.OriginalEnumType.fromXMLString(String)
tries to do numeric conversion first and then only in case of failure it does what we need.void
setParameterValues
(Properties parameters) Deprecated.Methods inherited from class org.hibernate.type.EnumType
assemble, deepCopy, disassemble, equals, getTypeConfiguration, hashCode, isMutable, isOrdinal, nullSafeGet, nullSafeSet, objectToSQLString, replace, returnedClass, setTypeConfiguration, sqlTypes, toLoggableString, toXMLString
-
Constructor Details
-
EnumStringType
public EnumStringType()Deprecated.
-
-
Method Details
-
setParameterValues
Deprecated.- Specified by:
setParameterValues
in interfaceorg.hibernate.usertype.ParameterizedType
- Overrides:
setParameterValues
in classorg.hibernate.type.EnumType
-
fromXMLString
Deprecated.OriginalEnumType.fromXMLString(String)
tries to do numeric conversion first and then only in case of failure it does what we need.- Specified by:
fromXMLString
in interfaceorg.hibernate.usertype.EnhancedUserType
- Overrides:
fromXMLString
in classorg.hibernate.type.EnumType
-