Package io.deephaven.importers.csv
Class BaseCsvFieldWriter
java.lang.Object
io.deephaven.importers.ImportFieldWriter
io.deephaven.importers.BaseImportFieldWriter
io.deephaven.importers.csv.BaseCsvFieldWriter
- Direct Known Subclasses:
CsvFieldWriter
Encapsulates the functionality for custom setters that allow processing of
CustomSetterValue-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCreates BaseFieldWriter for passed ImporterColumnDefinitions -
Field Summary
FieldsFields inherited from class io.deephaven.importers.ImportFieldWriter
constantColumnValue, log -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseCsvFieldWriter(Logger log, String dbColumnName, String arrayDelimiter) -
Method Summary
Modifier and TypeMethodDescriptionThe getter to retrieve the constantColumnValueprotected CustomSetterValue<?>Returns a newCustomSetterValueinstance that is a copy of the setter present in the FieldWriter instance.The getter of the setter value.voidinitialize(CustomSetterValue<?> setterValue, Map<String, String> importProperties) initializes given Setter and Import PropertiesvoidprocessField(@NotNull Map<String, Object> columnNameToValueMap) The method is invoked by the CustomSetter Column Parser by incorporating the values from all dependent columns If dependent columns are not provided then the map would contain values from all the columns Note no change for Constant Column values they need to be retrieved usingImportFieldWriter.getConstantColumnValue(String)processValues(@NotNull Map<String, Object[]> columnNameToValueMap, int size, long destEnd) The method is invoked by the CustomSetter Column Parser by incorporating the values from all dependent columns If dependent columns are not provided then the map would contain values from all the columns Note no change for Constant Column values they need to be retrieved usingImportFieldWriter.getConstantColumnValue(String)voidsetConstantColumnValue(String constantColumnValue) The Constant Column Value as passed in from uiMethods inherited from class io.deephaven.importers.BaseImportFieldWriter
getBigDecimal, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getISONanos, getLocalDate, getLocalTime, getLong, getShort, getTrimmedStringNullMethods inherited from class io.deephaven.importers.ImportFieldWriter
accountingDouble, accountingInt, accountingLong, createFormula, createTransform, createTransformDeclaration, getBigDecimalArray, getBigDecimalArray, getBigDecimalArray, getBigIntegerArray, getBigIntegerArray, getBigIntegerArray, getBooleanArray, getBooleanArray, getBooleanArray, getByteArray, getByteArray, getByteArray, getCharArray, getCharArray, getCharArray, getConstantColumnValue, getDbColumnName, getDoubleArray, getDoubleArray, getDoubleArray, getEnumFormatter, getFloatArray, getFloatArray, getFloatArray, getImports, getInstantArray, getIntArray, getIntArray, getIntArray, getLocalDateArray, getLocalDateArray, getLocalDateArray, getLocalTimeArray, getLocalTimeArray, getLocalTimeArray, getLongArray, getLongArray, getLongArray, getSetter, getShortArray, getShortArray, getShortArray, getStringArray, getStringArray, instantFromLong, instantFromTimestamp, instantFromTimestamp, localDateFromString, parseBoolean, processField, setImportProperties, stripFirstCharacter, toISONanos, updateWithConstantColumnValue
-
Field Details
-
ZERO_VALUE_ARRAY
-
-
Constructor Details
-
BaseCsvFieldWriter
-
-
Method Details
-
getSetterValue
The getter of the setter value.- Returns:
- Returns the setter which should be populated with the final value for the column
-
initialize
initializes given Setter and Import Properties- Parameters:
setterValue- the setter for this ColumnimportProperties- The custom properties map passed in import method
-
getConstantColumnValue
The getter to retrieve the constantColumnValue- Returns:
- the Constant Column Value
-
setConstantColumnValue
The Constant Column Value as passed in from ui- Parameters:
constantColumnValue- The value that represents the ConstantColumnValue
-
processValues
public List<CustomSetterValue<?>> processValues(@NotNull @NotNull Map<String, Object[]> columnNameToValueMap, int size, long destEnd) throws RowProcessingExceptionThe method is invoked by the CustomSetter Column Parser by incorporating the values from all dependent columns If dependent columns are not provided then the map would contain values from all the columns Note no change for Constant Column values they need to be retrieved usingImportFieldWriter.getConstantColumnValue(String)- Parameters:
columnNameToValueMap- The column name to corresponding CustomValue array mapsize- The size of the chunk, which is the same as the size of CustomSetterValue array in the mapdestEnd- The exclusive end index of the destination range.- Returns:
- The processed custom setter column values for each row
- Throws:
RowProcessingException- Thrown if processing errors occur when parsing to create Csv records
-
getSetterCopy
Returns a newCustomSetterValueinstance that is a copy of the setter present in the FieldWriter instance.- Returns:
- new instance of
CustomSetterValuethat is identical to the existing setter
-
processField
The method is invoked by the CustomSetter Column Parser by incorporating the values from all dependent columns If dependent columns are not provided then the map would contain values from all the columns Note no change for Constant Column values they need to be retrieved usingImportFieldWriter.getConstantColumnValue(String)- Parameters:
columnNameToValueMap- The column name to corresponding CustomValue array map
-