Class QuerydslInstantType

java.lang.Object
com.querydsl.sql.types.AbstractType<T>
com.querydsl.sql.types.AbstractDateTimeType<T>
com.querydsl.sql.types.AbstractJSR310DateTimeType<Instant>
com.querydsl.sql.types.JSR310InstantType
com.evolveum.midpoint.repo.sqlbase.querydsl.QuerydslInstantType
All Implemented Interfaces:
com.querydsl.sql.types.Type<Instant>

public class QuerydslInstantType extends com.querydsl.sql.types.JSR310InstantType
Instant converter for Querydsl. Just like the superclass, but does NOT use calendar parameter for get/set values.

It is important to use one version consistently, if mixing prepared statements using version with and without calendar parameter, results can be off by default timezone offset. This works for us using JDBC - the question is: What method is used by ORM/JPA?

  • Field Summary

    Fields inherited from class com.querydsl.sql.types.AbstractDateTimeType

    dateFormatter, dateTimeFormatter, timeFormatter
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Instant
    getValue(ResultSet rs, int startIndex)
     
    void
    setValue(PreparedStatement st, int startIndex, Instant value)
     

    Methods inherited from class com.querydsl.sql.types.JSR310InstantType

    getLiteral, getReturnedClass

    Methods inherited from class com.querydsl.sql.types.AbstractDateTimeType

    utc

    Methods inherited from class com.querydsl.sql.types.AbstractType

    getSQLTypes

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QuerydslInstantType

      public QuerydslInstantType()
  • Method Details

    • getValue

      @Nullable public @Nullable Instant getValue(ResultSet rs, int startIndex) throws SQLException
      Specified by:
      getValue in interface com.querydsl.sql.types.Type<Instant>
      Overrides:
      getValue in class com.querydsl.sql.types.JSR310InstantType
      Throws:
      SQLException
    • setValue

      public void setValue(PreparedStatement st, int startIndex, Instant value) throws SQLException
      Specified by:
      setValue in interface com.querydsl.sql.types.Type<Instant>
      Overrides:
      setValue in class com.querydsl.sql.types.JSR310InstantType
      Throws:
      SQLException