public final class CommitTimestamp extends Object
of(Class)
should be used to resolve a specific value of a pointed class
which is converted then to the Value.COMMIT_TIMESTAMP
by CommitTimestamp.CommitTimestampDecorator
.
It should be used when a database column has type of Timestamp with an option "allow_commit_timestamp"
and the business logic needs to manage in runtime when the PENDING_COMMIT_TIMESTAMP should be stored into this field.Modifier and Type | Class and Description |
---|---|
static class |
CommitTimestamp.CommitTimestampDecorator<S>
A specific decorator of the "to timestamp" function that any custom converter should follow
to support "CommitTimestamp" feature.
|
Modifier and Type | Method and Description |
---|---|
static <T> T |
of(Class<T> timestampClass)
Creates a value for
Value.COMMIT_TIMESTAMP . |
public static <T> T of(Class<T> timestampClass) throws IllegalArgumentException
Value.COMMIT_TIMESTAMP
.T
- type of the class. Supported by-default types are:
Timestamp
, Timestamp
, LocalDateTime
,
Instant
, Date
.timestampClass
- a class to be presented as a Timestamp in the database column.Value.COMMIT_TIMESTAMP
by SpannerConverters
IllegalArgumentException
- when the timestampClass
was not registered
with the method register(C)
.register(C)
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.