- java.lang.Object
-
- java.lang.Enum<TextTypes.StringConversion>
-
- com.pervasive.datarush.schema.TextTypes.StringConversion
-
- All Implemented Interfaces:
Serializable
,Comparable<TextTypes.StringConversion>
- Enclosing class:
- TextTypes
public static enum TextTypes.StringConversion extends Enum<TextTypes.StringConversion>
Enumerates the possible conversions for string-valued text types.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description NULLABLE_RAW
Leading and trailing whitespace is preserved and the empty string is parsed as a null value.NULLABLE_TRIMMED
Leading and trailing whitespace is removed and the empty string is parsed as a null value.RAW
Leading and trailing whitespace is preserved.TRIMMED
Leading and trailing whitespace is removed.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TextTypes.StringConversion
getConversion(boolean trimWhitespace, boolean nullable)
Gets the conversion with the specified properties.boolean
isNullable()
Indicates whether the empty string is converted to a null value or preserved as the empty string.boolean
isTrimmed()
Indicates whether the conversion trims leading and trailing whitespace.static TextTypes.StringConversion
valueOf(String name)
Returns the enum constant of this type with the specified name.static TextTypes.StringConversion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RAW
public static final TextTypes.StringConversion RAW
Leading and trailing whitespace is preserved.
-
NULLABLE_RAW
public static final TextTypes.StringConversion NULLABLE_RAW
Leading and trailing whitespace is preserved and the empty string is parsed as a null value.
-
TRIMMED
public static final TextTypes.StringConversion TRIMMED
Leading and trailing whitespace is removed.
-
NULLABLE_TRIMMED
public static final TextTypes.StringConversion NULLABLE_TRIMMED
Leading and trailing whitespace is removed and the empty string is parsed as a null value.
-
-
Method Detail
-
values
public static TextTypes.StringConversion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TextTypes.StringConversion c : TextTypes.StringConversion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TextTypes.StringConversion valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isTrimmed
public boolean isTrimmed()
Indicates whether the conversion trims leading and trailing whitespace.- Returns:
true
if the conversion will trim whitespace, otherwisefalse
.
-
isNullable
public boolean isNullable()
Indicates whether the empty string is converted to a null value or preserved as the empty string.- Returns:
true
if the conversion translates the empty string, otherwisefalse
.
-
getConversion
public static TextTypes.StringConversion getConversion(boolean trimWhitespace, boolean nullable)
Gets the conversion with the specified properties.- Parameters:
trimWhitespace
- whether the conversion should trim whitespacenullable
- whether the conversion translates the empty string to null- Returns:
- the appropriate conversion
-
-