Class ColumnDefiner
java.lang.Object
ru.curs.celesta.dbutils.adaptors.column.ColumnDefiner
- Direct Known Subclasses:
FireBirdColumnDefiner,MsSqlColumnDefiner,OraColumnDefiner
Class responsible for generation of table column definition in different DBMS.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringReturns column field type, e.g.abstract StringgetDefaultDefinition(Column<?> c) Returns separately DEFAULT definition of the column.getFullDefinition(Column<?> c) Returns full definition of the column (for column creation).abstract StringgetMainDefinition(Column<?> c) Returns column definition that contains name, type and NULL/NOT NULL ( without DEFAULT).static StringConcatenates strings separated by a space symbol.Whether the column is nullable.
-
Constructor Details
-
ColumnDefiner
public ColumnDefiner()
-
-
Method Details
-
dbFieldType
Returns column field type, e.g. "boolean", "double","int" etc. depending on the DBMS in question. -
getMainDefinition
Returns column definition that contains name, type and NULL/NOT NULL ( without DEFAULT). It is needed for the column change mechanism.- Parameters:
c- column.
-
getDefaultDefinition
Returns separately DEFAULT definition of the column.- Parameters:
c- column.
-
getFullDefinition
Returns full definition of the column (for column creation).- Parameters:
c- column.
-
nullable
Whether the column is nullable.- Parameters:
c- column.- Returns:
- "null" | "not null"
-
join
Concatenates strings separated by a space symbol.- Parameters:
ss- strings array for concatenation in form of a free parameter.
-