Class 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?

    • Constructor Detail

      • QuerydslInstantType

        public QuerydslInstantType()
    • Method Detail

      • 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