java.lang.Object
com.pervasive.datarush.schema.TextConversionDefaults
Describes behaviors used during conversion of token
values to and from text. These settings are typically
used to describe default behavior for a schema. Text
types are not required to honor any of these settings.
The default behavior for text type processing is:
- Null values are indicated by an empty string ("").
- String-valued types do not perform whitespace trimming and tread the empty string as a null value.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default text value used to indicate a null value, the empty string (""). -
Constructor Summary
ConstructorsConstructorDescriptionCreates a descriptor specifying default behavior.Creates a descriptor having the specified string processing behavior.TextConversionDefaults(String nullIndicator) Creates a descriptor having the specified null indicator.TextConversionDefaults(String nullIndicator, TextTypes.StringConversion behavior) Creates a descriptor having the specified behavior. -
Method Summary
Modifier and TypeMethodDescriptionapplyDefaultNullMarker(String value) Merges the given null indicator with the default.Merges the given string conversion behavior with the default.booleanGets the text value used to represent null values.Gets the behavior for processing string-valued types.inthashCode()voidsetNullIndicator(String value) Sets the text value used to represent null values.voidsetStringHandling(TextTypes.StringConversion behavior) Sets the behavior for processing string-valued types.
-
Field Details
-
DEFAULT_NULL_MARKER
The default text value used to indicate a null value, the empty string ("").- See Also:
-
-
Constructor Details
-
TextConversionDefaults
public TextConversionDefaults()Creates a descriptor specifying default behavior. -
TextConversionDefaults
Creates a descriptor having the specified null indicator. All other behavior is default.- Parameters:
nullIndicator- the string used to represent a null value
-
TextConversionDefaults
Creates a descriptor having the specified string processing behavior. All other behavior is default.- Parameters:
behavior- indicates how string-valued type should be converted from text
-
TextConversionDefaults
Creates a descriptor having the specified behavior.- Parameters:
nullIndicator- the string used to represent a null valuebehavior- indicates how string-valued type should be converted from text
-
-
Method Details
-
getNullIndicator
Gets the text value used to represent null values.- Returns:
- the string indicating a null value
-
applyDefaultNullMarker
Merges the given null indicator with the default.- Parameters:
value- the input null indicator- Returns:
valueifvalue != null, otherwise the null indicator value in the defaults
-
setNullIndicator
Sets the text value used to represent null values.- Parameters:
value- the string used to indicate a null value
-
getStringHandling
Gets the behavior for processing string-valued types.- Returns:
- how string-valued types should be converted from text
-
setStringHandling
Sets the behavior for processing string-valued types.- Parameters:
behavior- indicates how string-valued types should be converted from text
-
applyDefaultStringHandling
Merges the given string conversion behavior with the default.- Parameters:
value- the input string conversion behavior- Returns:
valueifvalue != null, otherwise the string conversion behavior in the defaults
-
equals
-
hashCode
public int hashCode()
-