Class ConnectionDetails


  • public class ConnectionDetails
    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
      • getQualifiedName

        public static java.lang.String getQualifiedName​(java.util.Map<ConnectionDetails,​java.lang.String> connectionCache,
                                                        java.util.Map<java.lang.String,​java.lang.String> row)
        Construct a connection's qualifiedName from the row of data and cache of connections.
        Parameters:
        connectionCache - cache of connections
        row - of data
        Returns:
        the qualifiedName for the connection on that row of data
      • getFromRow

        public static ConnectionDetails getFromRow​(java.util.Map<java.lang.String,​java.lang.String> row,
                                                   java.lang.String delim)
        Build up details about the column on the provided row.
        Parameters:
        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
        Returns:
        the column details for that row
      • upsert

        public static java.util.Map<ConnectionDetails,​java.lang.String> upsert​(java.util.Map<java.lang.String,​ConnectionDetails> connections,
                                                                                     int batchSize,
                                                                                     boolean updateOnly)
        Create connections in bulk, if they do not exist, or simply cache them if they do (idempotent).
        Parameters:
        connections - details of the connections to create
        batchSize - maximum number of connections to create per batch
        updateOnly - if true, only attempt to update existing assets, otherwise allow assets to be created as well
        Returns:
        a mapping of connection headers to their qualifiedName (as created or found)
      • findAndCache

        public static void findAndCache​(java.util.Map<ConnectionDetails,​java.lang.String> cache,
                                        java.lang.String name,
                                        com.atlan.model.enums.AtlanConnectorType type)
                                 throws com.atlan.exception.AtlanException
        Find any existing connection with the provided name and type, and add it to the cache (if it exists).
        Parameters:
        cache - to which to add the connection details
        name - of the connection
        type - of the connector for the connection
        Throws:
        com.atlan.exception.AtlanException - on any error finding the connection, including if it does not exist
      • getName

        public java.lang.String getName()
      • getType

        public com.atlan.model.enums.AtlanConnectorType getType()
      • 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