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
EmptyImplementation
class 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 boolean
equals(Object o)
String
getId()
Returns the resource ingestion definition id.List<IngestionConfiguration<C,D>>
getIngestionConfigurations()
Returns the ingestion configurations.String
getName()
Returns the resource name.String
getParentId()
Returns the id of the parent definition.I
getResourceId()
Returns the properties which identify the resource in the source system.M
getResourceMetadata()
Returns the resource metadata.int
hashCode()
boolean
isDisabled()
Returns whether the ingestion for the resource is disabled.boolean
isEnabled()
Returns whether the ingestion for the resource is enabled.void
setDisabled()
Sets enabled flag to falsevoid
setEnabled()
Sets enabled flag to truevoid
setEnabled(boolean enabled)
Sets whether the ingestion for the resource is enabled.void
setId(String id)
Sets the resource ingestion definition id.void
setIngestionConfigurations(List<IngestionConfiguration<C,D>> ingestionConfigurations)
Sets the ingestion configurations.void
setName(String name)
Sets the resource name.void
setParentId(String parentId)
Sets the id of the parent definition.void
setResourceId(I resourceId)
Sets the properties which identify the resource in the source system.void
setResourceMetadata(M resourceMetadata)
Sets the resource metadataString
toString()
-
-
-
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
-
-