Class InstantTypeConverter
java.lang.Object
com.blazebit.persistence.parser.util.InstantTypeConverter
- All Implemented Interfaces:
LiteralFunctionTypeConverter<Instant>,TypeConverter<Instant>,Serializable
- Since:
- 1.6.0
- Author:
- Christian Beikov
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidappendTo(Instant value, StringBuilder stringBuilder) Appends the JPQL literal representation of the given value to the given string builder.Converts the given value to the type for which the converter was registered.Returns the name of the literal function to use.Returns the JPQL literal representation of the given value as string.protected static IllegalArgumentExceptionunknownConversion(Object value, Class<?> targetType)
-
Field Details
-
INSTANCE
-
-
Method Details
-
convert
Description copied from interface:TypeConverterConverts the given value to the type for which the converter was registered.- Parameters:
value- The value to convert.- Returns:
- The converted value
-
toString
Description copied from interface:TypeConverterReturns the JPQL literal representation of the given value as string.- Specified by:
toStringin interfaceTypeConverter<Instant>- Parameters:
value- The value- Returns:
- The JPQL literal
-
appendTo
Description copied from interface:TypeConverterAppends the JPQL literal representation of the given value to the given string builder.- Parameters:
value- The valuestringBuilder- The string builder
-
getLiteralFunctionName
Description copied from interface:LiteralFunctionTypeConverterReturns the name of the literal function to use.- Specified by:
getLiteralFunctionNamein interfaceLiteralFunctionTypeConverter<T>- Returns:
- The nane of the literal function
-
unknownConversion
-