Class UuidIdentifierConverter
java.lang.Object
de.vinado.spring.identifier.convert.UuidIdentifierConverter
- All Implemented Interfaces:
ConditionalConverter
,ConditionalGenericConverter
,GenericConverter
@ReadingConverter
public class UuidIdentifierConverter
extends Object
implements ConditionalGenericConverter
- Author:
- Vincent Nadoll
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.core.convert.converter.GenericConverter
GenericConverter.ConvertiblePair
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final TypeDescriptor
protected static final TypeDescriptor
protected static final TypeDescriptor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionconvert
(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) protected UuidIdentifier
convertNonNull
(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) boolean
matches
(TypeDescriptor sourceType, TypeDescriptor targetType)
-
Field Details
-
STRING_TYPE
-
UUID_TYPE
-
IDENTIFIER_TYPE
-
-
Constructor Details
-
UuidIdentifierConverter
public UuidIdentifierConverter()
-
-
Method Details
-
matches
- Specified by:
matches
in interfaceConditionalConverter
-
getConvertibleTypes
- Specified by:
getConvertibleTypes
in interfaceGenericConverter
-
convert
@Nullable public Object convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) - Specified by:
convert
in interfaceGenericConverter
-
convertNonNull
protected UuidIdentifier convertNonNull(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) throws ConversionFailedException - Throws:
ConversionFailedException
-