Class ImporterColumnDefinition

java.lang.Object
com.illumon.dataobjects.generated.DefaultColumnDefinition
com.illumon.dataobjects.ColumnDefinition
com.illumon.iris.importers.ImporterColumnDefinition
All Implemented Interfaces:
com.fishlib.base.Copyable, com.fishlib.base.log.LogOutputAppendable, com.fishlib.base.SafeCloneable, com.fishlib.dataobjects.persistence.WObjectStreamConstants, com.fishlib.dataobjects.WAbstractDataObject, Externalizable, Serializable, Cloneable

public class ImporterColumnDefinition extends com.illumon.dataobjects.ColumnDefinition
Encapsulates details about ImportColumns from the schema, such as sourceType, formulae, etc
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    class 
    Dummy class to mark fields to be populated from the CONSTANT_COLUMN_VALUE parameter

    Nested classes/interfaces inherited from class com.illumon.dataobjects.ColumnDefinition

    com.illumon.dataobjects.ColumnDefinition.ObjectCodecType, com.illumon.dataobjects.ColumnDefinition.SymbolTableType
  • Field Summary

    Fields inherited from class com.illumon.dataobjects.ColumnDefinition

    COLUMN_TYPE_FORMATTER, ENCODING_FORMATTER, ZERO_LENGTH_COLUMN_DEFINITION_ARRAY

    Fields inherited from class com.illumon.dataobjects.generated.DefaultColumnDefinition

    columnSet_, columnSetName_, columnType, COLUMNTYPE_GROUPING, COLUMNTYPE_NORMAL, COLUMNTYPE_PARTITIONING, COLUMNTYPE_VIRTUAL, componentType, dataType, encoding, ENCODING_ISO_8859_1, ENCODING_US_ASCII, ENCODING_UTF_16, ENCODING_UTF_16BE, ENCODING_UTF_16LE, ENCODING_UTF_8, INDEX_OF_COLUMNTYPE, INDEX_OF_COMPONENTTYPE, INDEX_OF_DATATYPE, INDEX_OF_ENCODING, INDEX_OF_ISVARSIZESTRING, INDEX_OF_NAME, INDEX_OF_OBJECTCODECARGUMENTS, INDEX_OF_OBJECTCODECCLASS, INDEX_OF_OBJECTWIDTH, isVarSizeString, name, objectCodecArguments, objectCodecClass, objectWidth

    Fields inherited from interface com.fishlib.dataobjects.persistence.WObjectStreamConstants

    ADD_CLASS, ADD_COLUMN_SET_CLASS, ADD_ENUM, ADD_ENUM_LONG, ADO_ARRAY_TYPE, ARRAY_TYPE, BOOLEAN_TYPE, BYTE_ARRAY_TYPE, BYTE_TYPE, DATE_TYPE, DOUBLE_ARRAY_TYPE, DOUBLE_TYPE, FLOAT_ARRAY_TYPE, FLOAT_TYPE, INT_ARRAY_TYPE, INTEGER_TYPE, KNOWN_ENUM, KNOWN_ENUM_LONG, LINKED_MAP_TYPE, LINKED_SET_TYPE, LONG_ARRAY_TYPE, LONG_STRING_TYPE, LONG_TYPE, MAP_TYPE, NULL_TYPE, OBJECT_TYPE, SET_TYPE, STRING_ARRAY_TYPE, STRING_TYPE, TREE_MAP_TYPE, TREE_SET_TYPE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    ImporterColumnDefinition(com.illumon.dataobjects.ColumnDefinition c, org.jdom2.Element sourceElement)
    Creates a new ImporterColumnDefinition object
  • Method Summary

    Modifier and Type
    Method
    Description
    createNameMap(org.jdom2.Element sourceElement, TableDefinition tableDefinition, List<String> sourceColumns)
     
    boolean
     
     
     
     
    boolean
    Check whether we should try to return a default when import of a field fails
     
    org.jdom2.Element
     
    org.jdom2.Element
     
    int
    boolean
     
     
     
     
     
     
    <T> T
     
     
    static boolean
    Utility method to identify if a column defined in ImportSource elements is a constant column.
    void
    setIndex(int index)
    Sets the internal index value for this row.
    void
     

    Methods inherited from class com.illumon.dataobjects.ColumnDefinition

    beginPersistentSerialization, clone, describeDifferences, doingPersistentSerialization, endPersistentSerialization, equals, getDataType, getEncodingInfo, getEncodingInfo, getObjectCodecType, getSymbolTableType, isCompatible, isDirect, isFixedWidthObjectType, isGrouping, isPartitioning, readExternal, rename, withGrouping, withPartitioning, writeExternal

    Methods inherited from class com.illumon.dataobjects.generated.DefaultColumnDefinition

    append, copyValues, getByte, getByte, getByte, getColumnSet, getColumnSetName, getColumnSetStatic, getColumnType, getComponentType, getDate, getDate, getDate, getDouble, getDouble, getDouble, getEncoding, getInt, getInt, getInt, getIsVarSizeString, getLong, getLong, getLong, getName, getObjectCodecArguments, getObjectCodecClass, getObjectWidth, getString, getString, getString, getValue, getValue, getValue, hashCode, safeClone, setByte, setByte, setColumnType, setComponentType, setDataType, setDate, setDate, setDouble, setDouble, setEncoding, setInt, setInt, setIsVarSizeString, setLong, setLong, setName, setObjectCodecArguments, setObjectCodecClass, setObjectWidth, setString, setString, setValue, setValue, toString

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ImporterColumnDefinition

      public ImporterColumnDefinition()
    • ImporterColumnDefinition

      public ImporterColumnDefinition(com.illumon.dataobjects.ColumnDefinition c, org.jdom2.Element sourceElement)
      Creates a new ImporterColumnDefinition object
      Parameters:
      c - The Iris Table column that will receive data
      sourceElement - The ImportSource from the schema being used that will be searched for a matching ImportColumn
  • Method Details

    • getIndex

      public int getIndex()
      Gets the index set by setIndex(int) or createNameMap(Element, TableDefinition, List). If setIndex(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
    • 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 org.jdom2.Element getImportColumn()
    • getTransform

      public String getTransform()
    • getSetter

      public String getSetter()
    • getFormula

      public String getFormula()
    • getSpecifiedDefault

      public <T> T getSpecifiedDefault(Class<T> type)
    • getDefault

      public String getDefault()
      Returns:
      The default value for the column, if one exists, or null if there is no default for this column
    • getDefaultValue

      public String getDefaultValue()
      Returns:
      The default value for the column, if one exists, or null if there is no default for this column
    • setSourceName

      public void setSourceName(String newName)
    • getSourceName

      public String getSourceName()
    • getPropertyName

      public String getPropertyName()
    • getSourceNameOrDefault

      public String getSourceNameOrDefault()
    • getImportSource

      public org.jdom2.Element getImportSource()
    • getNullable

      public boolean getNullable()
    • getCacheable

      public boolean getCacheable()
    • getCacheSize

      public String getCacheSize()
    • getSourceType

      public Class<?> getSourceType()
      Returns:
      The Class of the source type, from the String sourceType from the schema XML
    • createNameMap

      public static Map<String,ImporterColumnDefinition> createNameMap(org.jdom2.Element sourceElement, TableDefinition tableDefinition, List<String> sourceColumns)
    • isConstantColumn

      public static boolean isConstantColumn(String sourceType)
      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