Package ru.curs.celesta.score
Class DecimalColumn
- java.lang.Object
-
- ru.curs.celesta.score.NamedElement
-
- ru.curs.celesta.score.Column<BigDecimal>
-
- ru.curs.celesta.score.DecimalColumn
-
- All Implemented Interfaces:
ColumnMeta<BigDecimal>
public final class DecimalColumn extends Column<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
Fields Modifier and Type Field Description static StringCELESTA_TYPECelesta type of the column data.static intMAX_PRECISIONMaximum possible precision of a decimal column.-
Fields inherited from class ru.curs.celesta.score.NamedElement
MAX_IDENTIFIER_LENGTH
-
-
Constructor Summary
Constructors Constructor Description DecimalColumn(TableElement table, String name, int precision, int scale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCelestaDefault()DEFAULT value of the field in CelestaSQL language.StringgetCelestaType()Celesta data type that corresponds to the field.BigDecimalgetDefaultValue()Returns default value.Class<?>getJavaClass()Returns corresponding Java data type.intgetPrecision()Returns precision.intgetScale()Returns scale.StringjdbcGetterName()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, toString
-
Methods inherited from class ru.curs.celesta.score.NamedElement
equals, getCelestaDoc, getName, getQuotedName, getQuotedNameIfNeeded, hashCode, limitName, limitName, setCelestaDoc
-
Methods inherited from interface ru.curs.celesta.score.ColumnMeta
asc, desc, getCelestaDoc, getName, ordering
-
-
-
-
Field Detail
-
MAX_PRECISION
public static final int MAX_PRECISION
Maximum possible precision of a decimal column.(currently limited by MS SQL)
- See Also:
- Constant Field Values
-
CELESTA_TYPE
public static final String CELESTA_TYPE
Celesta type of the column data.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DecimalColumn
public DecimalColumn(TableElement table, String name, int precision, int scale) throws ParseException
- Throws:
ParseException
-
-
Method Detail
-
getDefaultValue
public BigDecimal getDefaultValue()
Description copied from class:ColumnReturns default value.- Specified by:
getDefaultValuein classColumn<BigDecimal>
-
getCelestaDefault
public String getCelestaDefault()
Description copied from class:ColumnDEFAULT value of the field in CelestaSQL language.- Specified by:
getCelestaDefaultin classColumn<BigDecimal>
-
jdbcGetterName
public String jdbcGetterName()
Description copied from interface:ColumnMetaName of jdbcGetter that should be used for getting column data.- Returns:
-
getCelestaType
public String getCelestaType()
Description copied from interface:ColumnMetaCelesta data type that corresponds to the field.- Returns:
-
getJavaClass
public Class<?> 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
-
-