public class DateParameter extends java.lang.Object implements java.lang.Cloneable, ParameterHolder
Modifier and Type | Field and Description |
---|---|
private java.sql.Date |
date |
private Options |
options |
private java.util.TimeZone |
timeZone |
BINARY_INTRODUCER, QUOTE
Constructor and Description |
---|
DateParameter(java.sql.Date date,
java.util.TimeZone timeZone,
Options options)
Represents a date, constructed with time in millis since epoch.
|
Modifier and Type | Method and Description |
---|---|
private byte[] |
dateByteFormat() |
long |
getApproximateTextProtocolLength() |
ColumnType |
getColumnType() |
boolean |
isLongData() |
boolean |
isNullData() |
java.lang.String |
toString() |
void |
writeBinary(PacketOutputStream pos)
Write data to socket in binary format.
|
void |
writeTo(PacketOutputStream os)
Write to server OutputStream in text protocol.
|
private final java.sql.Date date
private final java.util.TimeZone timeZone
private final Options options
public DateParameter(java.sql.Date date, java.util.TimeZone timeZone, Options options)
date
- the datetimeZone
- timezone to useoptions
- jdbc optionspublic void writeTo(PacketOutputStream os) throws java.io.IOException
writeTo
in interface ParameterHolder
os
- output bufferjava.io.IOException
- when something goes wrongprivate byte[] dateByteFormat()
public long getApproximateTextProtocolLength()
getApproximateTextProtocolLength
in interface ParameterHolder
public void writeBinary(PacketOutputStream pos) throws java.io.IOException
writeBinary
in interface ParameterHolder
pos
- socket output streamjava.io.IOException
- if socket error occurpublic ColumnType getColumnType()
getColumnType
in interface ParameterHolder
public java.lang.String toString()
toString
in interface ParameterHolder
toString
in class java.lang.Object
public boolean isNullData()
isNullData
in interface ParameterHolder
public boolean isLongData()
isLongData
in interface ParameterHolder