org.drizzle.jdbc.internal.common
Class AbstractValueObject
java.lang.Object
org.drizzle.jdbc.internal.common.AbstractValueObject
- All Implemented Interfaces:
- ValueObject
- Direct Known Subclasses:
- DrizzleValueObject, GeneratedIdValueObject, MySQLValueObject
public abstract class AbstractValueObject
- extends java.lang.Object
- implements ValueObject
Created by IntelliJ IDEA. User: marcuse Date: Jun 10, 2009 Time: 4:13:03 PM To change this template use File |
Settings | File Templates.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataType
protected final DataType dataType
AbstractValueObject
protected AbstractValueObject(byte[] rawBytes,
DataType dataType)
getString
public java.lang.String getString()
- Specified by:
getString in interface ValueObject
getLong
public long getLong()
- Specified by:
getLong in interface ValueObject
getInt
public int getInt()
- Specified by:
getInt in interface ValueObject
getShort
public short getShort()
- Specified by:
getShort in interface ValueObject
getByte
public byte getByte()
- Specified by:
getByte in interface ValueObject
getBytes
public byte[] getBytes()
- Specified by:
getBytes in interface ValueObject
getFloat
public float getFloat()
- Specified by:
getFloat in interface ValueObject
getDouble
public double getDouble()
- Specified by:
getDouble in interface ValueObject
getBigDecimal
public java.math.BigDecimal getBigDecimal()
- Specified by:
getBigDecimal in interface ValueObject
getBigInteger
public java.math.BigInteger getBigInteger()
- Specified by:
getBigInteger in interface ValueObject
getDate
public java.sql.Date getDate()
throws java.text.ParseException
- Specified by:
getDate in interface ValueObject
- Throws:
java.text.ParseException
getTime
public java.sql.Time getTime()
throws java.text.ParseException
- Since drizzle has no TIME datatype, JDBC Time is stored in a packed integer
- Specified by:
getTime in interface ValueObject
- Returns:
- the time
- Throws:
java.text.ParseException- See Also:
Utils.packTime(long),
Utils.unpackTime(int)
getTimestamp
public java.sql.Timestamp getTimestamp()
throws java.text.ParseException
- Specified by:
getTimestamp in interface ValueObject
- Throws:
java.text.ParseException
getInputStream
public java.io.InputStream getInputStream()
- Specified by:
getInputStream in interface ValueObject
getBinaryInputStream
public java.io.InputStream getBinaryInputStream()
- Specified by:
getBinaryInputStream in interface ValueObject
getObject
public abstract java.lang.Object getObject()
throws java.text.ParseException
- Specified by:
getObject in interface ValueObject
- Throws:
java.text.ParseException
getDate
public java.sql.Date getDate(java.util.Calendar cal)
throws java.text.ParseException
- Specified by:
getDate in interface ValueObject
- Throws:
java.text.ParseException
getTime
public java.sql.Time getTime(java.util.Calendar cal)
- Specified by:
getTime in interface ValueObject
getTimestamp
public java.sql.Timestamp getTimestamp(java.util.Calendar cal)
throws java.text.ParseException
- Specified by:
getTimestamp in interface ValueObject
- Throws:
java.text.ParseException
getBoolean
public boolean getBoolean()
- Specified by:
getBoolean in interface ValueObject
isNull
public boolean isNull()
- Specified by:
isNull in interface ValueObject
getDisplayLength
public int getDisplayLength()
- Specified by:
getDisplayLength in interface ValueObject
getPBMSStream
public java.io.InputStream getPBMSStream(Protocol protocol)
throws QueryException,
java.io.IOException
- Specified by:
getPBMSStream in interface ValueObject
- Throws:
QueryException
java.io.IOException
Copyright © 2012. All Rights Reserved.