Package ch.tocco.nice2.types.spi
Class TypeHandlerWrapper<T>
java.lang.Object
ch.tocco.nice2.types.spi.TypeHandlerWrapper<T>
- All Implemented Interfaces:
TypeHandler<T>
- Direct Known Subclasses:
AutoTimestampTypeHandler
,AutoUsernameTypeHandler
,DurationTypeHandler
,SerialTypeHandler
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Should primarily be used for ordering instead of equality as some implementations are case-insensitive.boolean
void
init
(TypeHandler<T> base, Type<T> type) protected boolean
protected boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.types.spi.TypeHandler
getGenerationType
-
Field Details
-
baseHandler
-
type
-
-
Constructor Details
-
TypeHandlerWrapper
public TypeHandlerWrapper()
-
-
Method Details
-
init
- Specified by:
init
in interfaceTypeHandler<T>
-
shouldBeUnique
public boolean shouldBeUnique()- Specified by:
shouldBeUnique
in interfaceTypeHandler<T>
- See Also:
-
asString
- Specified by:
asString
in interfaceTypeHandler<T>
-
asObject
- Specified by:
asObject
in interfaceTypeHandler<T>
- Throws:
StringConversionException
-
isolate
- Specified by:
isolate
in interfaceTypeHandler<T>
-
validate
- Specified by:
validate
in interfaceTypeHandler<T>
- Throws:
ValidationException
- See Also:
-
invalid
- Throws:
ValidationException
-
invalid
protected boolean invalid(T value, String message, Throwable cause, boolean exception) throws ValidationException - Throws:
ValidationException
-
isNumeric
public boolean isNumeric()- Specified by:
isNumeric
in interfaceTypeHandler<T>
- See Also:
-
isChronological
public boolean isChronological()- Specified by:
isChronological
in interfaceTypeHandler<T>
- See Also:
-
isBoolean
public boolean isBoolean()- Specified by:
isBoolean
in interfaceTypeHandler<T>
- See Also:
-
getEmptyValue
- Specified by:
getEmptyValue
in interfaceTypeHandler<T>
- See Also:
-
compare
Description copied from interface:TypeHandler
Should primarily be used for ordering instead of equality as some implementations are case-insensitive.- Specified by:
compare
in interfaceTypeHandler<T>
-
isEqual
- Specified by:
isEqual
in interfaceTypeHandler<T>
- Returns:
- true if both values are equal
-
matches
- Specified by:
matches
in interfaceTypeHandler<T>
-
contains
- Specified by:
contains
in interfaceTypeHandler<T>
-