Class ColumnDetails


  • public class ColumnDetails
    extends AssetDetails
    Utility class for capturing the full details provided about a column.
    • Method Detail

      • getIdentity

        public java.lang.String getIdentity()
        Retrieve the unique identity of this asset for deduplication across rows.
        Specified by:
        getIdentity in class AssetDetails
        Returns:
        String giving the unique identity of the asset
      • getFromRow

        public static ColumnDetails getFromRow​(java.util.Map<ConnectionDetails,​java.lang.String> connectionCache,
                                               java.util.Map<java.lang.String,​java.lang.String> row,
                                               java.lang.String delim,
                                               int index)
        Build up details about the column on the provided row.
        Parameters:
        connectionCache - a cache of connections that have first been resolved across the spreadsheet
        row - a row of data from the spreadsheet, as a map from column name to value
        delim - delimiter used in cells that can contain multiple values
        index - the order (position) of the column in its parent container (based on its order in the spreadsheet)
        Returns:
        the column details for that row
      • upsert

        public static java.util.Set<ContainerDetails> upsert​(java.util.Map<java.lang.String,​ColumnDetails> columns,
                                                             int batchSize,
                                                             boolean updateOnly)
        Create columns in bulk, if they do not exist, or update them if they do (idempotent).
        Parameters:
        columns - the set of columns to ensure exist
        batchSize - maximum number of columns to create per batch
        updateOnly - if true, only attempt to update existing assets, otherwise allow assets to be created as well
        Returns:
        details of all parent containers in which assets were created or updated
      • getIndex

        public int getIndex()
      • getName

        public java.lang.String getName()
      • getParentType

        public java.lang.String getParentType()
      • getParentQualifiedName

        public java.lang.String getParentQualifiedName()
      • getRawType

        public java.lang.String getRawType()
      • getMappedType

        public java.lang.String getMappedType()
      • getPrimaryKey

        public java.lang.Boolean getPrimaryKey()
      • getForeignKey

        public java.lang.Boolean getForeignKey()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class AssetDetails
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
        Overrides:
        canEqual in class AssetDetails