public abstract class AbstractValueEncoder extends java.lang.Object implements ValueEncoder
| Modifier and Type | Field and Description |
|---|---|
protected RuntimeProperty<java.lang.String> |
charEncoding |
protected ExceptionInterceptor |
exceptionInterceptor |
protected RuntimeProperty<java.lang.Boolean> |
preserveInstants |
protected PropertySet |
propertySet |
protected RuntimeProperty<java.lang.Boolean> |
sendFractionalSeconds |
protected RuntimeProperty<java.lang.Boolean> |
sendFractionalSecondsForTime |
protected ServerSession |
serverSession |
| Constructor and Description |
|---|
AbstractValueEncoder() |
| Modifier and Type | Method and Description |
|---|---|
protected java.time.Duration |
adjustDuration(java.time.Duration x,
Field f) |
protected java.time.LocalDateTime |
adjustLocalDateTime(java.time.LocalDateTime x,
Field f) |
protected java.time.LocalTime |
adjustLocalTime(java.time.LocalTime x,
Field f) |
protected java.sql.Time |
adjustTime(java.sql.Time x) |
protected java.sql.Timestamp |
adjustTimestamp(java.sql.Timestamp x,
Field f,
boolean keepOrigNanos) |
void |
encodeAsQueryAttribute(Message msg,
BindValue binding) |
void |
encodeAsText(Message msg,
BindValue binding) |
protected byte[] |
escapeBytesIfNeeded(byte[] x) |
long |
getBinaryLength(BindValue binding) |
byte[] |
getBytes(BindValue binding) |
protected java.math.BigDecimal |
getScaled(java.math.BigDecimal x,
long scaleOrLength) |
long |
getTextLength(BindValue binding) |
void |
init(PropertySet pset,
ServerSession serverSess,
ExceptionInterceptor excInterceptor) |
protected void |
writeDate(Message msg,
InternalDate d) |
protected void |
writeDateTime(Message msg,
InternalTimestamp ts) |
void |
writeDateTimeWithOffset(Message msg,
InternalTimestamp timestamp) |
protected void |
writeTime(Message msg,
InternalTime time) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencodeAsBinary, getStringprotected PropertySet propertySet
protected ServerSession serverSession
protected ExceptionInterceptor exceptionInterceptor
protected RuntimeProperty<java.lang.String> charEncoding
protected RuntimeProperty<java.lang.Boolean> sendFractionalSeconds
protected RuntimeProperty<java.lang.Boolean> sendFractionalSecondsForTime
protected RuntimeProperty<java.lang.Boolean> preserveInstants
public void init(PropertySet pset, ServerSession serverSess, ExceptionInterceptor excInterceptor)
init in interface ValueEncoderpublic byte[] getBytes(BindValue binding)
getBytes in interface ValueEncoderpublic void encodeAsText(Message msg, BindValue binding)
encodeAsText in interface ValueEncoderpublic void encodeAsQueryAttribute(Message msg, BindValue binding)
encodeAsQueryAttribute in interface ValueEncoderprotected java.math.BigDecimal getScaled(java.math.BigDecimal x,
long scaleOrLength)
protected java.time.LocalTime adjustLocalTime(java.time.LocalTime x,
Field f)
protected java.time.LocalDateTime adjustLocalDateTime(java.time.LocalDateTime x,
Field f)
protected java.time.Duration adjustDuration(java.time.Duration x,
Field f)
protected java.sql.Timestamp adjustTimestamp(java.sql.Timestamp x,
Field f,
boolean keepOrigNanos)
protected java.sql.Time adjustTime(java.sql.Time x)
protected void writeDate(Message msg, InternalDate d)
protected void writeTime(Message msg, InternalTime time)
protected void writeDateTime(Message msg, InternalTimestamp ts)
public void writeDateTimeWithOffset(Message msg, InternalTimestamp timestamp)
protected byte[] escapeBytesIfNeeded(byte[] x)
public long getTextLength(BindValue binding)
getTextLength in interface ValueEncoderpublic long getBinaryLength(BindValue binding)
getBinaryLength in interface ValueEncoder