Package ru.curs.celesta.score
Class DecimalColumn
- All Implemented Interfaces:
ColumnMeta<BigDecimal>
Column with a fixed decimal point type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ru.curs.celesta.score.ColumnMeta
ColumnMeta.Ordering -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCelesta type of the column data.static final intMaximum possible precision of a decimal column.Fields inherited from class ru.curs.celesta.score.NamedElement
MAX_IDENTIFIER_LENGTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDEFAULT value of the field in CelestaSQL language.Celesta data type that corresponds to the field.Returns default value.Class<?> Returns corresponding Java data type.intReturns precision.intgetScale()Returns scale.Name of jdbcGetter that should be used for getting column data.voidsetPrecision(int precision) Sets precision.voidsetScale(int scale) Sets scale.Methods inherited from class ru.curs.celesta.score.Column
delete, getOptions, getParentTable, isNullable, setNullableAndDefault, toStringMethods 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, getName, ordering
-
Field Details
-
MAX_PRECISION
public static final int MAX_PRECISIONMaximum possible precision of a decimal column.(currently limited by MS SQL)
- See Also:
-
CELESTA_TYPE
Celesta type of the column data.- See Also:
-
-
Constructor Details
-
DecimalColumn
public DecimalColumn(TableElement table, String name, int precision, int scale) throws ParseException - Throws:
ParseException
-
-
Method Details
-
getDefaultValue
Description copied from class:ColumnReturns default value.- Specified by:
getDefaultValuein classColumn<BigDecimal>
-
getCelestaDefault
Description copied from class:ColumnDEFAULT value of the field in CelestaSQL language.- Specified by:
getCelestaDefaultin classColumn<BigDecimal>
-
jdbcGetterName
Description copied from interface:ColumnMetaName of jdbcGetter that should be used for getting column data.- Returns:
-
getCelestaType
Description copied from interface:ColumnMetaCelesta data type that corresponds to the field.- Returns:
-
getJavaClass
Description copied from interface:ColumnMetaReturns corresponding Java data type.- Returns:
-
getPrecision
public int getPrecision()Returns precision.- Returns:
-
setPrecision
public void setPrecision(int precision) Sets precision.- Parameters:
precision- precision
-
getScale
public int getScale()Returns scale.- Returns:
-
setScale
public void setScale(int scale) Sets scale.- Parameters:
scale- scale
-