Package com.nuodb.jdbc
Class Value
- java.lang.Object
-
- com.nuodb.jdbc.Value
-
- All Implemented Interfaces:
TimeValues
- Direct Known Subclasses:
ValueArray,ValueBlob,ValueBoolean,ValueByte,ValueBytes,ValueClob,ValueDate,ValueDouble,ValueInt,ValueLong,ValueNull,ValueNumber,ValueShort,ValueStream,ValueString,ValueTime,ValueTimestamp
public abstract class Value extends Object implements TimeValues
-
-
Field Summary
Fields Modifier and Type Field Description static intAsciiblobstatic intBinaryblobstatic intBlobPtrstatic intClobPtrstatic intNullstatic inttypeArbitrarydecimalstatic inttypeArraystatic inttypeBinCharstatic inttypeBooleanstatic inttypeBytesstatic inttypeCharstatic inttypeDatestatic inttypeDoublestatic inttypeFloatstatic inttypeIntstatic inttypeLongstatic inttypeNumberstatic inttypeShortstatic inttypeSqlTimestampstatic inttypeStreamstatic inttypeStringstatic inttypeTimestampstatic inttypeTimeTypestatic inttypeVarBinCharstatic intVarchar-
Fields inherited from interface com.nuodb.jdbc.TimeValues
MILLISECONDS_PER_DAY, MILLISECONDS_PER_HOUR, MILLISECONDS_PER_MINUTE, MILLISECONDS_SCALE, NANOSECONDS_SCALE, SECONDS_PER_DAY, SECONDS_PER_HOUR, SECONDS_PER_MINUTE, SECONDS_SCALE
-
-
Constructor Summary
Constructors Constructor Description Value()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InputStreamgetAsciiStream(SQLContext context)abstract byte[]getBytes()ReadergetCharacterStream(SQLContext context)InputStreamgetInputStream()RefgetRef(TypeInfo typeInfo)static StringgetString(long value, int scale)static StringgetString(long value, int scale, int numZeroes)static longreScale(long number, int fromScale, int toScale)change the scale of the given long value
-
-
-
Field Detail
-
Null
public static final int Null
- See Also:
- Constant Field Values
-
typeString
public static final int typeString
- See Also:
- Constant Field Values
-
typeChar
public static final int typeChar
- See Also:
- Constant Field Values
-
Varchar
public static final int Varchar
- See Also:
- Constant Field Values
-
typeShort
public static final int typeShort
- See Also:
- Constant Field Values
-
typeInt
public static final int typeInt
- See Also:
- Constant Field Values
-
typeLong
public static final int typeLong
- See Also:
- Constant Field Values
-
typeFloat
public static final int typeFloat
- See Also:
- Constant Field Values
-
typeDouble
public static final int typeDouble
- See Also:
- Constant Field Values
-
typeDate
public static final int typeDate
- See Also:
- Constant Field Values
-
typeTimestamp
public static final int typeTimestamp
- See Also:
- Constant Field Values
-
typeTimeType
public static final int typeTimeType
- See Also:
- Constant Field Values
-
Asciiblob
public static final int Asciiblob
- See Also:
- Constant Field Values
-
Binaryblob
public static final int Binaryblob
- See Also:
- Constant Field Values
-
BlobPtr
public static final int BlobPtr
- See Also:
- Constant Field Values
-
typeSqlTimestamp
public static final int typeSqlTimestamp
- See Also:
- Constant Field Values
-
ClobPtr
public static final int ClobPtr
- See Also:
- Constant Field Values
-
typeArbitrarydecimal
public static final int typeArbitrarydecimal
- See Also:
- Constant Field Values
-
typeNumber
public static final int typeNumber
- See Also:
- Constant Field Values
-
typeBytes
public static final int typeBytes
- See Also:
- Constant Field Values
-
typeBinChar
public static final int typeBinChar
- See Also:
- Constant Field Values
-
typeVarBinChar
public static final int typeVarBinChar
- See Also:
- Constant Field Values
-
typeBoolean
public static final int typeBoolean
- See Also:
- Constant Field Values
-
typeStream
public static final int typeStream
- See Also:
- Constant Field Values
-
typeArray
public static final int typeArray
- See Also:
- Constant Field Values
-
-
Method Detail
-
getString
public static String getString(long value, int scale)
-
getString
public static String getString(long value, int scale, int numZeroes)
-
getInputStream
public InputStream getInputStream() throws SQLException
- Throws:
SQLException
-
getBytes
public abstract byte[] getBytes() throws SQLException- Throws:
SQLException
-
getAsciiStream
public InputStream getAsciiStream(SQLContext context) throws SQLException
- Throws:
SQLException
-
getCharacterStream
public Reader getCharacterStream(SQLContext context) throws SQLException
- Throws:
SQLException
-
reScale
public static long reScale(long number, int fromScale, int toScale)change the scale of the given long value- Parameters:
number- the number to rescalefromScale- the current scaletoScale- desired scale- Returns:
- a scaled number
-
-