public class StringConverter extends AbstractValueConverter<String>
EntityClass
.Constructor and Description |
---|
StringConverter()
Creates a new instance of a StringConverter that accepts strings of arbitrary length.
|
StringConverter(AttributeAccessor attribute,
boolean mapKey)
Creates a new instance of a StringConverter for the given attribute.
|
Modifier and Type | Method and Description |
---|---|
String |
getExpression(String value,
GeneratorContext context)
Builds the expression for writing the default value into an SQL clause.
|
public StringConverter()
public StringConverter(AttributeAccessor attribute, boolean mapKey)
attribute
- the attribute to convertmapKey
- indicates that the converter is used for the key of a map propertypublic String getExpression(String value, GeneratorContext context)
ValueConverter
getExpression
in interface ValueConverter<String>
getExpression
in class AbstractValueConverter<String>
value
- the default value, as given in an DefaultValue
expressioncontext
- the current context (contains the database dialect).Copyright © 2016 fastnate.org. All rights reserved.