From: <pj...@us...> - 2009-07-24 04:59:07
|
Revision: 6575 http://jython.svn.sourceforge.net/jython/?rev=6575&view=rev Author: pjenvey Date: 2009-07-24 04:58:46 +0000 (Fri, 24 Jul 2009) Log Message: ----------- coding standards/whitespace Modified Paths: -------------- trunk/jython/src/com/ziclix/python/sql/handler/MySQLDataHandler.java Modified: trunk/jython/src/com/ziclix/python/sql/handler/MySQLDataHandler.java =================================================================== --- trunk/jython/src/com/ziclix/python/sql/handler/MySQLDataHandler.java 2009-07-24 04:58:25 UTC (rev 6574) +++ trunk/jython/src/com/ziclix/python/sql/handler/MySQLDataHandler.java 2009-07-24 04:58:46 UTC (rev 6575) @@ -30,49 +30,49 @@ */ public class MySQLDataHandler extends RowIdHandler { - /** - * Decorator for handling MySql specific issues. - * - * @param datahandler the delegate DataHandler - */ - public MySQLDataHandler(DataHandler datahandler) { - super(datahandler); - } + /** + * Decorator for handling MySql specific issues. + * + * @param datahandler the delegate DataHandler + */ + public MySQLDataHandler(DataHandler datahandler) { + super(datahandler); + } - protected String getRowIdMethodName() { - return "getLastInsertID"; - } - - /** - * Handle LONGVARCHAR. - */ - public void setJDBCObject(PreparedStatement stmt, int index, PyObject object, int type) throws SQLException { - - if (DataHandler.checkNull(stmt, index, object, type)) { - return; + @Override + protected String getRowIdMethodName() { + return "getLastInsertID"; } - switch (type) { - - case Types.LONGVARCHAR: - // XXX: Only works with ASCII data! - byte[] bytes; - if (object instanceof PyFile) { - bytes = ((PyFile) object).read().toBytes(); - } else { - String varchar = (String) object.__tojava__(String.class); - bytes = StringUtil.toBytes(varchar); + /** + * Handle LONGVARCHAR. + */ + @Override + public void setJDBCObject(PreparedStatement stmt, int index, PyObject object, int type) + throws SQLException { + if (DataHandler.checkNull(stmt, index, object, type)) { + return; } - InputStream stream = new ByteArrayInputStream(bytes); - stream = new BufferedInputStream(stream); + switch (type) { + case Types.LONGVARCHAR: + // XXX: Only works with ASCII data! + byte[] bytes; + if (object instanceof PyFile) { + bytes = ((PyFile) object).read().toBytes(); + } else { + String varchar = (String) object.__tojava__(String.class); + bytes = StringUtil.toBytes(varchar); + } + InputStream stream = new ByteArrayInputStream(bytes); + stream = new BufferedInputStream(stream); - stmt.setAsciiStream(index, stream, bytes.length); - break; + stmt.setAsciiStream(index, stream, bytes.length); + break; - default : - super.setJDBCObject(stmt, index, object, type); - break; + default : + super.setJDBCObject(stmt, index, object, type); + break; + } } - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |