Class PersistenceTableColumnModel
java.lang.Object
org.eclipse.dirigible.database.persistence.model.PersistenceTableColumnModel
public class PersistenceTableColumnModel extends Object
The column element of the persistence model transport object.
-
Constructor Summary
Constructors Constructor Description PersistenceTableColumnModel()Empty constructorPersistenceTableColumnModel(String name, String type, boolean primaryKey)The constructor from the fields.PersistenceTableColumnModel(String field, String name, String type, int length, boolean nullable, boolean primaryKey, int precision, int scale, String generated, boolean unique, boolean identity, String enumerated)The constructor from the fields. -
Method Summary
Modifier and Type Method Description StringgetEnumerated()Returns the name of the enumerated type in case the column is of type enumerated or null otherwise.StringgetField()Getter for the field.StringgetGenerated()Check whether it is generated value.intgetLength()Getter for the length.StringgetName()Getter for the name.intgetPrecision()Getter for the precision.intgetScale()Getter for the scale.StringgetType()Getter for the type.booleanisIdentity()Check whether it is identity value.booleanisNullable()Check for nullable.booleanisPrimaryKey()Check for primary key.booleanisUnique()Check whether it is unique value.voidsetEnumerated(String enumerated)Setter for the enumerated type name.voidsetField(String field)Setter for the field.voidsetGenerated(String generated)Setter for the generated.voidsetIdentity(boolean identity)Setter for the identity.voidsetLength(int length)Setter for the length.voidsetName(String name)Setter for the name.voidsetNullable(boolean nullable)Setter for the nullable.voidsetPrecision(int precision)Setter for the precision.voidsetPrimaryKey(boolean primaryKey)Setter for the primary key.voidsetScale(int scale)Setter for the scale.voidsetType(String type)Setter for the type.voidsetUnique(boolean unique)Setter for the unique.
-
Constructor Details
-
PersistenceTableColumnModel
public PersistenceTableColumnModel(String field, String name, String type, int length, boolean nullable, boolean primaryKey, int precision, int scale, String generated, boolean unique, boolean identity, String enumerated)The constructor from the fields.- Parameters:
field- the fieldname- the nametype- the typelength- the lengthnullable- whether null values are allowedprimaryKey- whether it is a primary keyprecision- the precision for floating point valuesscale- the scale for floating point valuesgenerated- whether it is a generated valueunique- whether it is uniqueidentity- whether it is identityenumerated- whether it is enumerated
-
PersistenceTableColumnModel
public PersistenceTableColumnModel()Empty constructor -
PersistenceTableColumnModel
The constructor from the fields.- Parameters:
name- the nametype- the typeprimaryKey-
-
-
Method Details
-
getField
Getter for the field.- Returns:
- the field
-
setField
Setter for the field.- Parameters:
field- the field
-
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
public int getLength()Getter for the length.- Returns:
- the length
-
setLength
public void setLength(int length)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
-
getPrecision
public int getPrecision()Getter for the precision.- Returns:
- the precision
-
setPrecision
public void setPrecision(int precision)Setter for the precision.- Parameters:
precision- the precision
-
getScale
public int getScale()Getter for the scale.- Returns:
- the scale
-
setScale
public void setScale(int scale)Setter for the scale.- Parameters:
scale- the scale
-
getGenerated
Check whether it is generated value.- Returns:
- true if generated
-
setGenerated
Setter for the generated.- Parameters:
generated- whether it is generated
-
isUnique
public boolean isUnique()Check whether it is unique value.- Returns:
- true if unique
-
setUnique
public void setUnique(boolean unique)Setter for the unique.- Parameters:
unique- whether it is unique
-
isIdentity
public boolean isIdentity()Check whether it is identity value.- Returns:
- true if identity
-
setIdentity
public void setIdentity(boolean identity)Setter for the identity.- Parameters:
identity- whether it is identity
-
getEnumerated
Returns the name of the enumerated type in case the column is of type enumerated or null otherwise.- Returns:
- enumerated type name
-
setEnumerated
Setter for the enumerated type name.- Parameters:
enumerated- the new enumerated
-