Package io.deephaven.importers
Class ImporterColumnDefinition
java.lang.Object
io.deephaven.importers.ImporterColumnDefinition
Encapsulates details about ImportColumns from the schema, such as sourceType, formulae, etc
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDummy class to mark fields to be populated from the CONSTANT_COLUMN_VALUE parameter -
Constructor Summary
ConstructorsConstructorDescriptionImporterColumnDefinition(ColumnDefinition columnDefinition, io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement) Creates a new ImporterColumnDefinition object from a coreplusColumnDefinitionand anElementthat represents the ImportSource.ImporterColumnDefinition(io.deephaven.shadow.enterprise.com.illumon.dataobjects.ColumnDefinition legacyColumnDefinition, io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement) Creates a new ImporterColumnDefinition object from a legacyColumnDefinitionand anElementthat represents the ImportSource. -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String,ImporterColumnDefinition> createNameMap(io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement, TableDefinition tableDefinition, List<String> sourceColumns) Utility method to create a map of column names to ImporterColumnDefinition objects.static Map<String,ImporterColumnDefinition> createNameMap(io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement, io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition tableDefinition, List<String> sourceColumns) Utility method to create a map of column names to ImporterColumnDefinition objects.booleanbooleanCheck whether we should try to return a default when import of a field fails.io.deephaven.shadow.enterprise.org.jdom2.Elementio.deephaven.shadow.enterprise.org.jdom2.ElementintgetIndex()Gets the index set bysetIndex(int)orcreateNameMap(Element, TableDefinition, List).getName()booleanClass<?><T> TgetSpecifiedDefault(Class<T> type) static booleanisConstantColumn(String sourceType) Utility method to identify if a column defined in ImportSource elements is a constant column.booleanvoidsetIndex(int index) Sets the internal index value for this row.voidsetSourceName(String newName)
-
Constructor Details
-
ImporterColumnDefinition
public ImporterColumnDefinition(ColumnDefinition columnDefinition, io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement) Creates a new ImporterColumnDefinition object from a coreplusColumnDefinitionand anElementthat represents the ImportSource.- Parameters:
columnDefinition- The Iris Table column that will receive datasourceElement- The ImportSource from the schema being used that will be searched for a matching ImportColumn
-
ImporterColumnDefinition
public ImporterColumnDefinition(io.deephaven.shadow.enterprise.com.illumon.dataobjects.ColumnDefinition legacyColumnDefinition, io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement) Creates a new ImporterColumnDefinition object from a legacyColumnDefinitionand anElementthat represents the ImportSource.- Parameters:
legacyColumnDefinition- The Iris Table column that will receive datasourceElement- The ImportSource from the schema being used that will be searched for a matching ImportColumn
-
-
Method Details
-
getDataType
-
getName
-
isPartitioning
public boolean isPartitioning() -
getIndex
public int getIndex()Gets the index set bysetIndex(int)orcreateNameMap(Element, TableDefinition, List). IfsetIndex(int)has never been called, then the index will be the index of the definition within the schema ImportSource element.- Returns:
- The index value.
-
setIndex
public void setIndex(int index) Sets the internal index value for this row. This can be used by importers to track a particular column's index within the source.- Parameters:
index- The index
-
getSpecifiedDefault
-
getFailDefault
public boolean getFailDefault()Check whether we should try to return a default when import of a field fails.- Returns:
- boolean - true when we should try to return a default if this field fails assignment during import
-
getImportColumn
public io.deephaven.shadow.enterprise.org.jdom2.Element getImportColumn() -
getTransform
-
getSetter
-
getFormula
-
getDefault
- Returns:
- The default value for the column, if one exists, or null if there is no default for this column
-
getDefaultValue
- Returns:
- The default value for the column, if one exists, or null if there is no default for this column
-
setSourceName
-
getSourceName
-
getPropertyName
-
getSourceNameOrDefault
-
getImportSource
public io.deephaven.shadow.enterprise.org.jdom2.Element getImportSource() -
getNullable
public boolean getNullable() -
getCacheable
public boolean getCacheable() -
getCacheSize
-
getSourceType
- Returns:
- The Class of the source type, from the String sourceType from the schema XML
-
createNameMap
public static Map<String,ImporterColumnDefinition> createNameMap(io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement, TableDefinition tableDefinition, List<String> sourceColumns) Utility method to create a map of column names to ImporterColumnDefinition objects.- Parameters:
sourceElement- the ImportSource element from the schematableDefinition- the CorePlusTableDefinitionfor the tablesourceColumns- the source columns- Returns:
- a map of column names to ImporterColumnDefinition objects
-
createNameMap
public static Map<String,ImporterColumnDefinition> createNameMap(io.deephaven.shadow.enterprise.org.jdom2.Element sourceElement, io.deephaven.shadow.enterprise.com.illumon.iris.db.tables.TableDefinition tableDefinition, List<String> sourceColumns) Utility method to create a map of column names to ImporterColumnDefinition objects.- Parameters:
sourceElement- the ImportSource element from the schematableDefinition- the CorePlusTableDefinitionfor the tablesourceColumns- the source columns- Returns:
- a map of column names to ImporterColumnDefinition objects
-
isConstantColumn
Utility method to identify if a column defined in ImportSource elements is a constant column.- Parameters:
sourceType- The sourceType as defined in the ImportColumn element of schema- Returns:
- true if the column is defined as a constant column
-