public class DurationConverter extends Object implements ValueConverter<Duration>
Duration
to an SQL expression.Constructor and Description |
---|
DurationConverter() |
Modifier and Type | Method and Description |
---|---|
ColumnExpression |
getExpression(Duration value,
GeneratorContext context)
Builds the expression for writing the given value into an SQL clause.
|
ColumnExpression |
getExpression(String defaultValue,
GeneratorContext context)
Builds the expression for writing the default value into an SQL clause.
|
public ColumnExpression getExpression(Duration value, GeneratorContext context)
ValueConverter
getExpression
in interface ValueConverter<Duration>
value
- the current valuecontext
- the current context (contains the database dialect).public ColumnExpression getExpression(String defaultValue, GeneratorContext context)
ValueConverter
getExpression
in interface ValueConverter<Duration>
defaultValue
- the default value, as given in an DefaultValue
expressioncontext
- the current context (contains the database dialect).Copyright © 2022 fastnate.org. All rights reserved.