Package org.ametys.odf.ose.db.column
Class DefaultColumn
java.lang.Object
org.ametys.odf.ose.db.column.DefaultColumn
- All Implemented Interfaces:
Column
- Direct Known Subclasses:
ForeignKeyColumn
The definition of a colum with a name, a SQL type and if it's nullable.
Also, we can define a view column name for the associated SRC_* view.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultColumn
(String name, String type, boolean isNullable) ConstructorDefaultColumn
(String name, String type, boolean isNullable, String viewName) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the column description for creation.Get the view description for the view mapping.Get the parameters
-
Field Details
-
_name
The name -
_type
The SQL type -
_isNullable
Column is nullable ? -
_viewName
The column name in the view
-
-
Constructor Details
-
DefaultColumn
Constructor.- Parameters:
name
- The name of the columntype
- The SQL type of the columnisNullable
-true
if it's nullableviewName
- The name of the column in the associated SRC_* view
-
DefaultColumn
Constructor- Parameters:
name
- The name of the column (it will also be used for the associated SRC_* view)type
- The SQL type of the columnisNullable
-true
if it's nullable
-
-
Method Details
-
getColumnDescription
Description copied from interface:Column
Get the column description for creation.- Specified by:
getColumnDescription
in interfaceColumn
- Returns:
- The column description
-
getViewDescription
Description copied from interface:Column
Get the view description for the view mapping.- Specified by:
getViewDescription
in interfaceColumn
- Returns:
- The column description for a view
-
getViewParameters
Description copied from interface:Column
Get the parameters- Specified by:
getViewParameters
in interfaceColumn
- Returns:
- the parameters to create the view
-