Package ru.curs.celesta.score
Class Column<V>
java.lang.Object
ru.curs.celesta.score.NamedElement
ru.curs.celesta.score.Column<V>
- Type Parameters:
V- Java class of column value
- All Implemented Interfaces:
ColumnMeta<V>
- Direct Known Subclasses:
BinaryColumn,BooleanColumn,DateTimeColumn,DecimalColumn,FloatingColumn,IntegerColumn,StringColumn,ZonedDateTimeColumn
Base class for describing a table column. Subclasses of this class correspond
to different column types.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ru.curs.celesta.score.ColumnMeta
ColumnMeta.Ordering -
Field Summary
Fields inherited from class ru.curs.celesta.score.NamedElement
MAX_IDENTIFIER_LENGTH -
Method Summary
Modifier and TypeMethodDescriptionfinal voiddelete()Deletes the column.abstract StringDEFAULT value of the field in CelestaSQL language.abstract VReturns default value.Returns options (the value ofoptionproperty) for current field.final TableElementReturns table that current column belongs to.final booleanReturns the value of Nullable property.final voidsetNullableAndDefault(boolean nullable, String defaultValue) Sets property Nullable and default value.toString()Methods inherited from class ru.curs.celesta.score.NamedElement
equals, getCelestaDoc, getName, getQuotedName, getQuotedNameIfNeeded, hashCode, limitName, limitName, setCelestaDocMethods inherited from interface ru.curs.celesta.score.ColumnMeta
asc, desc, getCelestaDoc, getCelestaType, getJavaClass, getName, jdbcGetterName, ordering
-
Method Details
-
getOptions
Returns options (the value ofoptionproperty) for current field. It is applicable only for text and Integer fields.- Throws:
CelestaException- in case if options are provided incorrectly.
-
toString
-
getParentTable
Returns table that current column belongs to. -
setNullableAndDefault
public final void setNullableAndDefault(boolean nullable, String defaultValue) throws ParseException Sets property Nullable and default value.- Parameters:
nullable- property NullabledefaultValue- default value- Throws:
ParseException- in case if DEFAULT value has an incorrect format.
-
isNullable
public final boolean isNullable()Returns the value of Nullable property.- Specified by:
isNullablein interfaceColumnMeta<V>- Returns:
-
delete
Deletes the column.- Throws:
ParseException- if a part of the primary key, or a foreign key, or an index is being deleted.
-
getDefaultValue
Returns default value. -
getCelestaDefault
DEFAULT value of the field in CelestaSQL language.
-