Package org.fastnate.generator.converter
Class BooleanConverter
java.lang.Object
org.fastnate.generator.converter.BooleanConverter
- All Implemented Interfaces:
ValueConverter<Boolean>
Converts a boolean to a SQL expression.
- Author:
- Tobias Liefke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetExpression(Boolean value, GeneratorContext context) Builds the expression for writing the given value into an SQL clause.getExpression(String defaultValue, GeneratorContext context) Builds the expression for writing the default value into an SQL clause.
-
Constructor Details
-
BooleanConverter
public BooleanConverter()
-
-
Method Details
-
getExpression
Description copied from interface:ValueConverterBuilds the expression for writing the given value into an SQL clause.- Specified by:
getExpressionin interfaceValueConverter<Boolean>- Parameters:
value- the current valuecontext- the current context (contains the database dialect).- Returns:
- the expression (that is including surrounding ' for string literals)
-
getExpression
Description copied from interface:ValueConverterBuilds the expression for writing the default value into an SQL clause.- Specified by:
getExpressionin interfaceValueConverter<Boolean>- Parameters:
defaultValue- the default value, as given in anDefaultValueexpressioncontext- the current context (contains the database dialect).- Returns:
- the expression (that is including surrounding ' for string literals)
-