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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintShould primarily be used for ordering instead of equality as some implementations are case-insensitive.booleanvoidinit(TypeHandler<T> base, Type<T> type) protected booleanprotected booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.tocco.nice2.types.spi.TypeHandler
getGenerationType
-
Field Details
-
baseHandler
-
type
-
-
Constructor Details
-
TypeHandlerWrapper
public TypeHandlerWrapper()
-
-
Method Details
-
init
- Specified by:
initin interfaceTypeHandler<T>
-
shouldBeUnique
public boolean shouldBeUnique()- Specified by:
shouldBeUniquein interfaceTypeHandler<T>- See Also:
-
asString
- Specified by:
asStringin interfaceTypeHandler<T>
-
asObject
- Specified by:
asObjectin interfaceTypeHandler<T>- Throws:
StringConversionException
-
isolate
- Specified by:
isolatein interfaceTypeHandler<T>
-
validate
- Specified by:
validatein 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:
isNumericin interfaceTypeHandler<T>- See Also:
-
isChronological
public boolean isChronological()- Specified by:
isChronologicalin interfaceTypeHandler<T>- See Also:
-
isBoolean
public boolean isBoolean()- Specified by:
isBooleanin interfaceTypeHandler<T>- See Also:
-
getEmptyValue
- Specified by:
getEmptyValuein interfaceTypeHandler<T>- See Also:
-
compare
Description copied from interface:TypeHandlerShould primarily be used for ordering instead of equality as some implementations are case-insensitive.- Specified by:
comparein interfaceTypeHandler<T>
-
isEqual
- Specified by:
isEqualin interfaceTypeHandler<T>- Returns:
- true if both values are equal
-
matches
- Specified by:
matchesin interfaceTypeHandler<T>
-
contains
- Specified by:
containsin interfaceTypeHandler<T>
-