CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.persistence
Class InputStreamTypeHandlerWithStreams

java.lang.Object
  extended by com.ibatis.sqlmap.engine.type.BaseTypeHandler
      extended by com.intland.codebeamer.persistence.InputStreamTypeHandlerWithStreams
All Implemented Interfaces:
com.ibatis.sqlmap.engine.type.TypeHandler

public class InputStreamTypeHandlerWithStreams
extends com.ibatis.sqlmap.engine.type.BaseTypeHandler
implements com.ibatis.sqlmap.engine.type.TypeHandler

Type handler for loading/storing BlobStreamDto into database. According to the PostgreSQL jdbc documentation this can only use getBytes()/setBytes() and getBinaryStream()/setBinaryStream() to access bytea (its blob). So that class must be an TypeHandler subclass, because the TypeHandlerCallback does not have get/setBinaryStream() methods on ResultGetter class.


Constructor Summary
InputStreamTypeHandlerWithStreams()
           
 
Method Summary
 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, java.lang.String jdbcType)
          Send the stream of the dto, to avoid reading it to memory.
 java.lang.Object valueOf(java.lang.String s)
           
 
Methods inherited from class com.ibatis.sqlmap.engine.type.BaseTypeHandler
equals
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ibatis.sqlmap.engine.type.TypeHandler
equals
 

Constructor Detail

InputStreamTypeHandlerWithStreams

public InputStreamTypeHandlerWithStreams()
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 com.ibatis.sqlmap.engine.type.TypeHandler
Throws:
java.sql.SQLException

getResult

public java.lang.Object getResult(java.sql.ResultSet rs,
                                  int columnIndex)
                           throws java.sql.SQLException
Specified by:
getResult in interface com.ibatis.sqlmap.engine.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 com.ibatis.sqlmap.engine.type.TypeHandler
Throws:
java.sql.SQLException

setParameter

public void setParameter(java.sql.PreparedStatement ps,
                         int i,
                         java.lang.Object parameter,
                         java.lang.String jdbcType)
                  throws java.sql.SQLException
Send the stream of the dto, to avoid reading it to memory.

Specified by:
setParameter in interface com.ibatis.sqlmap.engine.type.TypeHandler
Throws:
java.sql.SQLException

valueOf

public java.lang.Object valueOf(java.lang.String s)
Specified by:
valueOf in interface com.ibatis.sqlmap.engine.type.TypeHandler

CodeBeamer 5.4.0.1-RC API

Copyright © 2006-2009 Intland Software. All rights reserved.