org.melati.poem
Class FixedPointAtomPoemType
java.lang.Object
org.melati.poem.BasePoemType<T>
org.melati.poem.AtomPoemType
org.melati.poem.FixedPointAtomPoemType
- All Implemented Interfaces:
- Cloneable, PoemType, SQLPoemType, SQLType
- Direct Known Subclasses:
- BigDecimalPoemType
public abstract class FixedPointAtomPoemType
- extends AtomPoemType
An extension of AtomPoemType
which adds precision
and scale
.
Methods inherited from class org.melati.poem.BasePoemType |
_assertValidRaw, _canRepresent, _getRaw, _possibleRaws, _rawOfString, _saveColumnInfo, _setRaw, assertValidCooked, assertValidRaw, canRepresent, clone, cookedOfRaw, getLimitRaw, getLowRaw, getNullable, getRaw, possibleRaws, quotedRaw, rawOfCooked, rawOfString, saveColumnInfo, setRaw, setRawRange, sqlDefinition, sqlTypeCode, sqlTypeDefinition, stringOfCooked, stringOfRaw, toString, withNullable |
FixedPointAtomPoemType
public FixedPointAtomPoemType(int sqlTypeCode,
String sqlTypeName,
boolean nullable,
int precision,
int scale)
- Constructor.
- Parameters:
sqlTypeCode
- from TypessqlTypeName
- name of sql typenullable
- whether nulls are allowable valuesprecision
- how many places to the left of decimal pointscale
- howmany places to right of decimal point
getTotalSize
public int getTotalSize()
- Returns:
- precision plus scale
withPrecisionAndScale
public FixedPointAtomPoemType withPrecisionAndScale(int newPrecision,
int newScale)
- Parameters:
newPrecision
- required precisionnewScale
- required scale
- Returns:
- this or a clone with new values
getPrecision
public int getPrecision()
- Returns:
- the value of the precision property
getScale
public int getScale()
- Returns:
- the value of the scale property
setPrecision
public void setPrecision(int newPrecision)
- Parameters:
newPrecision
- precision to set
setScale
public void setScale(int newScale)
- Parameters:
newScale
- scale to set
Copyright © 2000-2010 PanEris. All Rights Reserved.