Package com.atlan.samples.loaders.models
Class ColumnDetails
- java.lang.Object
-
- com.atlan.samples.loaders.models.AssetDetails
-
- com.atlan.samples.loaders.models.ColumnDetails
-
public class ColumnDetails extends AssetDetails
Utility class for capturing the full details provided about a column.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ColumnDetails.ColumnDetailsBuilder<C extends ColumnDetails,B extends ColumnDetails.ColumnDetailsBuilder<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_COLUMN
static java.lang.String
COL_COLUMN_FK
static java.lang.String
COL_COLUMN_PK
static java.lang.String
COL_COLUMN_TYPE
-
Constructor Summary
Constructors Modifier Constructor Description protected
ColumnDetails(ColumnDetails.ColumnDetailsBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColumnDetails.ColumnDetailsBuilder<?,?>
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
java.lang.Boolean
getForeignKey()
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.java.lang.String
getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.int
getIndex()
java.lang.String
getMappedType()
java.lang.String
getName()
java.lang.String
getParentQualifiedName()
java.lang.String
getParentType()
java.lang.Boolean
getPrimaryKey()
java.lang.String
getRawType()
int
hashCode()
java.lang.String
toString()
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).-
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_COLUMN
public static final java.lang.String COL_COLUMN
- See Also:
- Constant Field Values
-
COL_COLUMN_TYPE
public static final java.lang.String COL_COLUMN_TYPE
- See Also:
- Constant Field Values
-
COL_COLUMN_PK
public static final java.lang.String COL_COLUMN_PK
- See Also:
- Constant Field Values
-
COL_COLUMN_FK
public static final java.lang.String COL_COLUMN_FK
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ColumnDetails
protected ColumnDetails(ColumnDetails.ColumnDetailsBuilder<?,?> 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
-
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 spreadsheetrow
- a row of data from the spreadsheet, as a map from column name to valuedelim
- delimiter used in cells that can contain multiple valuesindex
- 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 existbatchSize
- maximum number of columns to create per batchupdateOnly
- 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
-
builder
public static ColumnDetails.ColumnDetailsBuilder<?,?> builder()
-
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 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
-
-