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 classColumnDetails.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.StringCOL_COLUMNstatic java.lang.StringCOL_COLUMN_FKstatic java.lang.StringCOL_COLUMN_PKstatic java.lang.StringCOL_COLUMN_TYPE
-
Constructor Summary
Constructors Modifier Constructor Description protectedColumnDetails(ColumnDetails.ColumnDetailsBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ColumnDetails.ColumnDetailsBuilder<?,?>builder()protected booleancanEqual(java.lang.Object other)booleanequals(java.lang.Object o)java.lang.BooleangetForeignKey()static ColumnDetailsgetFromRow(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.StringgetIdentity()Retrieve the unique identity of this asset for deduplication across rows.intgetIndex()java.lang.StringgetMappedType()java.lang.StringgetName()java.lang.StringgetParentQualifiedName()java.lang.StringgetParentType()java.lang.BooleangetPrimaryKey()java.lang.StringgetRawType()inthashCode()java.lang.StringtoString()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:
getIdentityin 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:
equalsin classAssetDetails
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqualin classAssetDetails
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAssetDetails
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAssetDetails
-
-