Class DataStructureTableColumnModel
java.lang.Object
org.eclipse.dirigible.database.ds.model.DataStructureTableColumnModel
public class DataStructureTableColumnModel extends Object
The column element of the table model.
-
Constructor Summary
Constructors Constructor Description DataStructureTableColumnModel()The default constructor.DataStructureTableColumnModel(String name, String type, String length, boolean nullable, boolean primaryKey, String defaultValue, String precision, String scale, boolean unique)The constructor from the fields. -
Method Summary
Modifier and Type Method Description StringgetDefaultValue()Getter for the default value.StringgetLength()Getter for the length.StringgetName()Getter for the name.StringgetPrecision()Getter for the precision value.StringgetScale()Getter for the scale value.StringgetType()Getter for the type.booleanisNullable()Check for nullable.booleanisPrimaryKey()Check for primary key.booleanisUnique()Check for unique.voidsetDefaultValue(String defaultValue)Setter for the default value.voidsetLength(String length)Setter for the length.voidsetName(String name)Setter for the name.voidsetNullable(boolean nullable)Setter for the nullable.voidsetPrecision(String precision)Setter for the precision value.voidsetPrimaryKey(boolean primaryKey)Setter for the primary key.voidsetScale(String scale)Setter for the scale value.voidsetType(String type)Setter for the type.voidsetUnique(boolean unique)Setter for the unique.
-
Constructor Details
-
DataStructureTableColumnModel
public DataStructureTableColumnModel()The default constructor. -
DataStructureTableColumnModel
public DataStructureTableColumnModel(String name, String type, String length, boolean nullable, boolean primaryKey, String defaultValue, String precision, String scale, boolean unique)The constructor from the fields.- Parameters:
name- the nametype- the typelength- the lengthnullable- whether null values are allowedprimaryKey- whether it is a primary keydefaultValue- the default valueprecision- the precision value for floating point typesscale- the scale value for floating point typesunique- the unique
-
-
Method Details
-
getName
Getter for the name.- Returns:
- the name
-
setName
Setter for the name.- Parameters:
name- the name
-
getType
Getter for the type.- Returns:
- the type
-
setType
Setter for the type.- Parameters:
type- the type
-
getLength
Getter for the length.- Returns:
- the length
-
setLength
Setter for the length.- Parameters:
length- the length
-
isNullable
public boolean isNullable()Check for nullable.- Returns:
- true if can be null
-
setNullable
public void setNullable(boolean nullable)Setter for the nullable.- Parameters:
nullable- whether null values are allowed
-
isPrimaryKey
public boolean isPrimaryKey()Check for primary key.- Returns:
- true if primary key
-
setPrimaryKey
public void setPrimaryKey(boolean primaryKey)Setter for the primary key.- Parameters:
primaryKey- whether it is a primary key
-
getDefaultValue
Getter for the default value.- Returns:
- the default value
-
setDefaultValue
Setter for the default value.- Parameters:
defaultValue- the default value
-
getPrecision
Getter for the precision value.- Returns:
- the precision value
-
setPrecision
Setter for the precision value.- Parameters:
precision- the precision value
-
getScale
Getter for the scale value.- Returns:
- the scale value
-
setScale
Setter for the scale value.- Parameters:
scale- the scale value
-
isUnique
public boolean isUnique()Check for unique.- Returns:
- true if unique
-
setUnique
public void setUnique(boolean unique)Setter for the unique.- Parameters:
unique- the unique value
-