Class CharConverter

java.lang.Object
org.fastnate.generator.converter.CharConverter
All Implemented Interfaces:
ValueConverter<Character>

public class CharConverter extends Object implements ValueConverter<Character>
Describes a char property of an EntityClass.
Author:
Tobias Liefke
  • Constructor Details

    • CharConverter

      public CharConverter()
  • Method Details

    • getExpression

      public ColumnExpression getExpression(Character value, GeneratorContext context)
      Description copied from interface: ValueConverter
      Builds the expression for writing the given value into an SQL clause.
      Specified by:
      getExpression in interface ValueConverter<Character>
      Parameters:
      value - the current value
      context - the current context (contains the database dialect).
      Returns:
      the expression (that is including surrounding ' for string literals)
    • getExpression

      public ColumnExpression getExpression(String defaultValue, GeneratorContext context)
      Description copied from interface: ValueConverter
      Builds the expression for writing the default value into an SQL clause.
      Specified by:
      getExpression in interface ValueConverter<Character>
      Parameters:
      defaultValue - the default value, as given in an DefaultValue expression
      context - the current context (contains the database dialect).
      Returns:
      the expression (that is including surrounding ' for string literals)