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
public class DefaultColumn extends Object implements Column
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.
-
-
Constructor Summary
Constructors Constructor Description DefaultColumn(String name, String type, boolean isNullable)
ConstructorDefaultColumn(String name, String type, boolean isNullable, String viewName)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getColumnDescription()
Get the column description for creation.String
getViewDescription()
Get the view description for the view mapping.List<ValuedQueryParameter>
getViewParameters()
Get the parameters
-
-
-
Constructor Detail
-
DefaultColumn
public DefaultColumn(String name, String type, boolean isNullable, String viewName)
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
public DefaultColumn(String name, String type, boolean isNullable)
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 Detail
-
getColumnDescription
public String getColumnDescription()
Description copied from interface:Column
Get the column description for creation.- Specified by:
getColumnDescription
in interfaceColumn
- Returns:
- The column description
-
getViewDescription
public String 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
public List<ValuedQueryParameter> getViewParameters()
Description copied from interface:Column
Get the parameters- Specified by:
getViewParameters
in interfaceColumn
- Returns:
- the parameters to create the view
-
-