Package org.fastnate.generator.converter
Class CustomValueConverter<T,C>
java.lang.Object
org.fastnate.generator.converter.CustomValueConverter<T,C>
- Type Parameters:
T- the type of the attributeC- the type of the database column
- All Implemented Interfaces:
ValueConverter<T>
A value converter that uses an
AttributeConverter.- Author:
- Tobias Liefke
-
Constructor Summary
ConstructorsConstructorDescriptionCustomValueConverter(jakarta.persistence.AttributeConverter<T, C> customConverter, ValueConverter<C> valueConverter) -
Method Summary
Modifier and TypeMethodDescriptiongetExpression(T value, GeneratorContext context) Builds the expression for writing the given value into an SQL clause.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.fastnate.generator.converter.ValueConverter
getExpression
-
Constructor Details
-
CustomValueConverter
public CustomValueConverter(jakarta.persistence.AttributeConverter<T, C> customConverter, ValueConverter<C> valueConverter)
-
-
Method Details
-
getExpression
Description copied from interface:ValueConverterBuilds the expression for writing the given value into an SQL clause.- Specified by:
getExpressionin interfaceValueConverter<T>- Parameters:
value- the current valuecontext- the current context (contains the database dialect).- Returns:
- the expression (that is including surrounding ' for string literals)
-