Package io.ebeaninternal.server.type
Class ScalarTypeLocale
- java.lang.Object
-
- io.ebeaninternal.server.type.ScalarTypeBase<T>
-
- io.ebeaninternal.server.type.ScalarTypeBaseVarchar<Locale>
-
- io.ebeaninternal.server.type.ScalarTypeLocale
-
- All Implemented Interfaces:
StringFormatter
,StringParser
,ScalarDataReader<Locale>
,ScalarType<Locale>
public class ScalarTypeLocale extends ScalarTypeBaseVarchar<Locale>
ScalarType for java.util.Currency which converts to and from a VARCHAR database column.
-
-
Constructor Summary
Constructors Constructor Description ScalarTypeLocale()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locale
convertFromDbString(String dbValue)
Convert from DB string value to the target type.String
convertToDbString(Locale beanValue)
Convert to DB string from the target type.String
formatValue(Locale t)
Format the target type to a string.int
getLength()
Just return 0.Locale
parse(String value)
Parse from a formatted string value.-
Methods inherited from class io.ebeaninternal.server.type.ScalarTypeBaseVarchar
bind, convertFromMillis, format, getDocType, isDateTimeCapable, jsonRead, jsonWrite, read, readData, toBeanType, toJdbcType, writeData
-
Methods inherited from class io.ebeaninternal.server.type.ScalarTypeBase
asVersion, getJdbcType, getType, isBinaryType, isDirty, isJdbcNative, isMutable, loadIgnore
-
-
-
-
Constructor Detail
-
ScalarTypeLocale
public ScalarTypeLocale()
-
-
Method Detail
-
getLength
public int getLength()
Description copied from class:ScalarTypeBase
Just return 0.- Specified by:
getLength
in interfaceScalarType<Locale>
- Overrides:
getLength
in classScalarTypeBase<Locale>
-
convertFromDbString
public Locale convertFromDbString(String dbValue)
Description copied from class:ScalarTypeBaseVarchar
Convert from DB string value to the target type.- Specified by:
convertFromDbString
in classScalarTypeBaseVarchar<Locale>
-
convertToDbString
public String convertToDbString(Locale beanValue)
Description copied from class:ScalarTypeBaseVarchar
Convert to DB string from the target type.- Specified by:
convertToDbString
in classScalarTypeBaseVarchar<Locale>
-
formatValue
public String formatValue(Locale t)
Description copied from class:ScalarTypeBaseVarchar
Format the target type to a string.- Specified by:
formatValue
in interfaceScalarType<Locale>
- Specified by:
formatValue
in classScalarTypeBaseVarchar<Locale>
-
parse
public Locale parse(String value)
Description copied from class:ScalarTypeBaseVarchar
Parse from a formatted string value.- Specified by:
parse
in interfaceScalarType<Locale>
- Specified by:
parse
in interfaceStringParser
- Specified by:
parse
in classScalarTypeBaseVarchar<Locale>
-
-