类 SqlTypeMappingManager

java.lang.Object
cn.featherfly.common.db.mapping.SqlTypeMappingManager

public class SqlTypeMappingManager
extends java.lang.Object

SqlTypeMapping

.
  • 字段概要

    字段
    修饰符和类型 字段 说明
    protected org.slf4j.Logger logger
    The logger.
  • 构造器概要

    构造器
    构造器 说明
    SqlTypeMappingManager()
    Instantiates a new sql type mapping manager.
  • 方法概要

    修饰符和类型 方法 说明
    <E> E get​(java.sql.ResultSet rs, int columnIndex, cn.featherfly.common.lang.GenericType<E> javaType)
    Gets the.
    <E> E get​(java.sql.ResultSet rs, java.lang.String columnName, cn.featherfly.common.lang.GenericType<E> javaType)
    Gets the.
    java.sql.SQLType getEnumOrdinalType()
    Gets the enum ordinal type.
    <E> java.lang.Class<E> getJavaType​(java.lang.Class<E> entityType, java.sql.SQLType sqlType)
    Gets the java type.
    <E> java.lang.Class<E> getJavaType​(java.sql.SQLType sqlType)
    Gets the java type.
    <E> java.sql.SQLType getSqlType​(java.lang.Class<E> javaType)
    Gets the sql type.
    <E> java.sql.SQLType getSqlType​(java.lang.Class<E> entityType, java.lang.Class<E> javaType)
    Gets the sql type.
    boolean isEnumWithOrdinal()
    Checks if is enum with ordinal.
    SqlTypeMappingManager regist​(JavaSqlTypeMapper<? extends java.lang.Object> mapper)
    Regist.
    SqlTypeMappingManager regist​(JavaToSqlTypeRegister<? extends java.lang.Object> register)
    Regist.
    SqlTypeMappingManager regist​(SqlTypeToJavaRegister<? extends java.lang.Object> register)
    Regist.
    SqlTypeMappingManager regist​(cn.featherfly.common.lang.GenericType<?> entityType, JavaSqlTypeMapper<? extends java.lang.Object> mapper)
    Regist.
    <E> void set​(java.sql.PreparedStatement prep, int columnIndex, E columnValue)
    Sets the.
    <E> void set​(java.sql.PreparedStatement prep, int columnIndex, E columnValue, cn.featherfly.common.lang.GenericType<E> javaType)
    Sets the.
    void setEnumOrdinalType​(java.sql.SQLType enumOrdinalType)
    Sets the enum ordinal type.
    void setEnumWithOrdinal​(boolean enumWithOrdinal)
    Sets the enum with ordinal.

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • logger

      protected final org.slf4j.Logger logger
      The logger.
  • 构造器详细资料

    • SqlTypeMappingManager

      public SqlTypeMappingManager()
      Instantiates a new sql type mapping manager.
  • 方法详细资料

    • isEnumWithOrdinal

      public boolean isEnumWithOrdinal()
      Checks if is enum with ordinal.
      返回:
      true, if is enum with ordinal
      另请参阅:
      DefaultSqlTypeMapping.isEnumWithOrdinal()
    • setEnumWithOrdinal

      public void setEnumWithOrdinal​(boolean enumWithOrdinal)
      Sets the enum with ordinal.
      参数:
      enumWithOrdinal - the new enum with ordinal
      另请参阅:
      DefaultSqlTypeMapping.setEnumWithOrdinal(boolean)
    • setEnumOrdinalType

      public void setEnumOrdinalType​(java.sql.SQLType enumOrdinalType)
      Sets the enum ordinal type.
      参数:
      enumOrdinalType - the new enum ordinal type
      另请参阅:
      DefaultSqlTypeMapping.setEnumOrdinalType(java.sql.SQLType)
    • getEnumOrdinalType

      public java.sql.SQLType getEnumOrdinalType()
      Gets the enum ordinal type.
      返回:
      the enum ordinal type
      另请参阅:
      DefaultSqlTypeMapping.getEnumOrdinalType()
    • regist

      public SqlTypeMappingManager regist​(JavaToSqlTypeRegister<? extends java.lang.Object> register)
      Regist.
      参数:
      register - the register
      返回:
      SqlTypeMappingManager
    • regist

      public SqlTypeMappingManager regist​(JavaSqlTypeMapper<? extends java.lang.Object> mapper)
      Regist.
      参数:
      mapper - the JavaToSqlTypeMapper
      返回:
      SqlTypeMappingManager
    • regist

      public SqlTypeMappingManager regist​(cn.featherfly.common.lang.GenericType<?> entityType, JavaSqlTypeMapper<? extends java.lang.Object> mapper)
      Regist.
      参数:
      entityType - the entity type
      mapper - the mapper
      返回:
      SqlTypeMappingManager
    • regist

      public SqlTypeMappingManager regist​(SqlTypeToJavaRegister<? extends java.lang.Object> register)
      Regist.
      参数:
      register - the register
      返回:
      SqlTypeMappingManager
    • getSqlType

      public <E> java.sql.SQLType getSqlType​(java.lang.Class<E> javaType)
      Gets the sql type.
      类型参数:
      E - the element type
      参数:
      javaType - the java type
      返回:
      the sql type
    • getSqlType

      public <E> java.sql.SQLType getSqlType​(java.lang.Class<E> entityType, java.lang.Class<E> javaType)
      Gets the sql type.
      类型参数:
      E - the element type
      参数:
      entityType - the entity type
      javaType - the java type
      返回:
      the sql type
    • getJavaType

      public <E> java.lang.Class<E> getJavaType​(java.sql.SQLType sqlType)
      Gets the java type.
      类型参数:
      E - the element type
      参数:
      sqlType - the sql type
      返回:
      the java type
    • getJavaType

      public <E> java.lang.Class<E> getJavaType​(java.lang.Class<E> entityType, java.sql.SQLType sqlType)
      Gets the java type.
      类型参数:
      E - the element type
      参数:
      entityType - the entity type
      sqlType - the sql type
      返回:
      the java type
    • set

      public <E> void set​(java.sql.PreparedStatement prep, int columnIndex, E columnValue)
      Sets the.
      类型参数:
      E - the element type
      参数:
      prep - the prep
      columnIndex - the column index
      columnValue - the column value
    • set

      public <E> void set​(java.sql.PreparedStatement prep, int columnIndex, E columnValue, cn.featherfly.common.lang.GenericType<E> javaType)
      Sets the.
      类型参数:
      E - the element type
      参数:
      prep - the prep
      columnIndex - the column index
      columnValue - the column value
      javaType - the java type
    • get

      public <E> E get​(java.sql.ResultSet rs, int columnIndex, cn.featherfly.common.lang.GenericType<E> javaType)
      Gets the.
      类型参数:
      E - the element type
      参数:
      rs - the rs
      columnIndex - the column index
      javaType - the java type
      返回:
      the e
    • get

      public <E> E get​(java.sql.ResultSet rs, java.lang.String columnName, cn.featherfly.common.lang.GenericType<E> javaType)
      Gets the.
      类型参数:
      E - the element type
      参数:
      rs - the rs
      columnName - the column name
      javaType - the java type
      返回:
      the e