svn commit: r677191 - /ibatis/tags/java_release_2.3.3-720/
Author: cbegin Date: Wed Jul 16 01:20:46 2008 New Revision: 677191 URL: http://svn.apache.org/viewvc?rev=677191&view=rev Log: Release 2.3.3 build 720 Added: ibatis/tags/java_release_2.3.3-720/ - copied from r677190, ibatis/trunk/java/mapper/mapper2/
svn commit: r677189 - in /ibatis/trunk/java/mapper/mapper2: build/version.properties doc/release.txt test/com/ibatis/common/beans/ComplexBeanProbeTest.java
Author: cbegin Date: Wed Jul 16 01:11:28 2008 New Revision: 677189 URL: http://svn.apache.org/viewvc?rev=677189&view=rev Log: updated docs and version. fixed test bug Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/doc/release.txt ibatis/trunk/java/mapper/mapper2/test/com/ibatis/common/beans/ComplexBeanProbeTest.java Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?rev=677189&r1=677188&r2=677189&view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Wed Jul 16 01:11:28 2008 @@ -1,5 +1,5 @@ #Build version info -#Tue Jul 15 12:18:36 MDT 2008 -version=2.3.2 -buildDate=2008/07/15 12\:18 -buildNum=716 +#Wed Jul 16 02:06:22 MDT 2008 +version=2.3.3 +buildDate=2008/07/16 02\:06 +buildNum=720 Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=677189&r1=677188&r2=677189&view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Wed Jul 16 01:11:28 2008 @@ -2,6 +2,17 @@ Build Number: @buildNum@ -- + 2.3.3 +-- + + o Reintroduced fully defined ExtendedSqlMapClient interface for Spring compatibility + o iBATIS-522 -- Null type causing TypeHandlerFactory to throw NPE + o iBATIS-511 -- Added values to error messages + o iBATIS-515 -- Added comments to DTD + o iBATIS-244 -- configured type handler not used for insert + + +-- 2.3.2 -- o Updated this release.txt file for 2.3.1 Modified: ibatis/trunk/java/mapper/mapper2/test/com/ibatis/common/beans/ComplexBeanProbeTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/test/com/ibatis/common/beans/ComplexBeanProbeTest.java?rev=677189&r1=677188&r2=677189&view=diff == --- ibatis/trunk/java/mapper/mapper2/test/com/ibatis/common/beans/ComplexBeanProbeTest.java (original) +++ ibatis/trunk/java/mapper/mapper2/test/com/ibatis/common/beans/ComplexBeanProbeTest.java Wed Jul 16 01:11:28 2008 @@ -5,27 +5,27 @@ public class ComplexBeanProbeTest extends TestCase { public void testSetObject() { - Test myTest = new Test(); - Probe probe = ProbeFactory.getProbe(myTest); - probe.setObject(myTest, "myInt", Integer.valueOf(1)); - assertEquals(1, myTest.getMyInt()); - probe.setObject(myTest, "myInt", Integer.valueOf(2)); - assertEquals(2, myTest.getMyInt()); + SimpleClass mySimpleClass = new SimpleClass(); + Probe probe = ProbeFactory.getProbe(mySimpleClass); + probe.setObject(mySimpleClass, "myInt", Integer.valueOf(1)); + assertEquals(1, mySimpleClass.getMyInt()); + probe.setObject(mySimpleClass, "myInt", Integer.valueOf(2)); + assertEquals(2, mySimpleClass.getMyInt()); try { - probe.setObject(myTest, "myInt", null); + probe.setObject(mySimpleClass, "myInt", null); fail(); } catch (RuntimeException e) { assertTrue(e.getMessage().contains("'myInt' to value 'null'")); } try { - probe.setObject(myTest, "myInt", Float.valueOf(1.2f)); + probe.setObject(mySimpleClass, "myInt", Float.valueOf(1.2f)); fail(); } catch (RuntimeException e) { assertTrue(e.getMessage().contains("'myInt' to value '1.2'")); } } - public class Test { + public class SimpleClass { int myInt;
svn commit: r677182 - /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/ExtendedSqlMapClient.java
Author: cbegin Date: Wed Jul 16 00:31:02 2008 New Revision: 677182 URL: http://svn.apache.org/viewvc?rev=677182&view=rev Log: Put ExtendedSqlMapClient.java back in place for Spring integration Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/ExtendedSqlMapClient.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/ExtendedSqlMapClient.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/ExtendedSqlMapClient.java?rev=677182&r1=677181&r2=677182&view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/ExtendedSqlMapClient.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/ExtendedSqlMapClient.java Wed Jul 16 00:31:02 2008 @@ -1,18 +1,102 @@ package com.ibatis.sqlmap.engine.impl; -import com.ibatis.sqlmap.client.SqlMapClient; +import com.ibatis.sqlmap.client.*; +import com.ibatis.sqlmap.client.event.RowHandler; +import com.ibatis.sqlmap.engine.execution.*; +import com.ibatis.sqlmap.engine.mapping.statement.MappedStatement; +import com.ibatis.sqlmap.engine.mapping.result.ResultObjectFactory; +import com.ibatis.common.util.PaginatedList; + +import javax.sql.DataSource; +import java.sql.*; +import java.util.*; /** - * @deprecated - this class is uneccessary and should be removed as soon as possible. Currently spring integration depends on it. + * @deprecated - this class is uneccessary and should be removed as + * soon as possible. Currently spring integration depends on it. */ public interface ExtendedSqlMapClient extends SqlMapClient { - /** - * only here to avoid Spring breakage. DO NOT USE. - * @deprecated - * @return delegate - */ - public SqlMapExecutorDelegate getDelegate(); + Object insert(String id, Object param) throws SQLException; + + Object insert(String id) throws SQLException; + + int update(String id, Object param) throws SQLException; + + int update(String id) throws SQLException; + + int delete(String id, Object param) throws SQLException; + + int delete(String id) throws SQLException; + + Object queryForObject(String id, Object paramObject) throws SQLException; + + Object queryForObject(String id) throws SQLException; + + Object queryForObject(String id, Object paramObject, Object resultObject) throws SQLException; + + List queryForList(String id, Object paramObject) throws SQLException; + + List queryForList(String id) throws SQLException; + + List queryForList(String id, Object paramObject, int skip, int max) throws SQLException; + + List queryForList(String id, int skip, int max) throws SQLException; + + PaginatedList queryForPaginatedList(String id, Object paramObject, int pageSize) throws SQLException; + + PaginatedList queryForPaginatedList(String id, int pageSize) throws SQLException; + + Map queryForMap(String id, Object paramObject, String keyProp) throws SQLException; + + Map queryForMap(String id, Object paramObject, String keyProp, String valueProp) throws SQLException; + + void queryWithRowHandler(String id, Object paramObject, RowHandler rowHandler) throws SQLException; + + void queryWithRowHandler(String id, RowHandler rowHandler) throws SQLException; + + void startTransaction() throws SQLException; + + void startTransaction(int transactionIsolation) throws SQLException; + + void commitTransaction() throws SQLException; + + void endTransaction() throws SQLException; + + void startBatch() throws SQLException; + + int executeBatch() throws SQLException; + + List executeBatchDetailed() throws SQLException, BatchException; + + void setUserConnection(Connection connection) throws SQLException; + + Connection getUserConnection() throws SQLException; + + Connection getCurrentConnection() throws SQLException; + + DataSource getDataSource(); + + MappedStatement getMappedStatement(String id); + + boolean isLazyLoadingEnabled(); + + boolean isEnhancementEnabled(); + + SqlExecutor getSqlExecutor(); + + SqlMapExecutorDelegate getDelegate(); + + SqlMapSession openSession(); + + SqlMapSession openSession(Connection conn); + + SqlMapSession getSession(); + + void flushDataCache(); + + void flushDataCache(String cacheId); + ResultObjectFactory getResultObjectFactory(); }
svn commit: r677180 - /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TypeHandlerFactory.java
Author: cbegin Date: Wed Jul 16 00:29:39 2008 New Revision: 677180 URL: http://svn.apache.org/viewvc?rev=677180&view=rev Log: iBATIS 244 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TypeHandlerFactory.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TypeHandlerFactory.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TypeHandlerFactory.java?rev=677180&r1=677179&r2=677180&view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TypeHandlerFactory.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TypeHandlerFactory.java Wed Jul 16 00:29:39 2008 @@ -29,6 +29,16 @@ private final TypeHandler unknownTypeHandler = new UnknownTypeHandler(this); private final HashMap typeAliases = new HashMap(); + private static final Map reversePrimitiveMap = new HashMap() {{ +put(Byte.class, byte.class); +put(Short.class, short.class); +put(Integer.class, int.class); +put(Long.class, long.class); +put(Float.class, float.class); +put(Double.class, double.class); +put(Boolean.class, boolean.class); + }}; + /* Constructor */ @@ -191,6 +201,10 @@ typeHandlerMap.put(type, map); } map.put(jdbcType, handler); + +if (reversePrimitiveMap.containsKey(type)) { + register((Class)reversePrimitiveMap.get(type),jdbcType,handler); +} } /**