Package org.fastnate.generator.converter
Class CalendarConverter
java.lang.Object
org.fastnate.generator.converter.AbstractDateConverter<Calendar>
org.fastnate.generator.converter.CalendarConverter
- All Implemented Interfaces:
ValueConverter<Calendar>
Converts a calendar property of an
EntityClass to SQL.- Author:
- Andreas Penski
-
Constructor Summary
ConstructorsConstructorDescriptionCalendarConverter(jakarta.persistence.TemporalType type) Creates a new instance ofCalendarConverter.CalendarConverter(AttributeAccessor attribute, boolean mapKey) Creates a new instance ofCalendarConverter. -
Method Summary
Modifier and TypeMethodDescriptiongetExpression(Calendar value, GeneratorContext context) Builds the expression for writing the given value into an SQL clause.Methods inherited from class org.fastnate.generator.converter.AbstractDateConverter
getExpression, getExpression
-
Constructor Details
-
CalendarConverter
Creates a new instance ofCalendarConverter.- Parameters:
attribute- the inspected attributemapKey- indicates that the converter is used for the key of a map property
-
CalendarConverter
public CalendarConverter(jakarta.persistence.TemporalType type) Creates a new instance ofCalendarConverter.- Parameters:
type- the temporal type of the property
-
-
Method Details
-
getExpression
Description copied from interface:ValueConverterBuilds the expression for writing the given value into an SQL clause.- Parameters:
value- the current valuecontext- the current context (contains the database dialect).- Returns:
- the expression (that is including surrounding ' for string literals)
-