Package com.gpudb.filesystem.ingest
Class TableCreationOptions
- java.lang.Object
-
- com.gpudb.filesystem.ingest.TableCreationOptions
-
public class TableCreationOptions extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTableCreationOptions.Option
-
Constructor Summary
Constructors Constructor Description TableCreationOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getForeignKeys()Gets the list of foreign keysStringgetForeignShardKey()Gets the foreign shard keyMap<String,String>getOptions()This method returns a Map of String to String carrying all the options that have been set by the user.List<String>getPartitionDefinitions()Gets the list of partition definitionsList<String>getPartitionKeys()Gets the list of partition keysPartitionTypegetPartitionType()Gets the value of 'partitionType' used for table creationintgetTtl()Gets the value of 'ttl' for the tableStringgetTypeId()Gets the type ID set for table creation.booleanisAutomaticPartition()Gets whether the partiion is automatic or notbooleanisNoErrorIfExists()Gets the value of 'noErrorIfExists'booleanisReplicated()Gets the value of 'isReplicated'booleanisResultTable()Gets whether the table is a result table or notvoidput(String key, boolean value)One of the four overloaded methods based on varying data types for setting options not already exposed through the other setter methods as documented here.voidput(String key, int value)One of the four overloaded methods based on varying data types for setting options not already exposed through the other setter methods as documented here.voidput(String key, long value)One of the four overloaded methods based on varying data types for setting options not already exposed through the other setter methods as documented here.voidput(String key, String value)One of the four overloaded methods based on varying data types for setting options not already exposed through the other setter methods as documented here.TableCreationOptionssetAutomaticPartition(boolean automaticPartition)Sets the value of 'automaticPartition'TableCreationOptionssetForeignKeys(List<String> foreignKeys)Sets the list of foreign keysTableCreationOptionssetForeignShardKey(String foreignShardKey)Sets the foreign shard key valueTableCreationOptionssetNoErrorIfExists(boolean noErrorIfExists)Sets the value of 'noErrorIfExists' A truthy value indicates that no error will be thrown if there is an attempt to re-create an already existent table and false otherwise.TableCreationOptionssetPartitionDefinitions(List<String> partitionDefinitions)Sets the list of partition definitionsTableCreationOptionssetPartitionKeys(List<String> partitionKeys)Sets the list of partition keysTableCreationOptionssetPartitionType(PartitionType partitionType)Sets the parition type value used for table creationTableCreationOptionssetReplicated(boolean replicated)Sets the value of 'replicated' indicating whether the table to be created will be a replicated table or not.TableCreationOptionssetResultTable(boolean resultTable)Sets the value of 'resultTable' indicating whether this table is a result table or notTableCreationOptionssetTtl(int ttl)Sets the 'ttl' value for the tableTableCreationOptionssetTypeId(String typeId)Sets the type ID for the table
-
-
-
Method Detail
-
getTypeId
public String getTypeId()
Gets the type ID set for table creation.- Returns:
- - The type ID string
- See Also:
setTypeId(String)
-
setTypeId
public TableCreationOptions setTypeId(String typeId)
Sets the type ID for the table- Parameters:
typeId- - A type ID string- Returns:
- - This
TableCreationOptionsobject - See Also:
getTypeId()
-
isNoErrorIfExists
public boolean isNoErrorIfExists()
Gets the value of 'noErrorIfExists'- Returns:
- true or false
- See Also:
setNoErrorIfExists(boolean)
-
setNoErrorIfExists
public TableCreationOptions setNoErrorIfExists(boolean noErrorIfExists)
Sets the value of 'noErrorIfExists' A truthy value indicates that no error will be thrown if there is an attempt to re-create an already existent table and false otherwise.- Parameters:
noErrorIfExists- - true or false- Returns:
- - This
TableCreationOptionsobject
-
isReplicated
public boolean isReplicated()
Gets the value of 'isReplicated'- Returns:
- true or false
-
setReplicated
public TableCreationOptions setReplicated(boolean replicated)
Sets the value of 'replicated' indicating whether the table to be created will be a replicated table or not.- Parameters:
replicated- - True or false- Returns:
- - This
TableCreationOptionsobject - See Also:
isReplicated()
-
getForeignKeys
public List<String> getForeignKeys()
Gets the list of foreign keys- Returns:
- - The list of foreign keys
- See Also:
setForeignKeys(List)
-
setForeignKeys
public TableCreationOptions setForeignKeys(List<String> foreignKeys)
Sets the list of foreign keys- Parameters:
foreignKeys- - A list of strings specifying the foreign keys- Returns:
- - This
TableCreationOptionsobject - See Also:
getForeignKeys()
-
getForeignShardKey
public String getForeignShardKey()
Gets the foreign shard key- Returns:
- - the value of the foreign shard key
-
setForeignShardKey
public TableCreationOptions setForeignShardKey(String foreignShardKey)
Sets the foreign shard key value- Parameters:
foreignShardKey-- Returns:
- - This
TableCreationOptionsobject - See Also:
getForeignShardKey()
-
getPartitionType
public PartitionType getPartitionType()
Gets the value of 'partitionType' used for table creation- Returns:
- A
PartitionTypevalue - See Also:
PartitionType,setPartitionType(PartitionType)
-
setPartitionType
public TableCreationOptions setPartitionType(PartitionType partitionType)
Sets the parition type value used for table creation- Parameters:
partitionType- enumPartitionType- Returns:
- - This
TableCreationOptionsobject - See Also:
getPartitionType()
-
getPartitionKeys
public List<String> getPartitionKeys()
Gets the list of partition keys- Returns:
- A list of partition keys
- See Also:
setPartitionKeys(List)
-
setPartitionKeys
public TableCreationOptions setPartitionKeys(List<String> partitionKeys)
Sets the list of partition keys- Parameters:
partitionKeys- - A list of partition ksys- Returns:
- - This
TableCreationOptionsobject - See Also:
getPartitionKeys()
-
getPartitionDefinitions
public List<String> getPartitionDefinitions()
Gets the list of partition definitions- Returns:
- - a list of partition definitions
- See Also:
setPartitionDefinitions(List)
-
setPartitionDefinitions
public TableCreationOptions setPartitionDefinitions(List<String> partitionDefinitions)
Sets the list of partition definitions- Parameters:
partitionDefinitions-- Returns:
- - This
TableCreationOptionsobject - See Also:
getPartitionDefinitions()
-
isAutomaticPartition
public boolean isAutomaticPartition()
Gets whether the partiion is automatic or not- Returns:
- true or false
- See Also:
setAutomaticPartition(boolean)
-
setAutomaticPartition
public TableCreationOptions setAutomaticPartition(boolean automaticPartition)
Sets the value of 'automaticPartition'- Parameters:
automaticPartition- - true or false- Returns:
- - This
TableCreationOptionsobject - See Also:
isAutomaticPartition()
-
getTtl
public int getTtl()
Gets the value of 'ttl' for the table- Returns:
- an int value indicating the 'ttl'
-
setTtl
public TableCreationOptions setTtl(int ttl)
Sets the 'ttl' value for the table- Parameters:
ttl- - an int value- Returns:
- - This
TableCreationOptionsobject - See Also:
getTtl()
-
isResultTable
public boolean isResultTable()
Gets whether the table is a result table or not- Returns:
- true or false
- See Also:
setResultTable(boolean)
-
setResultTable
public TableCreationOptions setResultTable(boolean resultTable)
Sets the value of 'resultTable' indicating whether this table is a result table or not- Parameters:
resultTable- - true or false- Returns:
- - This
TableCreationOptionsobject - See Also:
isResultTable()
-
put
public void put(String key, int value)
One of the four overloaded methods based on varying data types for setting options not already exposed through the other setter methods as documented here.- Parameters:
key- - a stringvalue- - an int- See Also:
put(String, int),put(String, long),put(String, String),put(String, boolean)
-
put
public void put(String key, long value)
One of the four overloaded methods based on varying data types for setting options not already exposed through the other setter methods as documented here.- Parameters:
key- - a stringvalue- - a long- See Also:
put(String, int),put(String, long),put(String, String),put(String, boolean)
-
put
public void put(String key, String value)
One of the four overloaded methods based on varying data types for setting options not already exposed through the other setter methods as documented here.- Parameters:
key- - a stringvalue- - a string- See Also:
put(String, int),put(String, long),put(String, String),put(String, boolean)
-
put
public void put(String key, boolean value)
One of the four overloaded methods based on varying data types for setting options not already exposed through the other setter methods as documented here.- Parameters:
key- - a stringvalue- - a boolean- See Also:
put(String, int),put(String, long),put(String, String),put(String, boolean)
-
getOptions
public Map<String,String> getOptions()
This method returns a Map of String to String carrying all the options that have been set by the user. This is internally used to get the options so that they can be passed to the endpoints which expect the options as a Map of String to String.- Returns:
- - a Map of String to String
-
-