Class ResourceIngestionDefinition<I,M,C,D>
- java.lang.Object
-
- com.snowflake.connectors.application.ingestion.definition.ResourceIngestionDefinition<I,M,C,D>
-
- Type Parameters:
I- resource id class, containing properties which identify the resource in the source systemM- resource metadata class, containing additional properties which identify the resource in the source system. The properties can be fetched automatically or calculated by the connectorC- custom ingestion configuration class, containing custom ingestion propertiesD- destination configuration class, containing properties describing where the ingested data should be stored
- Direct Known Subclasses:
VariantResource
public abstract class ResourceIngestionDefinition<I,M,C,D> extends Object
Base class of a resource ingestion definition. It contains information about a resource present in a source system, and information about how the resource should be ingested.Implementation of this class has to meet the following criteria:
- must contain a public, no-args constructor, which will be used during reflection-based deserialization process
- type parameter classes must contain a public, no-args constructor, public getters, and setters which will be used during reflection-based serialization and deserialization processes
A specific, uniquely identifying resource id class must always be specified. All other type parameters are used for additional, non-obligatory data and thus may be substituted by the
EmptyImplementationclass if not needed.
-
-
Constructor Summary
Constructors Constructor Description ResourceIngestionDefinition()Creates an emptyResourceIngestionDefinition.ResourceIngestionDefinition(String id, String name, boolean enabled, String parentId, I resourceId, M resourceMetadata, List<IngestionConfiguration<C,D>> ingestionConfigurations)Creates a newResourceIngestionDefinition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)StringgetId()Returns the resource ingestion definition id.List<IngestionConfiguration<C,D>>getIngestionConfigurations()Returns the ingestion configurations.StringgetName()Returns the resource name.StringgetParentId()Returns the id of the parent definition.IgetResourceId()Returns the properties which identify the resource in the source system.MgetResourceMetadata()Returns the resource metadata.inthashCode()booleanisDisabled()Returns whether the ingestion for the resource is disabled.booleanisEnabled()Returns whether the ingestion for the resource is enabled.voidsetDisabled()Sets enabled flag to falsevoidsetEnabled()Sets enabled flag to truevoidsetEnabled(boolean enabled)Sets whether the ingestion for the resource is enabled.voidsetId(String id)Sets the resource ingestion definition id.voidsetIngestionConfigurations(List<IngestionConfiguration<C,D>> ingestionConfigurations)Sets the ingestion configurations.voidsetName(String name)Sets the resource name.voidsetParentId(String parentId)Sets the id of the parent definition.voidsetResourceId(I resourceId)Sets the properties which identify the resource in the source system.voidsetResourceMetadata(M resourceMetadata)Sets the resource metadataStringtoString()
-
-
-
Constructor Detail
-
ResourceIngestionDefinition
public ResourceIngestionDefinition()
Creates an emptyResourceIngestionDefinition.This constructor is used by the reflection-based mapping process and should not be used for any other purpose.
-
ResourceIngestionDefinition
public ResourceIngestionDefinition(String id, String name, boolean enabled, String parentId, I resourceId, M resourceMetadata, List<IngestionConfiguration<C,D>> ingestionConfigurations)
Creates a newResourceIngestionDefinition.- Parameters:
id- resource ingestion definition idname- resource nameenabled- should the ingestion for the resource be enabledparentId- id of the parent definitionresourceId- properties which identify the resource in the source systemresourceMetadata- resource metadataingestionConfigurations- ingestion configurations
-
-
Method Detail
-
getId
public String getId()
Returns the resource ingestion definition id.- Returns:
- resource ingestion definition id
-
getName
public String getName()
Returns the resource name.- Returns:
- resource name
-
isEnabled
public boolean isEnabled()
Returns whether the ingestion for the resource is enabled.- Returns:
- whether the ingestion for the resource is enabled
-
isDisabled
public boolean isDisabled()
Returns whether the ingestion for the resource is disabled.- Returns:
- whether the ingestion for the resource is disabled
-
getParentId
public String getParentId()
Returns the id of the parent definition.- Returns:
- id of the parent definition
-
getResourceId
public I getResourceId()
Returns the properties which identify the resource in the source system.- Returns:
- properties which identify the resource in the source system
-
getResourceMetadata
public M getResourceMetadata()
Returns the resource metadata.- Returns:
- resource metadata
-
getIngestionConfigurations
public List<IngestionConfiguration<C,D>> getIngestionConfigurations()
Returns the ingestion configurations.- Returns:
- ingestion configurations
-
setId
public void setId(String id)
Sets the resource ingestion definition id.- Parameters:
id- resource ingestion definition id
-
setName
public void setName(String name)
Sets the resource name.- Parameters:
name- resource name
-
setEnabled
public void setEnabled(boolean enabled)
Sets whether the ingestion for the resource is enabled.- Parameters:
enabled- whether the ingestion for the resource is enabled
-
setEnabled
public void setEnabled()
Sets enabled flag to true
-
setDisabled
public void setDisabled()
Sets enabled flag to false
-
setParentId
public void setParentId(String parentId)
Sets the id of the parent definition.- Parameters:
parentId- id of the parent definition
-
setResourceId
public void setResourceId(I resourceId)
Sets the properties which identify the resource in the source system.- Parameters:
resourceId- properties which identify the resource in the source system
-
setResourceMetadata
public void setResourceMetadata(M resourceMetadata)
Sets the resource metadata- Parameters:
resourceMetadata- resource metadata
-
setIngestionConfigurations
public void setIngestionConfigurations(List<IngestionConfiguration<C,D>> ingestionConfigurations)
Sets the ingestion configurations.- Parameters:
ingestionConfigurations- ingestion configurations
-
-