Enum Class CassandraJsr310Converters.DateToInstantConverter

java.lang.Object
java.lang.Enum<CassandraJsr310Converters.DateToInstantConverter>
org.springframework.data.cassandra.core.convert.CassandraJsr310Converters.DateToInstantConverter
All Implemented Interfaces:
Serializable, Comparable<CassandraJsr310Converters.DateToInstantConverter>, Constable, org.springframework.core.convert.converter.Converter<Date,Instant>
Enclosing class:
CassandraJsr310Converters

@WritingConverter public static enum CassandraJsr310Converters.DateToInstantConverter extends Enum<CassandraJsr310Converters.DateToInstantConverter> implements org.springframework.core.convert.converter.Converter<Date,Instant>
Simple singleton to convert Dates to their Cassandra Instant representation for the CQL Timestamp type. Used for Cassandra 3.x to 4.x driver migration where
Since:
3.0
  • Enum Constant Details

  • Method Details

    • values

      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • convert

      public Instant convert(Date source)
      Specified by:
      convert in interface org.springframework.core.convert.converter.Converter<Date,Instant>