public class SqlTimestampCodec extends AbstractCodec<Timestamp> implements com.datastax.oss.driver.api.core.type.codec.TypeCodec<Timestamp>
DataTypes.TIMESTAMP and the Java type Timestamp.| Modifier and Type | Field and Description |
|---|---|
static DateTimeFormatter |
DEFAULT_TIMESTAMP_FORMAT
The default timestamp format used by the method
formatNonNull(Timestamp). |
| Constructor and Description |
|---|
SqlTimestampCodec()
Constructor for
SqlTimestampCodec. |
| Modifier and Type | Method and Description |
|---|---|
Timestamp |
decode(ByteBuffer bytes,
com.datastax.oss.driver.api.core.ProtocolVersion protocolVersion) |
ByteBuffer |
encode(Timestamp value,
com.datastax.oss.driver.api.core.ProtocolVersion protocolVersion) |
com.datastax.oss.driver.api.core.type.DataType |
getCqlType() |
com.datastax.oss.driver.api.core.type.reflect.GenericType<Timestamp> |
getJavaType() |
format, parsepublic static final DateTimeFormatter DEFAULT_TIMESTAMP_FORMAT
formatNonNull(Timestamp).@Nonnull public com.datastax.oss.driver.api.core.type.reflect.GenericType<Timestamp> getJavaType()
getJavaType in interface com.datastax.oss.driver.api.core.type.codec.TypeCodec<Timestamp>@Nonnull public com.datastax.oss.driver.api.core.type.DataType getCqlType()
getCqlType in interface com.datastax.oss.driver.api.core.type.codec.TypeCodec<Timestamp>public ByteBuffer encode(Timestamp value, @Nonnull com.datastax.oss.driver.api.core.ProtocolVersion protocolVersion)
encode in interface com.datastax.oss.driver.api.core.type.codec.TypeCodec<Timestamp>public Timestamp decode(ByteBuffer bytes, @Nonnull com.datastax.oss.driver.api.core.ProtocolVersion protocolVersion)
decode in interface com.datastax.oss.driver.api.core.type.codec.TypeCodec<Timestamp>Copyright © 2020–2026 ING Bank. All rights reserved.