Interface ArrayColumns
- All Known Subinterfaces:
JdbcArrayColumns
- All Known Implementing Classes:
ArrayColumns.Unsupported
,JdbcArrayColumns.DefaultSupport
,JdbcArrayColumns.Unsupported
,ObjectArrayColumns
public interface ArrayColumns
Interface declaring methods that express how a dialect supports array-typed columns.
- Since:
- 1.1
- Author:
- Mark Paluch
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
DefaultArrayColumns
implementation for dialects that do not support array-typed columns. -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
getArrayType
(Class<?> userType) Translate theuser type
of an array into the dialect-specific type.boolean
Returns true if the dialect supports array-typed columns.static Class<?>
unwrapComponentType
(Class<?> clazz) Unwrap the nestedClass.getComponentType()
from a givenClass
.
-
Method Details
-
isSupported
boolean isSupported()Returns true if the dialect supports array-typed columns.- Returns:
- true if the dialect supports array-typed columns.
-
getArrayType
Translate theuser type
of an array into the dialect-specific type. This method considers only the component type.- Parameters:
userType
- component type of the array.- Returns:
- the dialect-supported array type.
- Throws:
UnsupportedOperationException
- if array typed columns are not supported.IllegalArgumentException
- if theuserType
is not a supported array type.
-
unwrapComponentType
Unwrap the nestedClass.getComponentType()
from a givenClass
.- Parameters:
clazz
- the type to inspect.- Returns:
- the unwrapped component type.
- Since:
- 3.0
-