Class ByteArrayTypeHandler

  • All Implemented Interfaces:
    org.apache.ibatis.type.TypeHandler

    public class ByteArrayTypeHandler
    extends java.lang.Object
    implements org.apache.ibatis.type.TypeHandler
    MyBatis 3.x TypeHandler for _byte[] to BLOB types.
    Since:
    5.0
    Author:
    sglover
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object getResult​(java.sql.CallableStatement cs, int columnIndex)  
      java.lang.Object getResult​(java.sql.ResultSet rs, int columnIndex)  
      java.lang.Object getResult​(java.sql.ResultSet rs, java.lang.String columnName)  
      void setParameter​(java.sql.PreparedStatement ps, int i, java.lang.Object parameter, org.apache.ibatis.type.JdbcType jdbcType)  
      java.lang.Object valueOf​(java.lang.String s)  
      • Methods inherited from class java.lang.Object

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

      • ByteArrayTypeHandler

        public ByteArrayTypeHandler()
    • Method Detail

      • getResult

        public java.lang.Object getResult​(java.sql.ResultSet rs,
                                          java.lang.String columnName)
                                   throws java.sql.SQLException
        Specified by:
        getResult in interface org.apache.ibatis.type.TypeHandler
        Throws:
        ByteArrayTypeHandler.DeserializationException - if the object could not be deserialized
        java.sql.SQLException
      • getResult

        public java.lang.Object getResult​(java.sql.ResultSet rs,
                                          int columnIndex)
                                   throws java.sql.SQLException
        Specified by:
        getResult in interface org.apache.ibatis.type.TypeHandler
        Throws:
        java.sql.SQLException
      • setParameter

        public void setParameter​(java.sql.PreparedStatement ps,
                                 int i,
                                 java.lang.Object parameter,
                                 org.apache.ibatis.type.JdbcType jdbcType)
                          throws java.sql.SQLException
        Specified by:
        setParameter in interface org.apache.ibatis.type.TypeHandler
        Throws:
        java.sql.SQLException
      • getResult

        public java.lang.Object getResult​(java.sql.CallableStatement cs,
                                          int columnIndex)
                                   throws java.sql.SQLException
        Specified by:
        getResult in interface org.apache.ibatis.type.TypeHandler
        Throws:
        java.sql.SQLException
      • valueOf

        public java.lang.Object valueOf​(java.lang.String s)
        Returns:
        Returns the value given