public class ValueStringFixed extends ValueString
Value.ValueBlob, Value.ValueClob
Modifier and Type | Field and Description |
---|---|
static int |
PRECISION_DO_NOT_TRIM
Special value for the precision in
get(String, int, Mode) to indicate that the value
should not be trimmed. |
static int |
PRECISION_TRIM
Special value for the precision in
get(String, int, Mode) to indicate
that the default behaviour should of trimming the value should apply. |
value
ARRAY, BLOB, BOOLEAN, BYTE, BYTES, CLOB, DATE, DECIMAL, DOUBLE, ENUM, FLOAT, GEOMETRY, INT, JAVA_OBJECT, LONG, NULL, RESULT_SET, SHORT, STRING, STRING_FIXED, STRING_IGNORECASE, TIME, TIMESTAMP, TIMESTAMP_TZ, TYPE_COUNT, UNKNOWN, UUID
Modifier | Constructor and Description |
---|---|
protected |
ValueStringFixed(String value) |
Modifier and Type | Method and Description |
---|---|
static ValueStringFixed |
get(String s)
Get or create a fixed length string value for the given string.
|
static ValueStringFixed |
get(String s,
int precision,
Mode mode)
Get or create a fixed length string value for the given string.
|
protected ValueString |
getNew(String s)
Create a new String value of the current class.
|
int |
getType()
Get the value type.
|
compareSecure, convertPrecision, equals, get, getDisplaySize, getMemory, getObject, getPrecision, getSQL, getString, hashCode, set
add, checkPrecision, clearCache, compareTo, compareTypeSafe, convertScale, convertTo, convertTo, convertTo, convertToEnum, copy, copyToResult, copyToTemp, divide, getBigDecimal, getBoolean, getByte, getBytes, getBytesNoCopy, getDataHandler, getDate, getDouble, getFloat, getHigherOrder, getInputStream, getInputStream, getInt, getLong, getReader, getReader, getResultSet, getScale, getShort, getSignum, getSmall, getTableId, getTime, getTimestamp, getTraceSQL, isLinkedToTable, modulus, multiply, negate, remove, subtract, throwUnsupportedExceptionForType, toString
public static final int PRECISION_DO_NOT_TRIM
get(String, int, Mode)
to indicate that the value
should not be trimmed.public static final int PRECISION_TRIM
get(String, int, Mode)
to indicate
that the default behaviour should of trimming the value should apply.protected ValueStringFixed(String value)
public int getType()
Value
getType
in class ValueString
public static ValueStringFixed get(String s)
s
- the stringpublic static ValueStringFixed get(String s, int precision, Mode mode)
This method will use a Mode
-specific conversion when mode
is not
null
.
Otherwise it will use the default H2 behaviour of trimming the given string if
precision
is not PRECISION_DO_NOT_TRIM
.
s
- the stringprecision
- if the Mode.padFixedLengthStrings
indicates that strings should
be padded, this defines the overall length of the (potentially padded) string.
If the special constant PRECISION_DO_NOT_TRIM
is used the value will
not be trimmed.mode
- the database modeprotected ValueString getNew(String s)
ValueString
getNew
in class ValueString
s
- the stringCopyright © 2020 JBoss by Red Hat. All rights reserved.