public class StringConverter extends Object implements ValueConverter<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.
|
StringConverter(javax.persistence.Column column,
boolean nullable)
Creates a new instance of a StringConverter for the given column definition.
|
| Modifier and Type | Method and Description |
|---|---|
ColumnExpression |
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 StringConverter(javax.persistence.Column column,
boolean nullable)
column - contains the optional definition, the converter uses the defaults if the column is nullnullable - indicates that the column may be null according to other settings (may be overridden by the
column definition)public ColumnExpression getExpression(String value, GeneratorContext context)
ValueConvertergetExpression in interface ValueConverter<String>value - the default value, as given in an DefaultValue expressioncontext - the current context (contains the database dialect).Copyright © 2020 fastnate.org. All rights reserved.