Package com.atlan.samples.loaders.models
Class AccountDetails
- java.lang.Object
-
- com.atlan.samples.loaders.models.AssetDetails
-
- com.atlan.samples.loaders.models.AccountDetails
-
public class AccountDetails extends AssetDetails
Utility class for capturing the full details provided about a database.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AccountDetails.AccountDetailsBuilder<C extends AccountDetails,B extends AccountDetails.AccountDetailsBuilder<C,B>>
-
Nested classes/interfaces inherited from class com.atlan.samples.loaders.models.AssetDetails
AssetDetails.AssetDetailsBuilder<C extends AssetDetails,B extends AssetDetails.AssetDetailsBuilder<C,B>>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COL_ACCOUNT
-
Constructor Summary
Constructors Modifier Constructor Description protected
AccountDetails(AccountDetails.AccountDetailsBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AccountDetails.AccountDetailsBuilder<?,?>
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.String
getConnectionQualifiedName()
static AccountDetails
getFromRow(java.util.Map<ConnectionDetails,java.lang.String> connectionCache, java.util.Map<java.lang.String,java.lang.String> row, java.lang.String delim)
Build up details about the account on the provided row.java.lang.String
getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.java.lang.String
getName()
static java.lang.String
getQualifiedName(java.util.Map<ConnectionDetails,java.lang.String> connectionCache, java.util.Map<java.lang.String,java.lang.String> row)
Construct an account's qualifiedName from the row of data and cache of connections.int
hashCode()
java.lang.String
toString()
static void
upsert(java.util.Map<java.lang.String,AccountDetails> accounts, int batchSize, boolean updateOnly)
Create accounts in bulk, if they do not exist, or update them if they do (idempotent).-
Methods inherited from class com.atlan.samples.loaders.models.AssetDetails
appendAtlanTags, getAnnouncementMessage, getAnnouncementTitle, getAnnouncementType, getAtlanTags, getBoolean, getCertificate, getCertificateStatusMessage, getDescription, getFromRow, getMissingFields, getMultiValuedList, getOwnerGroups, getOwnerUsers, getRequiredEmptyFields, isStub, selectivelyUpdateCustomMetadata
-
-
-
-
Field Detail
-
COL_ACCOUNT
public static final java.lang.String COL_ACCOUNT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AccountDetails
protected AccountDetails(AccountDetails.AccountDetailsBuilder<?,?> b)
-
-
Method Detail
-
getIdentity
public java.lang.String getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.- Specified by:
getIdentity
in classAssetDetails
- 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 an account's qualifiedName from the row of data and cache of connections.- Parameters:
connectionCache
- cache of connectionsrow
- of data- Returns:
- the qualifiedName for the account on that row of data
-
getFromRow
public static AccountDetails getFromRow(java.util.Map<ConnectionDetails,java.lang.String> connectionCache, java.util.Map<java.lang.String,java.lang.String> row, java.lang.String delim)
Build up details about the account on the provided row.- Parameters:
connectionCache
- a cache of connections that have first been resolved across the spreadsheetrow
- a row of data from the spreadsheet, as a map from column name to valuedelim
- delimiter used in cells that can contain multiple values- Returns:
- the account details for that row
-
upsert
public static void upsert(java.util.Map<java.lang.String,AccountDetails> accounts, int batchSize, boolean updateOnly)
Create accounts in bulk, if they do not exist, or update them if they do (idempotent).- Parameters:
accounts
- the set of accounts to ensure existbatchSize
- maximum number of accounts to create per batchupdateOnly
- if true, only attempt to update existing assets, otherwise allow assets to be created as well
-
builder
public static AccountDetails.AccountDetailsBuilder<?,?> builder()
-
getConnectionQualifiedName
public java.lang.String getConnectionQualifiedName()
-
getName
public java.lang.String getName()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAssetDetails
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqual
in classAssetDetails
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAssetDetails
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAssetDetails
-
-