com.intland.codebeamer.persistence
Class InputStreamTypeHandlerWithStreams
java.lang.Object
com.ibatis.sqlmap.engine.type.BaseTypeHandler
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.
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 |
InputStreamTypeHandlerWithStreams
public InputStreamTypeHandlerWithStreams()
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
Copyright © 2006-2009 Intland Software. All rights reserved.