Class EnumByOrdinalType<T extends Enum<T>>

java.lang.Object
com.querydsl.sql.types.AbstractType<T>
com.querydsl.sql.types.EnumByOrdinalType<T>
Type Parameters:
T -
All Implemented Interfaces:
Type<T>

public class EnumByOrdinalType<T extends Enum<T>> extends AbstractType<T>
EnumByOrdinalType maps Enum types to their Integer ordinals on the JDBC level
Author:
tiwe
  • Constructor Details

    • EnumByOrdinalType

      public EnumByOrdinalType(Class<T> type)
    • EnumByOrdinalType

      public EnumByOrdinalType(int jdbcType, Class<T> type)
  • Method Details

    • getReturnedClass

      public Class<T> getReturnedClass()
      Description copied from interface: Type
      Get the returned type
      Returns:
      returned class
    • getValue

      public T getValue(ResultSet rs, int startIndex) throws SQLException
      Description copied from interface: Type
      Get the object from the result set
      Parameters:
      rs - result set
      startIndex - column index in result set
      Returns:
      value
      Throws:
      SQLException
    • setValue

      public void setValue(PreparedStatement st, int startIndex, T value) throws SQLException
      Description copied from interface: Type
      Set the object to the statement
      Parameters:
      st - statement
      startIndex - column index in statement
      value - value to be set
      Throws:
      SQLException