Package org.hibernate.annotations
Annotation Interface JdbcTypeRegistration
@Target({PACKAGE,TYPE})
@Inherited
@Retention(RUNTIME)
@Repeatable(JdbcTypeRegistrations.class)
public @interface JdbcTypeRegistration
Registers a
JdbcType
as the default JDBC type descriptor for a certain
type code. The type code is determined by:
registrationCode()
, if specified, orJdbcType.getJdbcTypeCode()
.
Registrations applied to a package are processed before Hibernate begins to process any attributes, etc.
Registrations applied to a class are only applied once Hibernate begins to process
that class; it will also affect all future processing. However, it will not change
previous resolutions to use this newly registered one. Due to this nondeterminism,
it is recommended to only apply registrations to packages or to use a
TypeContributor
.
- Since:
- 6.0
- See Also:
- Implementation Note:
JdbcType
registrations are maintained by theJdbcTypeRegistry
.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionint
The type-code under which to register this descriptor.
-
Element Details
-
value
The descriptor to register
-
-
-
registrationCode
int registrationCodeThe type-code under which to register this descriptor. Can either add a new descriptor or override an existing one. By default we will useJdbcType.getDefaultSqlTypeCode()
- Default:
- -2147483648
-