svn commit: r293201 - /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java
Author: cbegin Date: Sun Oct 2 18:43:20 2005 New Revision: 293201 URL: http://svn.apache.org/viewcvs?rev=293201view=rev Log: Fixed IBATIS-173 Incorrect resultset retrieve when calling stored procedure Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java?rev=293201r1=293200r2=293201view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java Sun Oct 2 18:43:20 2005 @@ -41,7 +41,7 @@ * Constant to let us know not to skip anything */ public static final int NO_SKIPPED_RESULTS = 0; - + /** * Constant to let us know to include all records */ @@ -53,14 +53,14 @@ /** * Execute an update - * + * * @param request - the request scope * @param conn - the database connection * @param sql - the sql statement to execute * @param parameters - the parameters for the sql statement - * + * * @return - the number of records changed - * + * * @throws SQLException - if the update fails */ public int executeUpdate(RequestScope request, Connection conn, String sql, Object[] parameters) @@ -93,12 +93,12 @@ /** * Adds a statement to a batch - * + * * @param request - the request scope * @param conn - the database connection * @param sql - the sql statement * @param parameters - the parameters for the statement - * + * * @throws SQLException - if the statement fails */ public void addBatch(RequestScope request, Connection conn, String sql, Object[] parameters) @@ -113,11 +113,11 @@ /** * Execute a batch of statements - * + * * @param session - the session scope - * + * * @return - the number of rows impacted by the batch - * + * * @throws SQLException - if a statement fails */ public int executeBatch(SessionScope session) @@ -136,7 +136,7 @@ /** * Long form of the method to execute a query - * + * * @param request - the request scope * @param conn - the database connection * @param sql - the SQL statement to execute @@ -144,7 +144,7 @@ * @param skipResults - the number of results to skip * @param maxResults - the maximum number of results to return * @param callback - the row handler for the query - * + * * @throws SQLException - if the query fails */ public void executeQuery(RequestScope request, Connection conn, String sql, Object[] parameters, @@ -178,7 +178,7 @@ errorContext.setMoreInfo(Check the statement (query failed).); ps.execute(); - rs = ps.getResultSet(); + rs = getFirstResultSet(ps); errorContext.setMoreInfo(Check the results (failed to retrieve results).); handleResults(request, rs, skipResults, maxResults, callback); @@ -198,14 +198,14 @@ /** * Execute a stored procedure that updates data - * + * * @param request - the request scope * @param conn - the database connection * @param sql - the SQL to call the procedure * @param parameters - the parameters for the procedure - * + * * @return - the rows impacted by the procedure - * + * * @throws SQLException - if the procedure fails */ public int executeUpdateProcedure(RequestScope request, Connection conn, String sql, Object[] parameters) @@ -247,7 +247,7 @@ /** * Execute a stored procedure - * + * * @param request - the request scope * @param conn - the database connection * @param sql - the sql to call the procedure @@ -255,7 +255,7 @@ * @param skipResults - the number of results to skip * @param maxResults - the maximum number of results to return * @param callback - a row handler for processing the results - * + * * @throws SQLException - if the procedure fails */ public void executeQueryProcedure(RequestScope request, Connection conn, String sql, Object[] parameters, @@ -285,7 +285,7 @@ errorContext.setMoreInfo(Check the statement (update procedure failed).); cs.execute(); - rs = cs.getResultSet(); + rs = getFirstResultSet(cs); errorContext.setMoreInfo(Check the results (failed to retrieve results).); handleResults(request, rs, skipResults, maxResults, callback); @@ -306,9 +306,29 @@ } + private ResultSet getFirstResultSet(Statement stmt) throws SQLException { +ResultSet rs = null; +boolean hasMoreResults = true; +while (hasMoreResults) { + rs = stmt.getResultSet(); + if (rs != null) { +break
svn commit: r293202 - /ibatis/trunk/java/mapper/mapper2/build/lib/
Author: cbegin Date: Sun Oct 2 18:46:49 2005 New Revision: 293202 URL: http://svn.apache.org/viewcvs?rev=293202view=rev Log: (empty) Removed: ibatis/trunk/java/mapper/mapper2/build/lib/
svn commit: r293518 - /ibatis/trunk/java/mapper/mapper2/doc/to-do.txt
Author: cbegin Date: Mon Oct 3 21:10:33 2005 New Revision: 293518 URL: http://svn.apache.org/viewcvs?rev=293518view=rev Log: moved to-do to wiki Removed: ibatis/trunk/java/mapper/mapper2/doc/to-do.txt
svn commit: r312734 - /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/BlobTypeHandlerCallback.java
Author: cbegin Date: Mon Oct 10 13:35:50 2005 New Revision: 312734 URL: http://svn.apache.org/viewcvs?rev=312734view=rev Log: (empty) Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/BlobTypeHandlerCallback.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/BlobTypeHandlerCallback.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/BlobTypeHandlerCallback.java?rev=312734r1=312733r2=312734view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/BlobTypeHandlerCallback.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/BlobTypeHandlerCallback.java Mon Oct 10 13:35:50 2005 @@ -29,7 +29,7 @@ Blob blob = getter.getBlob(); byte[] returnValue = null; if (null != blob) { - returnValue = blob.getBytes(0, (int) blob.length()); + returnValue = blob.getBytes(1, (int) blob.length()); } else { returnValue = null; }
svn commit: r354337 [6/9] - in /ibatis/trunk/java/jpetstore/jpetstore5: ./ build/ devlib/ doc/ lib/ src/ src/com/ src/com/ibatis/ src/com/ibatis/jpetstore/ src/com/ibatis/jpetstore/domain/ src/com/iba
Added: ibatis/trunk/java/jpetstore/jpetstore5/web/WEB-INF/tld/struts-logic.tld URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/jpetstore/jpetstore5/web/WEB-INF/tld/struts-logic.tld?rev=354337view=auto == --- ibatis/trunk/java/jpetstore/jpetstore5/web/WEB-INF/tld/struts-logic.tld (added) +++ ibatis/trunk/java/jpetstore/jpetstore5/web/WEB-INF/tld/struts-logic.tld Mon Dec 5 22:39:31 2005 @@ -0,0 +1,648 @@ +?xml version=1.0 encoding=UTF-8? + + +!DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd; +taglib + tlibversion1.2/tlibversion + jspversion1.1/jspversion + shortnamelogic/shortname + urihttp://struts.apache.org/tags-logic/uri + tag +nameempty/name +tagclassorg.apache.struts.taglib.logic.EmptyTag/tagclass +bodycontentJSP/bodycontent +attribute + namename/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameproperty/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namescope/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute + /tag + tag +nameequal/name +tagclassorg.apache.struts.taglib.logic.EqualTag/tagclass +bodycontentJSP/bodycontent +attribute + namecookie/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameheader/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namename/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameparameter/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameproperty/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namescope/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namevalue/name + requiredtrue/required + rtexprvaluetrue/rtexprvalue +/attribute + /tag + tag +nameforward/name +tagclassorg.apache.struts.taglib.logic.ForwardTag/tagclass +bodycontentempty/bodycontent +attribute + namename/name + requiredtrue/required + rtexprvaluetrue/rtexprvalue +/attribute + /tag + tag +namegreaterEqual/name +tagclassorg.apache.struts.taglib.logic.GreaterEqualTag/tagclass +bodycontentJSP/bodycontent +attribute + namecookie/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameheader/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namename/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameparameter/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameproperty/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namescope/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namevalue/name + requiredtrue/required + rtexprvaluetrue/rtexprvalue +/attribute + /tag + tag +namegreaterThan/name +tagclassorg.apache.struts.taglib.logic.GreaterThanTag/tagclass +bodycontentJSP/bodycontent +attribute + namecookie/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameheader/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namename/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameparameter/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameproperty/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namescope/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + namevalue/name + requiredtrue/required + rtexprvaluetrue/rtexprvalue +/attribute + /tag + tag +nameiterate/name +tagclassorg.apache.struts.taglib.logic.IterateTag/tagclass +teiclassorg.apache.struts.taglib.logic.IterateTei/teiclass +bodycontentJSP/bodycontent +attribute + namecollection/name + requiredfalse/required + rtexprvaluetrue/rtexprvalue +/attribute +attribute + nameid/name + requiredtrue/required + rtexprvaluefalse/rtexprvalue +/attribute +attribute + nameindexId/name + requiredfalse/required + rtexprvaluefalse/rtexprvalue +
svn commit: r357472 - /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java
Author: cbegin Date: Sun Dec 18 07:34:03 2005 New Revision: 357472 URL: http://svn.apache.org/viewcvs?rev=357472view=rev Log: Fixed IBATIS-220 Null Pointer in SqlExecutor.handleResults where ResultSet is null. Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java?rev=357472r1=357471r2=357472view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java Sun Dec 18 07:34:03 2005 @@ -180,8 +180,10 @@ ps.execute(); rs = getFirstResultSet(ps); - errorContext.setMoreInfo(Check the results (failed to retrieve results).); - handleResults(request, rs, skipResults, maxResults, callback); + if (rs != null) { +errorContext.setMoreInfo(Check the results (failed to retrieve results).); +handleResults(request, rs, skipResults, maxResults, callback); + } // clear out remaining results while (ps.getMoreResults()); @@ -287,8 +289,10 @@ cs.execute(); rs = getFirstResultSet(cs); - errorContext.setMoreInfo(Check the results (failed to retrieve results).); - handleResults(request, rs, skipResults, maxResults, callback); + if (rs != null) { +errorContext.setMoreInfo(Check the results (failed to retrieve results).); +handleResults(request, rs, skipResults, maxResults, callback); + } // consume additional results while (cs.getMoreResults());
svn commit: r371173 - in /ibatis/trunk/java/mapper/mapper2: src/com/ibatis/sqlmap/engine/mapper/ src/com/ibatis/sqlmap/engine/mapper/metadata/ test/com/ibatis/sqlmap/mapper/
Author: cbegin Date: Sat Jan 21 19:13:39 2006 New Revision: 371173 URL: http://svn.apache.org/viewcvs?rev=371173view=rev Log: Implemented stats based name matcher for use with auto crud ops generation Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Match.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/MatchCalculator.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/NameMatcher.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/Column.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/Database.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/DatabaseFactory.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/Table.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/ ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/CanonicalizerTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/DatabaseMetadataTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/MatchCalculatorTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/NameMatcherTest.java Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java?rev=371173view=auto == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java (added) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java Sat Jan 21 19:13:39 2006 @@ -0,0 +1,177 @@ +package com.ibatis.sqlmap.engine.mapper; + +import java.util.StringTokenizer; +import java.util.Map; +import java.util.HashMap; +import java.util.Iterator; + +public class Canonicalizer { + + public Map buildCanonicalMap(String[] originals) { +return buildCanonicalMap(originals, null); + } + public Map buildCanonicalMap(String[] originals, String parentName) { +Map map = new HashMap(); +for (int i=0; i originals.length; i++) { + map.put(originals[i], originals[i]); +} +upperCase(map); +removeUnderscores(map); +removePKFK(map); +removePrefixes(map); +removeSuffixes(map); +removePluralization(map); +removeParentName(map, parentName); +return map; + } + + private void removeParentName(Map map, String parentName) { +if (parentName != null) { + parentName = parentName.toUpperCase(); + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { +String original = (String) i.next(); +String canonical = (String) map.get(original); +if (canonical.startsWith(parentName)) { + map.put(original, canonical.substring(parentName.length())); +} +if (canonical.endsWith(parentName)) { + map.put(original, canonical.substring(0, canonical.length() - parentName.length())); +} + } +} + } + + private void upperCase(Map map) { +Iterator i = map.keySet().iterator(); +while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + map.put(original, canonical.toUpperCase()); +} + } + + private void removePKFK(Map map) { +Iterator i = map.keySet().iterator(); +while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + if (canonical.startsWith(PK)) { +map.put(original, canonical.substring(2)); + } else if (canonical.startsWith(FK)) { +map.put(original, canonical.substring(2)); + } + if (canonical.endsWith(PK)) { +map.put(original, canonical.substring(0, canonical.length() - 2)); + } else if (canonical.endsWith(FK)) { +map.put(original, canonical.substring(0, canonical.length() - 2)); + } +} + } + + private void removePrefixes(Map map) { +int prefix = findPrefixLength(map); + +if (prefix 1) { + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { +String original = (String) i.next(); +String canonical = (String) map.get(original); +map.put(original, canonical.substring(prefix)); + } +} + } + + private void removeSuffixes(Map map) { +int suffix = findSuffixLength(map); + +if (suffix 1) { + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { +String original = (String) i.next(); +String
svn commit: r371181 - in /ibatis/trunk/site: pages/archive.vm pages/dao.vm pages/datamapper.vm pages/index.vm pages/petstore.vm template/ac2005us_banner_468x60.jpg template/jp4.gif template/menu.vm
Author: cbegin Date: Sat Jan 21 20:39:37 2006 New Revision: 371181 URL: http://svn.apache.org/viewcvs?rev=371181view=rev Log: (empty) Removed: ibatis/trunk/site/template/ac2005us_banner_468x60.jpg Modified: ibatis/trunk/site/pages/archive.vm ibatis/trunk/site/pages/dao.vm ibatis/trunk/site/pages/datamapper.vm ibatis/trunk/site/pages/index.vm ibatis/trunk/site/pages/petstore.vm ibatis/trunk/site/template/jp4.gif ibatis/trunk/site/template/menu.vm Modified: ibatis/trunk/site/pages/archive.vm URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/pages/archive.vm?rev=371181r1=371180r2=371181view=diff == --- ibatis/trunk/site/pages/archive.vm (original) +++ ibatis/trunk/site/pages/archive.vm Sat Jan 21 20:39:37 2006 @@ -7,6 +7,17 @@ h2News Archive/h2 + h3iBATIS Java 2.1.6 - Maintenance Release/h3 + p(Nov 5, 2005) Just released a maintenance release to take care of the summer bug list. This puts us + in a good spot to start planning for 2.2.0, where we're currently discussing some changes to the current + version support levels, which will enable us to add a bunch of new features. If you aren't on the dev or + Java mailing list, then join up to discuss! For now, enjoy the cleanliness of version 2.1.6. + /p + p + a href=downloads.htmlGet iBATIS 2.1.6 from the Downloads page./a + br/ + /p + h3iBATIS for Ruby/h3 p(August 25, 2005) It's official. iBATIS is no longer a simple tool or framework. It is a genuine approach to integrating object oriented applications and relational databases. We could have said that Modified: ibatis/trunk/site/pages/dao.vm URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/pages/dao.vm?rev=371181r1=371180r2=371181view=diff == --- ibatis/trunk/site/pages/dao.vm (original) +++ ibatis/trunk/site/pages/dao.vm Sat Jan 21 20:39:37 2006 @@ -20,8 +20,6 @@ includes the SQL Maps Framework. Although packaged together, the DAO Framework is completely independent and can be used without SQL Maps. .NET users can download the DataAccess framework seperately from the DataMapper framework./p -pa href=downloads.html title=Get the iBATIS DAO framework!Download the iBATIS Data Access Objects framework and documentation!/a/p - /body /html Modified: ibatis/trunk/site/pages/datamapper.vm URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/pages/datamapper.vm?rev=371181r1=371180r2=371181view=diff == --- ibatis/trunk/site/pages/datamapper.vm (original) +++ ibatis/trunk/site/pages/datamapper.vm Sat Jan 21 20:39:37 2006 @@ -18,8 +18,6 @@ nearly any database to any object model and is very tolerant of legacy designs, or even bad designs. This is all achieved without special database tables, peer objects or code generation./p -pa href=downloads.html title=Get the iBATIS Data Mapper framework!Download the iBATIS Data Mapper framework and documentation!/a/p - /body /html Modified: ibatis/trunk/site/pages/index.vm URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/pages/index.vm?rev=371181r1=371180r2=371181view=diff == --- ibatis/trunk/site/pages/index.vm (original) +++ ibatis/trunk/site/pages/index.vm Sat Jan 21 20:39:37 2006 @@ -39,22 +39,37 @@ h2News/h2 + +h3iBATIS Java 2.1.7 - Maintenance Release - Last 1.3 Compatible Release!/h3 + +p(Jan 21, 2006) Well, as we said back in November, iBATIS will require JDK 1.4 as of the 2.2.0 release. + We expect that this 2.1.7 release will be the last JDK 1.3 compatible release that we make, unless a serious + stability or security flaw is found, in which case we'll deploy a fix from a branch of the source. This release + contains a number of minor bug fixes, an enhanced entity resolver. 2.2.0 will be an interesting release with + some new features that we've been looking forward to. +/p + + p +a href=javadownloads.htmlGet iBATIS 2.1.7 from the Downloads page./a +br/ + /p + h3iBATIS.NET DataMapper V1.3 Beta and DataAccess V1.7 Beta/h3 - p(Dec 15, 2005) The iBATIS.NET team is pleased to announce that the Beta distributions of the DataMapper V1.3 and DataAccess V1.7 frameworks are ready! - Although this is primarily for bug fixes and documentation updates, there are some important changes:/p + p(Dec 15, 2005) The iBATIS.NET team is pleased to announce that the Beta distributions of the DataMapper V1.3 and DataAccess V1.7 frameworks are ready! + Although this is primarily for bug fixes and documentation updates, there are some important changes:/p ul libEnabling Intellisense in Visual Studio 2003/b for configuration and mapping files/li -libUpdates to configuration
svn commit: r371182 - in /ibatis/trunk/site/pages: dotnetdownloads.vm downloads.vm javadownloads.vm
Author: cbegin Date: Sat Jan 21 20:40:18 2006 New Revision: 371182 URL: http://svn.apache.org/viewcvs?rev=371182view=rev Log: (empty) Added: ibatis/trunk/site/pages/dotnetdownloads.vm ibatis/trunk/site/pages/javadownloads.vm Removed: ibatis/trunk/site/pages/downloads.vm Added: ibatis/trunk/site/pages/dotnetdownloads.vm URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/pages/dotnetdownloads.vm?rev=371182view=auto == --- ibatis/trunk/site/pages/dotnetdownloads.vm (added) +++ ibatis/trunk/site/pages/dotnetdownloads.vm Sat Jan 21 20:40:18 2006 @@ -0,0 +1,51 @@ +html +head +titleiBATIS Downloads/title +/head + +body + +h2iBATIS.NET Downloads/h2 + +h4Releases/h4 +ul + lia href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/IBatisNet.DataMapper-bin-1.3.0.zip;DataMapper 1.3/a [a href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/IBatisNet.DataMapper-bin-1.3.0.md5;MD5/a] (Apache Beta)/li + lia href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/IBatisNet.DataAccess-bin-1.7.0.zip;DataAccess 1.7/a [a href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/IBatisNet.DataAccess-bin-1.7.0.md5;MD5/a] (Apache Beta)/li + lia href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/Source.zip;Source Revision 356824/a [a href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/Source.md5;MD5/a]/li +/ul + +ul + lia href=http://prdownloads.sourceforge.net/ibatisnet/DataMapper-bin-1.2.1.zip?download;DataMapper 1.2.1/a (Apache General Availability)/li + lia href=http://prdownloads.sourceforge.net/ibatisnet/DataAccess-bin-1.6.1.zip?download;DataAccess 1.6.1/a (Apache General Availability)/li + lia href=http://prdownloads.sourceforge.net/ibatisnet/iBATIS-src-SVN-179390.zip?download;Source Revision 179390/a/li + lia href=http://sourceforge.net/project/showfiles.php?group_id=109704;Old Releases (at SourceForge)/a/li +/ul + + + h4Examples/h4 +ul + lia href=http://prdownloads.sourceforge.net/ibatisnet/Tutorial-1.2.1.zip?download;DataMapper Tutorial 1.2.1 Docs and Source/a/li + lia href=http://prdownloads.sourceforge.net/ibatisnet/NPetshop-1.0.0.RC1.zip?download;NPetShop Example Application/a/li +/ul + +h4Documentation /h4 + +ul + li +English +ul + lia href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/Doc-DataMapper-1.3.0.zip;DataMapper 1.3 Beta Docs/a [a href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/Doc-DataMapper-1.3.0.md5;MD5/a] (CHM, PDF, and SDK Help)/li + lia href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/Doc-DataAccess-1.7.0.zip;DataAccess 1.7 Beta Docs/a [a href=http://cvs.apache.org/dist/ibatis/ibatis.net/beta/Doc-DataAccess-1.7.0.md5;MD5/a] (CHM, PDF, and SDK Help)/li +/ulbr/ +ul + lia href=http://prdownloads.sourceforge.net/ibatisnet/Tutorial-1.2.1.zip?download;DataMapper Tutorial 1.2.1/a Docs and Source/li + lia href=http://prdownloads.sourceforge.net/ibatisnet/DataMapper-doc-1.2.1.zip?download;DataMapper 1.2.1 Docs/a (CHM, PDF, and SDK Help)/li + lia href=http://prdownloads.sourceforge.net/ibatisnet/DataAccess-doc-1.6.1.zip?download;DataAccess 1.6.1 Docs/a (CHM, PDF, and SDK Help)/li + lia href=http://ibatisnet.sourceforge.net/docs/en/sdkhelp/web/;DataMapper 1.2.1 and DataAccess 1.6.1 Online SDK Help/a/li +/ul + /li +/ul + +/body + +/html Added: ibatis/trunk/site/pages/javadownloads.vm URL: http://svn.apache.org/viewcvs/ibatis/trunk/site/pages/javadownloads.vm?rev=371182view=auto == --- ibatis/trunk/site/pages/javadownloads.vm (added) +++ ibatis/trunk/site/pages/javadownloads.vm Sat Jan 21 20:40:18 2006 @@ -0,0 +1,42 @@ +html +head +titleiBATIS Downloads/title +/head + +body + +h2iBATIS for Java Downloads/h2 + +h4Releases/h4 +ul + lia href=http://cvs.apache.org/dist/ibatis/beta/iBATIS_DBL-2.1.7.597.zip;biBATIS Java 2.1.7 w/Binaries and Source/b/a (Jan 21, 2006 - Beta) /li + lia href=http://prdownloads.sourceforge.net/ibatisdb/iBATIS_DBL-2.1.5.582.zip?download;iBATIS Java 2.1.5 w/Binaries and Source/a (Jul 17, 2005 - General Availability) /li + lia href=http://sourceforge.net/project/showfiles.php?group_id=61326;Old Releases (at SourceForge) /a/li +/ul + +h4Examples/h4 +ul + lia href=http://cvs.apache.org/dist/ibatis/beta/JPetStore-5.0.zip;JPetStore 5.0 Example Application/a (Apache Alpha)/li +/ul + +h4Documentation /h4 +ul + liEnglish +ul + lia href=http://prdownloads.sourceforge.net/ibatisnet/DevGuide.pdf?download;bGeneric Developer Guide/b/a/li + lia href=http://prdownloads.sourceforge.net/ibatisdb/iBATIS-SqlMaps-2.pdf?download;SQL Maps for Java, Developer Guide /a/li + lia href=http
svn commit: r371209 - /ibatis/trunk/java/mapper/mapper2/test/compatibility/
Author: cbegin Date: Sat Jan 21 21:43:19 2006 New Revision: 371209 URL: http://svn.apache.org/viewcvs?rev=371209view=rev Log: Removed iBATIS 1.x compatibility libraries. Removed: ibatis/trunk/java/mapper/mapper2/test/compatibility/
svn commit: r371212 - /ibatis/trunk/java/mapper/mapper2/doc/release.txt
Author: cbegin Date: Sat Jan 21 21:47:24 2006 New Revision: 371212 URL: http://svn.apache.org/viewcvs?rev=371212view=rev Log: Deleted deprecated JtaDaoTemplate Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=371212r1=371211r2=371212view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Sat Jan 21 21:47:24 2006 @@ -6,6 +6,7 @@ -- o Removed iBATIS 1.x compatibility libraries, they are no longer supported. + o Removed deprectated JtaDaoTemplate -- 2.1.7 - Jan 21, 2006
svn commit: r372039 - in /ibatis/trunk/java/mapper/mapper2: src/com/ibatis/sqlmap/engine/mapper/ src/com/ibatis/sqlmap/engine/mapper/matcher/ src/com/ibatis/sqlmap/engine/mapper/metadata/ test/com/iba
Author: cbegin Date: Tue Jan 24 14:47:31 2006 New Revision: 372039 URL: http://svn.apache.org/viewcvs?rev=372039view=rev Log: added primary key support to database metadata Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/ClassMapper.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/Canonicalizer.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/Match.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/MatchCalculator.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/NameMatcher.java Removed: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Canonicalizer.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/Match.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/MatchCalculator.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/NameMatcher.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/DatabaseFactory.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/metadata/Table.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/CanonicalizerTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/DatabaseMetadataTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/MatchCalculatorTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/mapper/NameMatcherTest.java Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/ClassMapper.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/ClassMapper.java?rev=372039view=auto == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/ClassMapper.java (added) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/ClassMapper.java Tue Jan 24 14:47:31 2006 @@ -0,0 +1,7 @@ +package com.ibatis.sqlmap.engine.mapper; + +public class ClassMapper { + + + +} Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/Canonicalizer.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/Canonicalizer.java?rev=372039view=auto == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/Canonicalizer.java (added) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapper/matcher/Canonicalizer.java Tue Jan 24 14:47:31 2006 @@ -0,0 +1,177 @@ +package com.ibatis.sqlmap.engine.mapper.matcher; + +import java.util.StringTokenizer; +import java.util.Map; +import java.util.HashMap; +import java.util.Iterator; + +public class Canonicalizer { + + public Map buildCanonicalMap(String[] originals) { +return buildCanonicalMap(originals, null); + } + public Map buildCanonicalMap(String[] originals, String parentName) { +Map map = new HashMap(); +for (int i=0; i originals.length; i++) { + map.put(originals[i], originals[i]); +} +upperCase(map); +removeUnderscores(map); +removePKFK(map); +removePrefixes(map); +removeSuffixes(map); +removePluralization(map); +removeParentName(map, parentName); +return map; + } + + private void removeParentName(Map map, String parentName) { +if (parentName != null) { + parentName = parentName.toUpperCase(); + Iterator i = map.keySet().iterator(); + while (i.hasNext()) { +String original = (String) i.next(); +String canonical = (String) map.get(original); +if (canonical.startsWith(parentName)) { + map.put(original, canonical.substring(parentName.length())); +} +if (canonical.endsWith(parentName)) { + map.put(original, canonical.substring(0, canonical.length() - parentName.length())); +} + } +} + } + + private void upperCase(Map map) { +Iterator i = map.keySet().iterator(); +while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + map.put(original, canonical.toUpperCase()); +} + } + + private void removePKFK(Map map) { +Iterator i = map.keySet().iterator(); +while (i.hasNext()) { + String original = (String) i.next(); + String canonical = (String) map.get(original); + if (canonical.startsWith(PK)) { +map.put(original, canonical.substring(2)); + } else if (canonical.startsWith(FK)) { +map.put(original, canonical.substring(2)); + } + if (canonical.endsWith(PK
svn commit: r372417 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis: common/beans/ClassInfo.java sqlmap/engine/builder/xml/SqlMapConfigParser.java sqlmap/engine/builder/xml/sql-map-config-2.dtd
Author: cbegin Date: Wed Jan 25 19:15:57 2006 New Revision: 372417 URL: http://svn.apache.org/viewcvs?rev=372417view=rev Log: added setting to enable/disable ClassInfo caching. Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java?rev=372417r1=372416r2=372417view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java Wed Jan 25 19:15:57 2006 @@ -28,6 +28,7 @@ */ public class ClassInfo { + private static boolean cacheEnabled = true; private static final String[] EMPTY_STRING_ARRAY = new String[0]; private static final Set SIMPLE_TYPE_SET = new HashSet(); private static final Map CLASS_INFO_MAP = Collections.synchronizedMap(new HashMap()); @@ -259,14 +260,22 @@ * @return The method cache for the class */ public static ClassInfo getInstance(Class clazz) { -synchronized (clazz) { - ClassInfo cache = (ClassInfo) CLASS_INFO_MAP.get(clazz); - if (cache == null) { -cache = new ClassInfo(clazz); -CLASS_INFO_MAP.put(clazz, cache); +if (cacheEnabled) { + synchronized (clazz) { +ClassInfo cache = (ClassInfo) CLASS_INFO_MAP.get(clazz); +if (cache == null) { + cache = new ClassInfo(clazz); + CLASS_INFO_MAP.put(clazz, cache); +} +return cache; } - return cache; +} else { + return new ClassInfo(clazz); } + } + + public static void setCacheEnabled(boolean cacheEnabled) { +ClassInfo.cacheEnabled = cacheEnabled; } /** Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java?rev=372417r1=372416r2=372417view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java Wed Jan 25 19:15:57 2006 @@ -5,6 +5,7 @@ import com.ibatis.common.xml.NodeletParser; import com.ibatis.common.xml.NodeletUtils; import com.ibatis.common.exception.NestedRuntimeException; +import com.ibatis.common.beans.ClassInfo; import com.ibatis.sqlmap.client.SqlMapClient; import com.ibatis.sqlmap.client.SqlMapException; import com.ibatis.sqlmap.client.extensions.TypeHandlerCallback; @@ -145,6 +146,10 @@ vars.errorCtx.setActivity(loading settings properties); Properties attributes = NodeletUtils.parseAttributes(node, vars.properties); + +String classInfoCacheEnabledAttr = attributes.getProperty(classInfoCacheEnabled); +boolean classInfoCacheEnabled = (classInfoCacheEnabledAttr == null || true.equals(classInfoCacheEnabledAttr)); +ClassInfo.setCacheEnabled(classInfoCacheEnabled); String lazyLoadingEnabledAttr = attributes.getProperty(lazyLoadingEnabled); boolean lazyLoadingEnabled = (lazyLoadingEnabledAttr == null || true.equals(lazyLoadingEnabledAttr)); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd?rev=372417r1=372416r2=372417view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd Wed Jan 25 19:15:57 2006 @@ -29,6 +29,7 @@ !ELEMENT settings EMPTY !ATTLIST settings +classInfoCacheEnabled (true | false) #IMPLIED lazyLoadingEnabled (true | false) #IMPLIED cacheModelsEnabled (true | false) #IMPLIED enhancementEnabled (true | false) #IMPLIED
svn commit: r387574 - /ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/persistence/sqlmapdao/sql/Category.xml
Author: cbegin Date: Tue Mar 21 08:25:42 2006 New Revision: 387574 URL: http://svn.apache.org/viewcvs?rev=387574view=rev Log: Removed unused resultMap Modified: ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/persistence/sqlmapdao/sql/Category.xml Modified: ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/persistence/sqlmapdao/sql/Category.xml URL: http://svn.apache.org/viewcvs/ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/persistence/sqlmapdao/sql/Category.xml?rev=387574r1=387573r2=387574view=diff == --- ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/persistence/sqlmapdao/sql/Category.xml (original) +++ ibatis/trunk/java/jpetstore/jpetstore5/src/com/ibatis/jpetstore/persistence/sqlmapdao/sql/Category.xml Tue Mar 21 08:25:42 2006 @@ -12,12 +12,6 @@ property name=size value=100/ /cacheModel - resultMap id=categoryResult class=category -result property=categoryId column=CATID/ -result property=name column=NAME/ -result property=description column=DESCN/ - /resultMap - select id=getCategory resultClass=category parameterClass=string cacheModel=categoryCache SELECT CATID AS categoryId,
svn commit: r408124 - /ibatis/trunk/rb/
Author: cbegin Date: Sat May 20 20:43:47 2006 New Revision: 408124 URL: http://svn.apache.org/viewvc?rev=408124view=rev Log: For Ruby version of iBATIS. Added: ibatis/trunk/rb/
svn commit: r408126 - /ibatis/trunk/rb/docs/
Author: cbegin Date: Sat May 20 20:48:22 2006 New Revision: 408126 URL: http://svn.apache.org/viewvc?rev=408126view=rev Log: For user documentation Added: ibatis/trunk/rb/docs/
svn commit: r408127 - in /ibatis/trunk/rb/rbatis: ./ generators/ generators/rbatis/ generators/rbatis/templates/ lib/ lib/rbatis/ test/
Author: cbegin Date: Sat May 20 20:52:53 2006 New Revision: 408127 URL: http://svn.apache.org/viewvc?rev=408127view=rev Log: First import of iBATIS for Ruby (rBatis) Added: ibatis/trunk/rb/rbatis/ ibatis/trunk/rb/rbatis/generators/ ibatis/trunk/rb/rbatis/generators/rbatis/ ibatis/trunk/rb/rbatis/generators/rbatis/USAGE ibatis/trunk/rb/rbatis/generators/rbatis/rbatis_generator.rb ibatis/trunk/rb/rbatis/generators/rbatis/templates/ ibatis/trunk/rb/rbatis/generators/rbatis/templates/model.rb ibatis/trunk/rb/rbatis/generators/rbatis/templates/unit_test.rb ibatis/trunk/rb/rbatis/init.rb ibatis/trunk/rb/rbatis/lib/ ibatis/trunk/rb/rbatis/lib/rbatis/ ibatis/trunk/rb/rbatis/lib/rbatis.rb ibatis/trunk/rb/rbatis/lib/rbatis/rails_integration.rb ibatis/trunk/rb/rbatis/lib/rbatis/sanitizer.rb ibatis/trunk/rb/rbatis/test/ ibatis/trunk/rb/rbatis/test/rbatis_test.rb Added: ibatis/trunk/rb/rbatis/generators/rbatis/USAGE URL: http://svn.apache.org/viewvc/ibatis/trunk/rb/rbatis/generators/rbatis/USAGE?rev=408127view=auto == --- ibatis/trunk/rb/rbatis/generators/rbatis/USAGE (added) +++ ibatis/trunk/rb/rbatis/generators/rbatis/USAGE Sat May 20 20:52:53 2006 @@ -0,0 +1,8 @@ +Description: +Generates a RBatis::Base stub. + +Examples: +./script/generate rbatis order +will generate: + /app/models/order.rb + /test/unit/order.rb Added: ibatis/trunk/rb/rbatis/generators/rbatis/rbatis_generator.rb URL: http://svn.apache.org/viewvc/ibatis/trunk/rb/rbatis/generators/rbatis/rbatis_generator.rb?rev=408127view=auto == --- ibatis/trunk/rb/rbatis/generators/rbatis/rbatis_generator.rb (added) +++ ibatis/trunk/rb/rbatis/generators/rbatis/rbatis_generator.rb Sat May 20 20:52:53 2006 @@ -0,0 +1,16 @@ +class RbatisGenerator Rails::Generator::NamedBase + def manifest +record do |m| + # Check for class naming collisions. + m.class_collisions class_path, class_name, #{class_name}Test + + # Model, test, and fixture directories. + m.directory File.join('app/models', class_path) + m.directory File.join('test/unit', class_path) + + # Model class, unit test, and fixtures. + m.template 'model.rb', File.join('app/models', class_path, #{file_name}.rb) + m.template 'unit_test.rb', File.join('test/unit', class_path, #{file_name}_test.rb) +end + end +end Added: ibatis/trunk/rb/rbatis/generators/rbatis/templates/model.rb URL: http://svn.apache.org/viewvc/ibatis/trunk/rb/rbatis/generators/rbatis/templates/model.rb?rev=408127view=auto == --- ibatis/trunk/rb/rbatis/generators/rbatis/templates/model.rb (added) +++ ibatis/trunk/rb/rbatis/generators/rbatis/templates/model.rb Sat May 20 20:52:53 2006 @@ -0,0 +1,2 @@ +class %= class_name % RBatis::Base +end Added: ibatis/trunk/rb/rbatis/generators/rbatis/templates/unit_test.rb URL: http://svn.apache.org/viewvc/ibatis/trunk/rb/rbatis/generators/rbatis/templates/unit_test.rb?rev=408127view=auto == --- ibatis/trunk/rb/rbatis/generators/rbatis/templates/unit_test.rb (added) +++ ibatis/trunk/rb/rbatis/generators/rbatis/templates/unit_test.rb Sat May 20 20:52:53 2006 @@ -0,0 +1,10 @@ +require File.dirname(__FILE__) + '%= '/..' * class_nesting_depth %/../test_helper' + +class %= class_name %Test Test::Unit::TestCase + fixtures :%= table_name % + + # Replace this with your real tests. + def test_truth +assert true + end +end Added: ibatis/trunk/rb/rbatis/init.rb URL: http://svn.apache.org/viewvc/ibatis/trunk/rb/rbatis/init.rb?rev=408127view=auto == --- ibatis/trunk/rb/rbatis/init.rb (added) +++ ibatis/trunk/rb/rbatis/init.rb Sat May 20 20:52:53 2006 @@ -0,0 +1,2 @@ +require 'rbatis' +require 'rbatis/rails_integration' Added: ibatis/trunk/rb/rbatis/lib/rbatis.rb URL: http://svn.apache.org/viewvc/ibatis/trunk/rb/rbatis/lib/rbatis.rb?rev=408127view=auto == --- ibatis/trunk/rb/rbatis/lib/rbatis.rb (added) +++ ibatis/trunk/rb/rbatis/lib/rbatis.rb Sat May 20 20:52:53 2006 @@ -0,0 +1,327 @@ +require 'rbatis/sanitizer' + +def Fixnum.from_database(record, column) + record[column].to_i +end + +def String.from_database(record, column) + record[column].to_s +end + +def Time.from_database(record, column) + Time.parse(record[column]) +end + +module RBatis + class BooleanMapper +def from_database(record, column) + return null if record[column].nil? + return true if record[column] == '1' + return false if record[column] == '0' + + raise can't parse boolean value
svn commit: r408128 - in /ibatis/trunk/rb/rpetstore: ./ app/ app/controllers/ app/helpers/ app/models/ app/views/ app/views/account/ app/views/cart/ app/views/layouts/ app/views/login/ app/views/order
Author: cbegin Date: Sat May 20 21:01:27 2006 New Revision: 408128 URL: http://svn.apache.org/viewvc?rev=408128view=rev Log: (empty) [This commit notification would consist of 87 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.]
svn commit: r411431 - in /ibatis/trunk/java/mapper/mapper2: build/ src/com/ibatis/sqlmap/engine/builder/xml/ src/com/ibatis/sqlmap/engine/execution/ src/com/ibatis/sqlmap/engine/mapping/parameter/ src
Author: cbegin Date: Sat Jun 3 06:29:45 2006 New Revision: 411431 URL: http://svn.apache.org/viewvc?rev=411431view=rev Log: Applied Sven's cursor support patch from the wiki (file name modsrc_new.zip) Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMapping.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TypeHandlerFactory.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=411431r1=411430r2=411431view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sat Jun 3 06:29:45 2006 @@ -1,5 +1,5 @@ #Build version info -#Fri Mar 03 23:28:40 MST 2006 +#Fri Jun 02 23:47:35 MDT 2006 version=2.1.7 -buildDate=2006/03/03 23\:28 -buildNum=602 +buildDate=2006/06/02 23\:47 +buildNum=603 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java?rev=411431r1=411430r2=411431view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java Sat Jun 3 06:29:45 2006 @@ -26,8 +26,8 @@ public class SqlMapParser extends BaseParser { - private static final Log log = LogFactory.getLog(SqlMapParser.class); - + private static final Log log = LogFactory.getLog(SqlMapParser.class); + protected final NodeletParser parser = new NodeletParser(); public SqlMapParser(Variables vars) { @@ -246,12 +246,14 @@ String jdbcType = childAttributes.getProperty(jdbcType); String type = childAttributes.getProperty(typeName); String javaType = childAttributes.getProperty(javaType); +String resultMap = childAttributes.getProperty(resultMap); String nullValue = childAttributes.getProperty(nullValue); String mode = childAttributes.getProperty(mode); String callback = childAttributes.getProperty(typeHandler); callback = vars.typeHandlerFactory.resolveAlias(callback); javaType = vars.typeHandlerFactory.resolveAlias(javaType); +resultMap = applyNamespace( resultMap ); vars.errorCtx.setObjectId(propertyName + mapping of the + vars.currentParameterMap.getId() + parameter map); @@ -279,6 +281,7 @@ mapping.setPropertyName(propertyName); mapping.setJdbcTypeName(jdbcType); mapping.setTypeName(type); +mapping.setResultMapName( resultMap ); mapping.setNullValue(nullValue); if (mode != null mode.length() 0) { mapping.setMode(mode); @@ -305,7 +308,7 @@ vars.currentResultMap.setDiscriminator(vars.discriminator); vars.discriminator = null; - + vars.client.getDelegate().addResultMap(vars.currentResultMap); vars.errorCtx.setMoreInfo(null); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd?rev=411431r1=411430r2=411431view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd Sat Jun 3 06:29:45 2006 @@ -36,6 +36,7 @@ nullValue CDATA #IMPLIED mode (IN | OUT | INOUT) #IMPLIED typeHandler CDATA #IMPLIED +resultMap CDATA #IMPLIED !ELEMENT resultMap (result+, discriminator?) !ATTLIST resultMap Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java?rev=411431r1=411430r2=411431view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution
svn commit: r411437 - in /ibatis/trunk/java/mapper/mapper2/build: setenv.bat version.properties
Author: cbegin Date: Sat Jun 3 07:01:14 2006 New Revision: 411437 URL: http://svn.apache.org/viewvc?rev=411437view=rev Log: Build script tweak. Modified: ibatis/trunk/java/mapper/mapper2/build/setenv.bat ibatis/trunk/java/mapper/mapper2/build/version.properties Modified: ibatis/trunk/java/mapper/mapper2/build/setenv.bat URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/setenv.bat?rev=411437r1=411436r2=411437view=diff == --- ibatis/trunk/java/mapper/mapper2/build/setenv.bat (original) +++ ibatis/trunk/java/mapper/mapper2/build/setenv.bat Sat Jun 3 07:01:14 2006 @@ -1,3 +1,4 @@ +echo Using %JAVA_HOME% set BUILD_CP=%CLASSPATH% set BUILD_CP=%BUILD_CP%;%JAVA_HOME%\lib\tools.jar; Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?rev=411437r1=411436r2=411437view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sat Jun 3 07:01:14 2006 @@ -1,5 +1,5 @@ #Build version info -#Fri Jun 02 23:47:35 MDT 2006 +#Sat Jun 03 07:58:56 MDT 2006 version=2.1.7 -buildDate=2006/06/02 23\:47 -buildNum=603 +buildDate=2006/06/03 07\:58 +buildNum=608
svn commit: r411917 - in /ibatis/trunk/java/mapper/mapper2: build/version.properties devlib/serializer.jar devlib/xalan.jar doc/release.txt src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java
Author: cbegin Date: Mon Jun 5 14:10:41 2006 New Revision: 411917 URL: http://svn.apache.org/viewvc?rev=411917view=rev Log: 1) Fix for iBATIS-269: check for multiple result set support 2) Added xalan JAR files so that build works with JDK 1.5 (need to update Ant etc.) 3) Updated release.txt with most recent releases. Added: ibatis/trunk/java/mapper/mapper2/devlib/serializer.jar (with props) ibatis/trunk/java/mapper/mapper2/devlib/xalan.jar (with props) Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/doc/release.txt ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.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=411917r1=411916r2=411917view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Mon Jun 5 14:10:41 2006 @@ -1,5 +1,5 @@ #Build version info -#Sat Jun 03 07:58:56 MDT 2006 +#Mon Jun 05 15:03:40 MDT 2006 version=2.1.7 -buildDate=2006/06/03 07\:58 -buildNum=608 +buildDate=2006/06/05 15\:03 +buildNum=612 Added: ibatis/trunk/java/mapper/mapper2/devlib/serializer.jar URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/devlib/serializer.jar?rev=411917view=auto == Binary file - no diff available. Propchange: ibatis/trunk/java/mapper/mapper2/devlib/serializer.jar -- svn:mime-type = application/octet-stream Added: ibatis/trunk/java/mapper/mapper2/devlib/xalan.jar URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/devlib/xalan.jar?rev=411917view=auto == Binary file - no diff available. Propchange: ibatis/trunk/java/mapper/mapper2/devlib/xalan.jar -- svn:mime-type = application/octet-stream Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=411917r1=411916r2=411917view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Mon Jun 5 14:10:41 2006 @@ -7,9 +7,28 @@ o Removed iBATIS 1.x compatibility libraries, they are no longer supported. o Removed deprectated JtaDaoTemplate + o Removed custom nested transactions (JDBC 1.4 now required) + o Added support for ResultSet OUT params from stored procs (e.g. Oracle Ref Cursor) o Fixed IBATIS-281 Nested iterate tags are broken o Fixed IBATIS-293 Certain dynamic tags do not work within an iterate (isNull, isEmpty, etc.) - + o Fixed IBATIS-250: SELECT statement returns unexpected result when 'groupBy' and 'nullValue' are specified in resultMaps. + o Fixed IBATIS-258: invalid DOCTYPE. Changed the DOCTYPE to the ibatis.apache.org + o Fixed JIRA IBATIS-249: Race conditions in Throttle lead to thread blockage popping items from ThrottledPools under stress + o Fixed IBATIS-260: Hash conflict with groupBy resultMaps + o Fixed IBATIS-263 to allow type aliases to be case insensitive. + o Fixed IBATIS-167: Improvements in SimpleDataSource + o Fixed IBATIS-109: Make PaginatedList work with IBM's broken JDBC driver + o Fixed IBATIS-230: Warn when 2 ids of a sql tag are the identical + o Fixed IBATIS-210/224 that will allow the use of enums in Java 1.5 while still being backward compatible with 1.4 + o Fixed IBATIS-204 Cache layer does no logging of puts, gets, flushes, now it can at debug logging level. + o Fixed IBATIS-275, add comments only to indicate flushDataCache(string) always uses namespace. + o Fixed IBATIS-127, PropertyAccessPlan should put more context information when throwing an exception. Fix changes the error message to include the property causing the exception. + o Fixed IBATIS-281 and IBATIS-293 Nested Iterate Tags + o Added IBATIS-205 Change selected access modifiers from private to protected + o Fixed IBATIS-166 and IBATIS-271 Add overloads for common SqlMapClient methods without parameterObject parameter + o Fixed IBATIS-128 - log an error if there are overloaded setter methods + o Added IBATIS-22 - specify statement timeouts using the JDBC driver support + o Fixed IBATIS-269 Added check for multiple result set support -- 2.1.7 - Jan 21, 2006 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com
svn commit: r411921 - /ibatis/trunk/java/mapper/mapper2/doc/release.txt
Author: cbegin Date: Mon Jun 5 14:18:22 2006 New Revision: 411921 URL: http://svn.apache.org/viewvc?rev=411921view=rev Log: Updated release.txt Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=411921r1=411920r2=411921view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Mon Jun 5 14:18:22 2006 @@ -29,6 +29,7 @@ o Fixed IBATIS-128 - log an error if there are overloaded setter methods o Added IBATIS-22 - specify statement timeouts using the JDBC driver support o Fixed IBATIS-269 Added check for multiple result set support + o FIXED IBATIS-293 Fix use of list[]-notation in propertyattributes of dynamic tags -- 2.1.7 - Jan 21, 2006
svn commit: r411923 - in /ibatis/trunk/java/mapper/mapper2: build/version.properties src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java
Author: cbegin Date: Mon Jun 5 14:31:12 2006 New Revision: 411923 URL: http://svn.apache.org/viewvc?rev=411923view=rev Log: Fixed iBATIS-286: Close session upon null user connection Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.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=411923r1=411922r2=411923view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Mon Jun 5 14:31:12 2006 @@ -1,5 +1,5 @@ #Build version info -#Mon Jun 05 15:03:40 MDT 2006 +#Mon Jun 05 15:28:34 MDT 2006 version=2.1.7 -buildDate=2006/06/05 15\:03 -buildNum=612 +buildDate=2006/06/05 15\:28 +buildNum=613 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java?rev=411923r1=411922r2=411923view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java Mon Jun 5 14:31:12 2006 @@ -159,8 +159,14 @@ } public void setUserConnection(Connection connection) throws SQLException { + try { getLocalSqlMapSession().setUserConnection(connection); + } finally { +if (connection == null) { + getLocalSqlMapSession().close(); +} } +} /** * TODO Deprecated
svn commit: r411924 - /ibatis/trunk/java/mapper/mapper2/doc/release.txt
Author: cbegin Date: Mon Jun 5 14:32:18 2006 New Revision: 411924 URL: http://svn.apache.org/viewvc?rev=411924view=rev Log: Updated release.txt Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=411924r1=411923r2=411924view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Mon Jun 5 14:32:18 2006 @@ -29,7 +29,8 @@ o Fixed IBATIS-128 - log an error if there are overloaded setter methods o Added IBATIS-22 - specify statement timeouts using the JDBC driver support o Fixed IBATIS-269 Added check for multiple result set support - o FIXED IBATIS-293 Fix use of list[]-notation in propertyattributes of dynamic tags + o FIXED IBATIS-293 Fix use of list[]-notation in propertyattributes of dynamic tags + o Fixed IBATIS-286: close session upon null user connection -- 2.1.7 - Jan 21, 2006
svn commit: r414382 - /ibatis/trunk/java/mapper/mapper2/build/
Author: cbegin Date: Wed Jun 14 13:42:14 2006 New Revision: 414382 URL: http://svn.apache.org/viewvc?rev=414382view=rev Log: (empty) Modified: ibatis/trunk/java/mapper/mapper2/build/ (props changed) Propchange: ibatis/trunk/java/mapper/mapper2/build/ -- --- svn:ignore (original) +++ svn:ignore Wed Jun 14 13:42:14 2006 @@ -1,4 +1,3 @@ - *.ser *.zip deploy @@ -8,3 +7,4 @@ work exploded coverage.ec +ibderby
svn commit: r414383 - /ibatis/trunk/java/mapper/mapper2/build/
Author: cbegin Date: Wed Jun 14 13:43:09 2006 New Revision: 414383 URL: http://svn.apache.org/viewvc?rev=414383view=rev Log: added derby log to ignore list (my last commit added the derby build dir to the ignore list -- sorry for the missing comment) Modified: ibatis/trunk/java/mapper/mapper2/build/ (props changed) Propchange: ibatis/trunk/java/mapper/mapper2/build/ -- --- svn:ignore (original) +++ svn:ignore Wed Jun 14 13:43:09 2006 @@ -8,3 +8,4 @@ exploded coverage.ec ibderby +derby.log
svn commit: r424891 - /ibatis/trunk/site/template/menu.vm
Author: cbegin Date: Sun Jul 23 20:30:04 2006 New Revision: 424891 URL: http://svn.apache.org/viewvc?rev=424891view=rev Log: (empty) Modified: ibatis/trunk/site/template/menu.vm Modified: ibatis/trunk/site/template/menu.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/template/menu.vm?rev=424891r1=424890r2=424891view=diff == --- ibatis/trunk/site/template/menu.vm (original) +++ ibatis/trunk/site/template/menu.vm Sun Jul 23 20:30:04 2006 @@ -13,6 +13,8 @@ bDownloads and Documentation/bbr/ a href=javadownloads.html title=Everything you need to run iBATIS for Javafor Java/abr/ a href=dotnetdownloads.cgi title=Everything you need to run iBATIS for .NETfor .NET/abr/ + a href=docs/ruby title=Everything you need to run iBATIS for Ruby (aka RBatis)for Ruby/Rails/abr/ + br/ bResources/bbr/ a href=help.html title=How To Get HelpHow To Get Help/abr/
svn commit: r426872 - in /ibatis/trunk/site: pages/ template/
Author: cbegin Date: Sun Jul 30 00:37:12 2006 New Revision: 426872 URL: http://svn.apache.org/viewvc?rev=426872view=rev Log: 1) Bit of a site redesign. 2) Simplified menu 3) Updated news (Ruby, confs, dtds etc.) 4) Consolidated a the mapper/dao/petstore useless pages into a single overview 5) Added what should hopefully be helpful links for finding the Java, .NET and Ruby resources. Added: ibatis/trunk/site/pages/overview.vm ibatis/trunk/site/template/arrow.gif (with props) Removed: ibatis/trunk/site/pages/dao.vm ibatis/trunk/site/pages/datamapper.vm ibatis/trunk/site/pages/petstore.vm Modified: ibatis/trunk/site/pages/archive.vm ibatis/trunk/site/pages/events.vm ibatis/trunk/site/pages/index.vm ibatis/trunk/site/pages/newsbyte.vm ibatis/trunk/site/pages/team.vm ibatis/trunk/site/template/default.css ibatis/trunk/site/template/default.vm ibatis/trunk/site/template/menu.vm Modified: ibatis/trunk/site/pages/archive.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/archive.vm?rev=426872r1=426871r2=426872view=diff == --- ibatis/trunk/site/pages/archive.vm (original) +++ ibatis/trunk/site/pages/archive.vm Sun Jul 30 00:37:12 2006 @@ -7,6 +7,128 @@ h2News Archive/h2 + h3iBATIS.NET DataMapper 1.5.1 and DataAccess 1.8.1 Beta!/h3 +p(Jul 27, 2006) This release is primarily a bug fix for new constructor tag./p + +pThanks again for your comments and suggestions. Enjoy!/p + +pSee the change log for more details. Downloads will be available from a href=http://ibatis.apache.org/dotnetdownloads.cgi;http://ibatis.apache.org/dotnetdownloads.cgi/a../p + + +h3iBATIS.NET DataMapper 1.5 and DataAccess 1.8 Beta!/h3 +p(Jul 5, 2006) The iBATIS.NET team is pleased to announce that the BETA releases of the DataMapper 1.5 and DataAccess 1.8 frameworks are ready!/p + +pThis release is primarily a bug fix and documentation enhancement release. However, the first public binaries for .NET 2.0 have also been included:/p + +ul +liBinaries for .NET 1.1 and .NET 2.0 with SDK docs/li +liUpdated documentation/li +liRecent source distribution/li +li.NET 2.0 Tutorial/li +/ul +pThanks again for your comments and suggestions. Enjoy!/p + +pSee the change log for more details. Downloads will be available from a href=http://ibatis.apache.org/dotnetdownloads.cgi;http://ibatis.apache.org/dotnetdownloads.cgi/a../p + + +h3iBATIS.NET DataMapper 1.3 and DataAccess 1.7 General Availability!/h3 +p(Jun 12, 2006) The votes are in and both distributions are now tagged as GA!/p +pba href=dotnetdownloads.cgiDownload iBATIS.NET DataMapper 1.3 and DataAccess 1.7!/a/b/p + +h3iBATIS Java 2.1.7 - Maintenance Release - Last 1.3 Compatible Release!/h3 + +p(Jan 21, 2006) Well, as we said back in November, iBATIS will require JDK 1.4 as of the 2.2.0 release. + We expect that this 2.1.7 release will be the last JDK 1.3 compatible release that we make, unless a serious + stability or security flaw is found, in which case we'll deploy a fix from a branch of the source. This release + contains a number of minor bug fixes, an enhanced entity resolver. 2.2.0 will be an interesting release with + some new features that we've been looking forward to. +/p + + p +a href=javadownloads.htmlGet iBATIS 2.1.7 from the Downloads page./a +br/ + /p + + h3iBATIS.NET DataMapper V1.3 Beta and DataAccess V1.7 Beta/h3 + p(Dec 15, 2005) The iBATIS.NET team is pleased to announce that the Beta distributions of the DataMapper V1.3 and DataAccess V1.7 frameworks are ready! + Although this is primarily for bug fixes and documentation updates, there are some important changes:/p + ul +libEnabling Intellisense in Visual Studio 2003/b for configuration and mapping files/li +libUpdates to configuration and mapping schemas/b/li +liNow uses bCastle.DynamicProxy V1.1.5.0/b/li +liAdded bassembly signatures/b/li +liProvides bcustom logger support/b/li +libRemoves the use of Xml serialization/b for loading configuration files/li + /ul + + pPlease see the change log for more details. Thanks once again for your comments and suggestions. Enjoy!/p + + pa href=dotnetdownloads.htmlGet the DataMapper V1.3 Beta and DataAccess V1.7 Beta from the Downloads page./a/p + +h3New Tools Section/h3 +p(Dec 10, 2005) We have added a tools section to the site. The first tool is Abator - a code generator + for iBATIS (Java only). Abator generates SqlMaps, Java domain classes, and Java DAO classes.p + + pa href=tools.htmlCheck out the Tools Section./a/p + +h3Have a look at JPetStore 5.0/h3 +p(Dec 8, 2005) JPetStore 5.0 is now available. This release focuses on cleaning up some of the mess created by + JPetStore's heritage as a testbed for performance and comparisons to other implementations including LOC benchmarks, + which are a horrible thing. Significant changes and additions
svn commit: r427440 - /ibatis/trunk/site/template/default.css
Author: cbegin Date: Mon Jul 31 21:19:26 2006 New Revision: 427440 URL: http://svn.apache.org/viewvc?rev=427440view=rev Log: Reverted colors to blue/green/red Modified: ibatis/trunk/site/template/default.css Modified: ibatis/trunk/site/template/default.css URL: http://svn.apache.org/viewvc/ibatis/trunk/site/template/default.css?rev=427440r1=427439r2=427440view=diff == --- ibatis/trunk/site/template/default.css (original) +++ ibatis/trunk/site/template/default.css Mon Jul 31 21:19:26 2006 @@ -104,16 +104,16 @@ text-align: center; color: #ff; font-weight: bold; - background-color: #FF851A; + background-color: #4343c8; } th.java:hover { - background-color: #CC; + background-color: #8787ff; } th.javaa, th.javaa:link, th.javaa:visited, th.javaa:hover { color: #ff; } th.javaa:hover { - background-color: #CC; + background-color: #8787ff; } th.cs { @@ -127,16 +127,16 @@ text-align: center; color: #ff; font-weight: bold; - background-color: #FFF957; + background-color: #43c843; } th.cs:hover { - background-color: #CC; + background-color: #87ff87; } th.csa, th.csa:link, th.csa:visited, th.csa:hover { color: #ff; } th.csa:hover { - background-color: #CC; + background-color: #87ff87; } th.rb { @@ -150,16 +150,16 @@ text-align: center; color: #ff; font-weight: bold; - background-color: #57B0FF; + background-color: #c84343; } th.rb:hover { - background-color: #CC; + background-color: #ff8787; } th.rba, th.rba:link, th.rba:visited, th.rba:hover { color: #ff; } th.rba:hover { - background-color: #CC; + background-color: #ff8787; } #Contentli {
svn commit: r431134 - in /ibatis/trunk/java/mapper/mapper2: devbin/ devlib/ test/com/ibatis/sqlmap/ test/com/ibatis/sqlmap/maps/ test/com/ibatis/sqlmap/proc/ test/scripts/
Author: cbegin Date: Sat Aug 12 19:07:58 2006 New Revision: 431134 URL: http://svn.apache.org/viewvc?rev=431134view=rev Log: Removed Derby in favour of HSQLDB Removed: ibatis/trunk/java/mapper/mapper2/devbin/ ibatis/trunk/java/mapper/mapper2/devlib/derby.jar ibatis/trunk/java/mapper/mapper2/devlib/derbytools.jar ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbyProc.xml ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbySqlMapConfig.properties ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/proc/ ibatis/trunk/java/mapper/mapper2/test/scripts/derby-proc-init.sql
svn commit: r431141 - in /ibatis/trunk/java/mapper/mapper2: devlib/ test/com/ibatis/sqlmap/ test/com/ibatis/sqlmap/maps/ test/com/ibatis/sqlmap/proc/ test/scripts/
Author: cbegin Date: Sat Aug 12 20:43:37 2006 New Revision: 431141 URL: http://svn.apache.org/viewvc?rev=431141view=rev Log: Put Derby back after re-reading Brandon's email from 3 months ago. :-) Love source control. Added: ibatis/trunk/java/mapper/mapper2/devlib/derby.jar - copied unchanged from r431133, ibatis/trunk/java/mapper/mapper2/devlib/derby.jar ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java - copied, changed from r431133, ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbyProc.xml - copied unchanged from r431133, ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbyProc.xml ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbySqlMapConfig.properties - copied unchanged from r431133, ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbySqlMapConfig.properties ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml - copied unchanged from r431133, ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/proc/ - copied from r431133, ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/proc/ ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/proc/DerbyProcs.java - copied unchanged from r431133, ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/proc/DerbyProcs.java ibatis/trunk/java/mapper/mapper2/test/scripts/derby-proc-init.sql - copied unchanged from r431133, ibatis/trunk/java/mapper/mapper2/test/scripts/derby-proc-init.sql Copied: ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java (from r431133, ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java?p2=ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.javap1=ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.javar1=431133r2=431141rev=431141view=diff == --- ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java (original) +++ ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java Sat Aug 12 20:43:37 2006 @@ -1,11 +1,10 @@ package com.ibatis.sqlmap; +import com.ibatis.common.resources.Resources; + import java.util.HashMap; -import java.util.Iterator; import java.util.List; import java.util.Map; - -import com.ibatis.common.resources.Resources; public class MultiResultSetTest extends BaseSqlMapTest {
svn commit: r431144 - /ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java
Author: cbegin Date: Sat Aug 12 21:12:37 2006 New Revision: 431144 URL: http://svn.apache.org/viewvc?rev=431144view=rev Log: more cosmetic changes to test Modified: ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java Modified: ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java?rev=431144r1=431143r2=431144view=diff == --- ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java (original) +++ ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/MultiResultSetTest.java Sat Aug 12 21:12:37 2006 @@ -6,46 +6,34 @@ import java.util.List; import java.util.Map; - public class MultiResultSetTest extends BaseSqlMapTest { // SETUP TEARDOWN protected void setUp() throws Exception { - -initSqlMap( -com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml, -Resources.getResourceAsProperties( -com/ibatis/sqlmap/maps/DerbySqlMapConfig.properties)); - +initSqlMap(com/ibatis/sqlmap/maps/DerbySqlMapConfig.xml, Resources.getResourceAsProperties(com/ibatis/sqlmap/maps/DerbySqlMapConfig.properties)); initScript(scripts/account-init.sql); initScript(scripts/derby-proc-init.sql); - + } - + /** * This test should return 2 lists of 2 accounts each - * */ public void testShouldRetrieveTwoSetsOfTwoAccountsFromMultipleResultSets() { - Map persons = new HashMap(); -persons.put(accountId1,new Integer(1)); -persons.put(accountId2,new Integer(2)); -persons.put(accountId3,new Integer(3)); -persons.put(accountId4,new Integer(4)); - +persons.put(accountId1, new Integer(1)); +persons.put(accountId2, new Integer(2)); +persons.put(accountId3, new Integer(3)); +persons.put(accountId4, new Integer(4)); try { - List results = - sqlMap.queryForList(getMultiListsRm, persons); - - assertEquals(2,results.size()); + List results = sqlMap.queryForList(getMultiListsRm, persons); + assertEquals(2, results.size()); } catch (Exception e) { fail(e.getMessage()); } } - - + }
svn commit: r431297 - in /ibatis/trunk/java/mapper/mapper2: build/ doc/ src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ src/com/ibatis/sqlmap/engine/type/
Author: cbegin Date: Sun Aug 13 22:48:51 2006 New Revision: 431297 URL: http://svn.apache.org/viewvc?rev=431297view=rev Log: Fixed IBATIS-325 SimpleDateFormat thread safety issue. Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/SimpleDateFormatter.java Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/doc/release.txt ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/DateOnlyTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/DateTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/SqlDateTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/SqlTimeTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/SqlTimestampTypeHandler.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TimeOnlyTypeHandler.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=431297r1=431296r2=431297view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sun Aug 13 22:48:51 2006 @@ -1,5 +1,5 @@ #Build version info -#Sun Aug 13 02:50:18 MDT 2006 +#Sun Aug 13 23:45:30 MDT 2006 version=2.1.7 -buildDate=2006/08/13 02\:50 -buildNum=624 +buildDate=2006/08/13 23\:45 +buildNum=626 Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=431297r1=431296r2=431297view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Sun Aug 13 22:48:51 2006 @@ -11,6 +11,7 @@ o Added support for ResultSet OUT params from stored procs (e.g. Oracle Ref Cursor) o Added support for Multiple ResultSets mapped to corresponding ResultMaps or ResultClasses. + o Fixed IBATIS-325 - DateTypeHandler uses static SimpleDateFormat instance. Not thread-safe. o Fixed IBATIS-224 - isNotNull node causes typehandler mappings in statement to fail o Fixed IBATIS-249 - Race conditions in Throttle lead to thread blockage popping items from ThrottledPools under stress o Fixed IBATIS-250 - CLONE -SELECT statement returns unexpected result when 'groupBy' and 'nullValue' are specified in resultMaps. Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java?rev=431297r1=431296r2=431297view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/sql/dynamic/elements/ConditionalTagHandler.java Sun Aug 13 22:48:51 2006 @@ -17,13 +17,10 @@ import com.ibatis.common.beans.Probe; import com.ibatis.common.beans.ProbeFactory; - +import com.ibatis.sqlmap.engine.type.SimpleDateFormatter; import java.math.BigDecimal; import java.math.BigInteger; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; import java.util.Date; public abstract class ConditionalTagHandler extends BaseTagHandler { @@ -32,7 +29,6 @@ public static final long NOT_COMPARABLE = Long.MIN_VALUE; private static final String DATE_MASK = /MM/dd hh:mm:ss; - private static final DateFormat DATE_FORMAT = new SimpleDateFormat(DATE_MASK); private static final String START_INDEX = [; @@ -137,11 +133,7 @@ } else if (type == Boolean.class || type == boolean.class) { return Boolean.valueOf(value); } else if (type == Date.class) { - try { -return DATE_FORMAT.parse(value); - } catch (ParseException e) { -throw new RuntimeException(Error parsing date. Cause: + e, e); - } + return SimpleDateFormatter.format(DATE_MASK, value); } else if (type == BigInteger.class) { return new BigInteger(value); } else if (type == BigDecimal.class) { @@ -158,7 +150,6 @@ * * @param ctx * @param tag - * @return */ protected String getResolvedProperty(SqlTagContext ctx, SqlTag tag) { String prop = tag.getPropertyAttr(); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type
svn commit: r431298 - in /ibatis/trunk/java/mapper/mapper2: build/version.properties src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.ja
Author: cbegin Date: Sun Aug 13 23:10:08 2006 New Revision: 431298 URL: http://svn.apache.org/viewvc?rev=431298view=rev Log: Fixed IBATIS-320 When every method call openSession() return same object . Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.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=431298r1=431297r2=431298view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sun Aug 13 23:10:08 2006 @@ -1,5 +1,5 @@ #Build version info -#Sun Aug 13 23:45:30 MDT 2006 +#Mon Aug 14 00:07:17 MDT 2006 version=2.1.7 -buildDate=2006/08/13 23\:45 -buildNum=626 +buildDate=2006/08/14 00\:07 +buildNum=627 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java?rev=431298r1=431297r2=431298view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapClientImpl.java Sun Aug 13 23:10:08 2006 @@ -214,14 +214,14 @@ } public SqlMapSession openSession() { -SqlMapSessionImpl sqlMapSession = getLocalSqlMapSession(); +SqlMapSessionImpl sqlMapSession = new SqlMapSessionImpl(this); sqlMapSession.open(); return sqlMapSession; } public SqlMapSession openSession(Connection conn) { try { - SqlMapSessionImpl sqlMapSession = getLocalSqlMapSession(); + SqlMapSessionImpl sqlMapSession = new SqlMapSessionImpl(this); sqlMapSession.open(); sqlMapSession.setUserConnection(conn); return sqlMapSession; Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java?rev=431298r1=431297r2=431298view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java Sun Aug 13 23:10:08 2006 @@ -838,7 +838,7 @@ session.setTransactionState(TransactionState.STATE_USER_PROVIDED); } else { session.setTransaction(null); - pushSession(session); + session.reset(); // used to be pushSession, which is probably incorrect. } } /**
svn commit: r431299 - /ibatis/trunk/java/mapper/mapper2/doc/release.txt
Author: cbegin Date: Sun Aug 13 23:12:55 2006 New Revision: 431299 URL: http://svn.apache.org/viewvc?rev=431299view=rev Log: Updated release.txt with IBATIS-320 Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=431299r1=431298r2=431299view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Sun Aug 13 23:12:55 2006 @@ -11,6 +11,7 @@ o Added support for ResultSet OUT params from stored procs (e.g. Oracle Ref Cursor) o Added support for Multiple ResultSets mapped to corresponding ResultMaps or ResultClasses. + o Fixed IBATIS-320 - openSession() returns same object o Fixed IBATIS-325 - DateTypeHandler uses static SimpleDateFormat instance. Not thread-safe. o Fixed IBATIS-224 - isNotNull node causes typehandler mappings in statement to fail o Fixed IBATIS-249 - Race conditions in Throttle lead to thread blockage popping items from ThrottledPools under stress
svn commit: r431306 - in /ibatis/trunk/java/mapper/mapper2: build/ doc/ src/com/ibatis/common/beans/ test/com/ibatis/sqlmap/ test/com/ibatis/sqlmap/maps/ test/testdomain/
Author: cbegin Date: Mon Aug 14 00:45:08 2006 New Revision: 431306 URL: http://svn.apache.org/viewvc?rev=431306view=rev Log: Added support for private properties. Added: ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/PrivateMethodAccessTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/PrivateBook.xml ibatis/trunk/java/mapper/mapper2/test/testdomain/PrivateBook.java Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/doc/release.txt ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/NestedIterateTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/ResultObjectFactoryTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/SqlMapConfig.xml Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?rev=431306r1=431305r2=431306view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Mon Aug 14 00:45:08 2006 @@ -1,5 +1,5 @@ #Build version info -#Mon Aug 14 00:07:17 MDT 2006 +#Mon Aug 14 01:41:36 MDT 2006 version=2.1.7 -buildDate=2006/08/14 00\:07 -buildNum=627 +buildDate=2006/08/14 01\:41 +buildNum=628 Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=431306r1=431305r2=431306view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Mon Aug 14 00:45:08 2006 @@ -10,6 +10,7 @@ o Removed custom nested transactions (JDBC 1.4 now required) o Added support for ResultSet OUT params from stored procs (e.g. Oracle Ref Cursor) o Added support for Multiple ResultSets mapped to corresponding ResultMaps or ResultClasses. + o Added support for private properties. o Fixed IBATIS-320 - openSession() returns same object o Fixed IBATIS-325 - DateTypeHandler uses static SimpleDateFormat instance. Not thread-safe. Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java?rev=431306r1=431305r2=431306view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java Mon Aug 14 00:45:08 2006 @@ -15,16 +15,17 @@ */ package com.ibatis.common.beans; +import com.ibatis.common.logging.Log; +import com.ibatis.common.logging.LogFactory; + import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.UndeclaredThrowableException; +import java.lang.reflect.ReflectPermission; import java.math.BigDecimal; import java.math.BigInteger; import java.util.*; -import com.ibatis.common.logging.Log; -import com.ibatis.common.logging.LogFactory; - /** * This class represents a cached set of class definition information that * allows for easy mapping between property names and getter/setter methods. @@ -84,7 +85,7 @@ } private void addMethods(Class cls) { -Method[] methods = cls.getMethods(); +Method[] methods = getAllMethodsForClass(cls); for (int i = 0; i methods.length; i++) { String name = methods[i].getName(); if (name.startsWith(set) name.length() 3) { @@ -112,6 +113,51 @@ } } name = null; +} + } + + private Method[] getAllMethodsForClass(Class cls) { +Set uniqueMethodNames = new HashSet(); +List allMethods = new ArrayList(); +Class currentClass = cls; +while (currentClass != null) { + addMethods(currentClass, uniqueMethodNames, allMethods); + Class[] interfaces = currentClass.getInterfaces(); + for (int i=0; iinterfaces.length; i++) { +addMethods(interfaces[i], uniqueMethodNames, allMethods); + } + currentClass = currentClass.getSuperclass(); +} +return (Method[]) allMethods.toArray(new Method[allMethods.size()]); + } + + private void addMethods(Class currentClass, Set uniqueMethodNames, List allMethods) { +Method[] methods = currentClass.getDeclaredMethods(); +for (int i=0; i methods.length; i++) { + Method currentMethod = methods[i]; + String methodName = currentMethod.getName() + currentMethod.getParameterTypes().length; + if (!uniqueMethodNames.contains(methodName)) { +uniqueMethodNames.add(methodName); +if (canAccessPrivateMethods
svn commit: r431807 - in /ibatis/trunk/java/docs: fr/iBATIS-SqlMaps-2-Tutorial_fr.sxw iBATIS-SqlMaps-2-Tutorial_fr.sxw
Author: cbegin Date: Tue Aug 15 21:46:24 2006 New Revision: 431807 URL: http://svn.apache.org/viewvc?rev=431807view=rev Log: Moved remotely Added: ibatis/trunk/java/docs/fr/iBATIS-SqlMaps-2-Tutorial_fr.sxw - copied unchanged from r431806, ibatis/trunk/java/docs/iBATIS-SqlMaps-2-Tutorial_fr.sxw Removed: ibatis/trunk/java/docs/iBATIS-SqlMaps-2-Tutorial_fr.sxw
svn commit: r431809 - in /ibatis/trunk/java/docs: iBATIS-SqlMaps-2-Tutorial-IT.sxw it/iBATIS-SqlMaps-2-Tutorial-IT.sxw
Author: cbegin Date: Tue Aug 15 21:46:39 2006 New Revision: 431809 URL: http://svn.apache.org/viewvc?rev=431809view=rev Log: Moved remotely Added: ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial-IT.sxw - copied unchanged from r431808, ibatis/trunk/java/docs/iBATIS-SqlMaps-2-Tutorial-IT.sxw Removed: ibatis/trunk/java/docs/iBATIS-SqlMaps-2-Tutorial-IT.sxw
svn commit: r431810 - in /ibatis/trunk/java/docs: iBATIS-SqlMaps-2_ko.sxw ko/iBATIS-SqlMaps-2_ko.sxw
Author: cbegin Date: Tue Aug 15 21:46:46 2006 New Revision: 431810 URL: http://svn.apache.org/viewvc?rev=431810view=rev Log: Moved remotely Added: ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2_ko.sxw - copied unchanged from r431809, ibatis/trunk/java/docs/iBATIS-SqlMaps-2_ko.sxw Removed: ibatis/trunk/java/docs/iBATIS-SqlMaps-2_ko.sxw
svn commit: r431812 - in /ibatis/trunk/java/docs: iBATIS-SqlMaps-2-Tutorial.sxw iBATIS-SqlMaps-2-Tutorial_en.sxw
Author: cbegin Date: Tue Aug 15 21:47:11 2006 New Revision: 431812 URL: http://svn.apache.org/viewvc?rev=431812view=rev Log: Renamed remotely Added: ibatis/trunk/java/docs/iBATIS-SqlMaps-2-Tutorial_en.sxw - copied unchanged from r431811, ibatis/trunk/java/docs/iBATIS-SqlMaps-2-Tutorial.sxw Removed: ibatis/trunk/java/docs/iBATIS-SqlMaps-2-Tutorial.sxw
svn commit: r431813 - in /ibatis/trunk/java/docs: iBATIS-SqlMaps-2.sxw iBATIS-SqlMaps-2_en.sxw
Author: cbegin Date: Tue Aug 15 21:47:26 2006 New Revision: 431813 URL: http://svn.apache.org/viewvc?rev=431813view=rev Log: Renamed remotely Added: ibatis/trunk/java/docs/iBATIS-SqlMaps-2_en.sxw - copied unchanged from r431812, ibatis/trunk/java/docs/iBATIS-SqlMaps-2.sxw Removed: ibatis/trunk/java/docs/iBATIS-SqlMaps-2.sxw
svn commit: r432105 - /ibatis/trunk/java/mapper/mapper2/build/version.properties
Author: cbegin Date: Wed Aug 16 18:57:54 2006 New Revision: 432105 URL: http://svn.apache.org/viewvc?rev=432105view=rev Log: Updated build number. Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?rev=432105r1=432104r2=432105view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Wed Aug 16 18:57:54 2006 @@ -1,5 +1,5 @@ #Build version info -#Wed Aug 16 11:15:42 MDT 2006 +#Wed Aug 16 19:50:02 MDT 2006 version=2.2.0 -buildDate=2006/08/16 11\:15 -buildNum=637 +buildDate=2006/08/16 19\:50 +buildNum=638
svn commit: r432489 - /ibatis/trunk/java/mapper/mapper2/version.number
Author: cbegin Date: Thu Aug 17 22:06:09 2006 New Revision: 432489 URL: http://svn.apache.org/viewvc?rev=432489view=rev Log: added version file for anthillmay remove if anthill doesn't work for us. Added: ibatis/trunk/java/mapper/mapper2/version.number Added: ibatis/trunk/java/mapper/mapper2/version.number URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/version.number?rev=432489view=auto == --- ibatis/trunk/java/mapper/mapper2/version.number (added) +++ ibatis/trunk/java/mapper/mapper2/version.number Thu Aug 17 22:06:09 2006 @@ -0,0 +1 @@ +639 \ No newline at end of file
svn commit: r487614 - in /ibatis/trunk/site/pages: dotnetdownloads.vm javadownloads.vm onlinehelp.vm
Author: cbegin Date: Fri Dec 15 10:36:30 2006 New Revision: 487614 URL: http://svn.apache.org/viewvc?view=revrev=487614 Log: Cleaned up download pages to hopefully make it easier to read and understand. (first attempt) Modified: ibatis/trunk/site/pages/dotnetdownloads.vm ibatis/trunk/site/pages/javadownloads.vm ibatis/trunk/site/pages/onlinehelp.vm Modified: ibatis/trunk/site/pages/dotnetdownloads.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/dotnetdownloads.vm?view=diffrev=487614r1=487613r2=487614 == --- ibatis/trunk/site/pages/dotnetdownloads.vm (original) +++ ibatis/trunk/site/pages/dotnetdownloads.vm Fri Dec 15 10:36:30 2006 @@ -7,18 +7,54 @@ h2iBATIS.NET Downloads/h2 - h4Downloading/h4 -a name=Downloads/a -pUse the links below to download a binary distribution of the iBATIS.NET Data Mapper or -iBATIS.NET Data Access Objects framework from one of our mirrors. -It is good practice to verify the integrity of the distribution files, especially if you are using one of -our mirror sites../p -pThe Data Mapper and Data Access Objects frameworks are distributed as codezip/code -archives./p -pIf you do not see the file you need in the links below, please see the -a href=http://www.apache.org/dist/ibatis/;main distribution directory/a or, -preferably, its a href=[preferred]/ibatis/mirror/a./p - +!-- tables hell yeah -- +table cellpadding=0 cellspacing=0 border=0 + tr +td rowspan=2 width=70% + h4Releases/h4 + ul +lia href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataMapper-bin-1.5.1.zip onClick=javascript:urchinTracker('/downloads/DataMapper151');DataMapper 1.5.1/a [a href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataMapper-bin-1.5.1.zip.md5MD5/a] [a href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataMapper-bin-1.5.1.zip.ascPGP/a] (Apache General Availability)/li +lia href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataAccess-bin-1.8.1.zip onClick=javascript:urchinTracker('/downloads/DataAccess181');DataAccess 1.8.1/a [a href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataAccess-bin-1.8.1.zip.md5MD5/a] [a href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataAccess-bin-1.8.1.zip.ascPGP/a] (Apache General Availability)/li +lia href=[preferred]/ibatis/source/ibatis.net/Source-revision-426164.zip onClick=javascript:urchinTracker('/downloads/DotNetSource426164');Source Revision 426164/a [a href=[preferred]/ibatis/source/ibatis.net/Source-revision-426164.zip.md5MD5/a] [a href=[preferred]/ibatis/source/ibatis.net/Source-revision-426164.zip.ascPGP/a]/li + /ul + + ul +lia href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataMapper-bin-1.3.0.zip onClick=javascript:urchinTracker('/downloads/DataMapper130');DataMapper 1.3/a [a href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataMapper-bin-1.3.0.zip.md5MD5/a] [a href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataMapper-bin-1.3.0.zip.ascPGP/a] (Apache General Availability)/li +lia href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataAccess-bin-1.7.0.zip onClick=javascript:urchinTracker('/downloads/DataAccess170');DataAccess 1.7/a [a href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataAccess-bin-1.7.0.zip.md5MD5/a] [a href=[preferred]/ibatis/binaries/ibatis.net/IBatisNet.DataAccess-bin-1.7.0.zip.ascPGP/a] (Apache General Availability)/li +lia href=[preferred]/ibatis/source/ibatis.net/Source.356824.zip onClick=javascript:urchinTracker('/downloads/DotNetSource356824');Source Revision 356824/a [a href=[preferred]/ibatis/source/ibatis.net/Source.356824.zip.md5MD5/a] [a href=[preferred]/ibatis/source/ibatis.net/Source.356824.zip.ascPGP/a]/li + /ul + + ul +lia href=http://sourceforge.net/project/showfiles.php?group_id=109704;Old Releases (at SourceForge)/a/li + /ul + +h4Examples/h4 + ul +lia href=http://prdownloads.sourceforge.net/ibatisnet/Tutorial-1.2.1.zip?download;DataMapper Tutorial 1.2.1 Docs and Source/a/li +lia href=http://prdownloads.sourceforge.net/ibatisnet/NPetshop-1.0.0.RC1.zip?download;NPetShop Example Application/a/li + /ul + ul +lia href=http://people.apache.org/dist/ibatis/ibatis.net/beta/tutorial2.zip; onClick=javascript:urchinTracker('/downloads/DataMapperTutorial20');DataMapper Tutorial .NET 2.0 Beta/a [a href=http://people.apache.org/dist/ibatis/ibatis.net/beta/tutorial2.zip.md5;MD5/a] [a href=http://people.apache.org/dist/ibatis/ibatis.net/beta/tutorial2.zip.asc;PGP/a]/li + /ul + + h4Documentation /h4 + + ul +li + English + ul +lia href=[preferred]/ibatis/binaries/ibatis.net/Doc-DataMapper-1.5.1.zip onClick=javascript:urchinTracker('/downloads
svn commit: r500546 - /ibatis/trunk/site/pages/index.vm
Author: cbegin Date: Sat Jan 27 07:26:43 2007 New Revision: 500546 URL: http://svn.apache.org/viewvc?view=revrev=500546 Log: fixed spacing on index Modified: ibatis/trunk/site/pages/index.vm Modified: ibatis/trunk/site/pages/index.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/index.vm?view=diffrev=500546r1=500545r2=500546 == --- ibatis/trunk/site/pages/index.vm (original) +++ ibatis/trunk/site/pages/index.vm Sat Jan 27 07:26:43 2007 @@ -47,101 +47,101 @@ /div -h2News/h2 + h2News/h2 -h3iBATIS in Action Released/h3 -p(January 26, 2007) A book for iBATIS? No way! Yes way. The book is here. -This is the first edition, targeting primarily the Java platform. But it's -definitely useful for .NET and even Ruby users, even if only to understand -the concepts and and ideas behind iBATIS. Everything else is just syntax. Some people -may wonder if we're just trying to make money by selling documentation (sounds -familiar to some no doubt). But trust us, writing technical books is NO way -to make money! We did this for you, so you'd have a definitive guide to read -from instead of wading through various internet resources. I think we're more -worried about the Amazon.com comments than the sales... ;-) I (Clinton) really -want to say what a fantastic experience it was to work with Brandon and Larry -on this project. You guys did a fantastic job./p -pba href=http://www.manning.com/begin/;Buy the book in print or PDF here./a/b/p - -h3DAO Deprecated and Made Available Separately/h3 -p(January 26, 2007) This is a little late notice, but iBATIS for Java 2.3 has enough -votes to go GA now, so I figured it would be good to note here. The DAO -framework has indeed been deprecated. Deprecated doesn't mean dead. Many people -can and will continue to use it. In fact, it will be a bit cleaner because -it's made available separately so you can feel more comfortable changing it if you -need to. Feel free to take the code and make it your own. Or just use it as -is until it gets too old (it's pretty easy to switch iBATIS DAOs to Spring DAOs -if and when the time is right). We've made the Java DAO framework permanently available -on the Java downloads page. Deprecated basically means we just won't be -adding any features to it in the future, which is pretty much the same way it's been -for a couple of years -- I guess it's perfect. ;-) Kidding./p -pba href=javadownloads.cgiThe DAO framework will always be available here./a/b/p - - -h3iBATIS for Java 2.2.0 General Availability/h3 -p(December 5, 2006) The votes are in and iBATIS for Java 2.2.0 is promoted - to general availabilty status. This release is the most significant release - of iBATIS in at least a year. See the - release notes on the download page for full details. - This is the last release of iBATIS that will include the DAO framework./p -pba href=javadownloads.cgiDownload iBATIS 2.2.0!/a/b/p - -h3iBATIS for Java 2.3.0 Released [Status: Beta]/h3 -p(December 1, 2006) This release includes several bug fixes and enhancements. - Additionally, this release offers new support for local caching of prepared statements. - Caching prepared statements can lead to significant performance improvements - in many environments./p -pThe Java DAO framework has been removed from iBATIS as of release - 2.3.0. We heartily recommend that you consider using the - a href=http://www.springframework.org; target=_blankSpring Framework/a - for all your DAO needs! Spring offers great support for iBATIS./p -pThe paginated list methods have been deprecated with this release. The methods were confusing - to many users and often misused. We suggest using native database support for paging, - or that you use the query methods with skip and max settings./p -pba href=javadownloads.cgiDownload iBATIS 2.3.0!/a/b/p - -h3ARTICLE: InfoQ has posted an article on iBATIS.NET/h3 -p -a href=http://www.infoq.com/news/2006/11/iBATIS-MySpace; target=_blankRead it !/a -p/ -Thanks to the InfoQ team! -/p - -h3iBATIS.NET DataMapper 1.5.1 and DataAccess 1.8.1 General Availability!/h3 -p(August 10, 2006) The votes are in and both distributions are now tagged as GA!/p -pThis release is primarily an enhancement release to support .NET 2.0 and also bug fix, documentation have been updated. - iBATIS now supports all essential features of .NET 2.0 (generics, nullable types), see change log for more information. - /p -pba href=dotnetdownloads.cgiDownload iBATIS.NET DataMapper 1.5.1 and DataAccess 1.8.1!/a/b/p - - -h3RBatis - iBATIS for Ruby has been released!/h3 - p(Jul 30, 2006) As promised almost exactly one year ago...iBATIS for Ruby is now here. Jon Tirsen - has joined the team and RBatis is ready to roll with a plug-in for Rails of course. You can see - the permanent link in the Path to iBATIS on the left, but don't waste time moving your mouse/p -pa
svn commit: r505839 - in /ibatis/trunk/java/mapper/mapper2: build/ src/com/ibatis/common/beans/ test/com/ibatis/sqlmap/ test/com/ibatis/sqlmap/maps/ test/testdomain/
Author: cbegin Date: Sat Feb 10 21:00:24 2007 New Revision: 505839 URL: http://svn.apache.org/viewvc?view=revrev=505839 Log: Changed syntax of field mappings to be exactly the same as property mappings. It now decides to use field mappings only if set/get methods do not exist. Added: ibatis/trunk/java/mapper/mapper2/test/testdomain/FieldAccount.java Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/BaseSqlMapTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/DirectFieldMappingTest.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/Account.xml Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?view=diffrev=505839r1=505838r2=505839 == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sat Feb 10 21:00:24 2007 @@ -1,5 +1,5 @@ #Build version info -#Sat Feb 10 18:39:04 MST 2007 +#Sat Feb 10 21:56:50 MST 2007 version=2.3.1 -buildDate=2007/02/10 18\:39 -buildNum=681 +buildDate=2007/02/10 21\:56 +buildNum=683 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java?view=diffrev=505839r1=505838r2=505839 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/beans/ClassInfo.java Sat Feb 10 21:00:24 2007 @@ -115,10 +115,14 @@ } } if (field.isAccessible()) { -setMethods.put(( + field.getName() + ), new SetFieldInvoker(field)); -setTypes.put(( + field.getName() + ), field.getType()); -getMethods.put(( + field.getName() + ), new GetFieldInvoker(field)); -getTypes.put(( + field.getName() + ), field.getType()); +if (!setMethods.containsKey(field.getName())) { + setMethods.put(field.getName(), new SetFieldInvoker(field)); + setTypes.put(field.getName(), field.getType()); +} +if (!getMethods.containsKey(field.getName())) { + getMethods.put(field.getName(), new GetFieldInvoker(field)); + getTypes.put(field.getName(), field.getType()); +} } } if (clazz.getSuperclass() != null) { Modified: ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/BaseSqlMapTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/BaseSqlMapTest.java?view=diffrev=505839r1=505838r2=505839 == --- ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/BaseSqlMapTest.java (original) +++ ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/BaseSqlMapTest.java Sat Feb 10 21:00:24 2007 @@ -8,6 +8,7 @@ import testdomain.Account; import testdomain.Order; import testdomain.PrivateAccount; +import testdomain.FieldAccount; import javax.sql.DataSource; import java.io.Reader; @@ -52,6 +53,15 @@ return account; } + protected FieldAccount newFieldAccount6() { +FieldAccount account = new FieldAccount(); +account.id(6); +account.firstName(Jennifer); +account.lastName(Begin); +account.emailAddress([EMAIL PROTECTED]); +return account; + } + protected void assertAccount1(Account account) { assertEquals(1, account.getId()); assertEquals(Clinton, account.getFirstName()); @@ -82,6 +92,13 @@ assertEquals(Jennifer, account.getFirstName()); assertEquals(Begin, account.getLastName()); assertNull(account.getEmailAddress()); + } + + protected void assertFieldAccount6(FieldAccount account) { +assertEquals(6, account.id()); +assertEquals(Jennifer, account.firstName()); +assertEquals(Begin, account.lastName()); +assertNull(account.emailAddress()); } protected void assertAccount1(Map account) { Modified: ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/DirectFieldMappingTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/DirectFieldMappingTest.java?view=diffrev=505839r1=505838r2=505839 == --- ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/DirectFieldMappingTest.java (original) +++ ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/DirectFieldMappingTest.java Sat Feb 10 21:00:24 2007 @@ -1,6 +1,6 @@ package com.ibatis.sqlmap; -import testdomain.Account; +import
svn commit: r514084 - /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java
Author: cbegin Date: Fri Mar 2 21:53:54 2007 New Revision: 514084 URL: http://svn.apache.org/viewvc?view=revrev=514084 Log: Added save method to MappedStatementConfig Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java?view=diffrev=514084r1=514083r2=514084 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java Fri Mar 2 21:53:54 2007 @@ -6,6 +6,7 @@ import com.ibatis.sqlmap.client.SqlMapException; import com.ibatis.sqlmap.engine.cache.CacheModel; import com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient; +import com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate; import com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap; import com.ibatis.sqlmap.engine.mapping.parameter.InlineParameterMapParser; import com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap; @@ -27,17 +28,17 @@ public class MappedStatementConfig { private static final Probe PROBE = ProbeFactory.getProbe(); private static final InlineParameterMapParser PARAM_PARSER = new InlineParameterMapParser(); - private SqlMapConfiguration config; private ErrorContext errorContext; private ExtendedSqlMapClient client; + private SqlMapExecutorDelegate delegate; private TypeHandlerFactory typeHandlerFactory; private MappedStatement mappedStatement; private MappedStatement rootStatement; MappedStatementConfig(SqlMapConfiguration config, SqlSource processor, GeneralStatement statement, String id, String resultMapName, String[] additionalResultMapNames, String parameterMapName, String resultSetType, String fetchSize, String parameterClassName, String resultClassName, String[] additionalResultClasses, String allowRemapping, String xmlResultName, String timeout, String cacheModelName) { -this.config = config; this.errorContext = config.getErrorContext(); this.client = config.getClient(); +this.delegate = client.getDelegate(); this.typeHandlerFactory = config.getTypeHandlerFactory(); errorContext.setActivity(parsing a mapped statement); errorContext.setObjectId(id + statement); @@ -175,6 +176,10 @@ } else { throw new SqlMapException(You cant set a select key statement on statement named + rootStatement.getId() + because it is not an InsertStatement.); } + } + + public void saveMappedStatement() { +delegate.addMappedStatement(mappedStatement); } private void setSqlForStatement(GeneralStatement statement, Sql sql) {
svn commit: r514094 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: builder/xml/ conifg/
Author: cbegin Date: Fri Mar 2 22:56:03 2007 New Revision: 514094 URL: http://svn.apache.org/viewvc?view=revrev=514094 Log: Refactored signatures Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ParameterMapConfig.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ResultMapConfig.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/SqlMapConfiguration.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java?view=diffrev=514094r1=514093r2=514094 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java Fri Mar 2 22:56:03 2007 @@ -170,9 +170,7 @@ String mode = childAttributes.getProperty(mode); String callback = childAttributes.getProperty(typeHandler); String numericScale = childAttributes.getProperty(numericScale); - -state.getParamConfig().addParameterMapping(callback, javaType, resultMap, propertyName, jdbcType, type, nullValue, mode, numericScale); - +state.getParamConfig().addParameterMapping(propertyName, javaType, jdbcType, nullValue, mode, type, numericScale, callback, resultMap); } }); } @@ -192,7 +190,7 @@ String extended = state.applyNamespace(attributes.getProperty(extends)); String xmlName = attributes.getProperty(xmlName); String groupBy = attributes.getProperty(groupBy); -ResultMapConfig resultConf = state.getConfig().newResultMapConfig(id, resultClassName, xmlName, groupBy, extended); +ResultMapConfig resultConf = state.getConfig().newResultMapConfig(id, resultClassName, groupBy, extended, xmlName); state.setResultConfig(resultConf); } }); @@ -209,7 +207,7 @@ String resultMapName = childAttributes.getProperty(resultMap); String callback = childAttributes.getProperty(typeHandler); -state.getResultConfig().addResultMapping(callback, javaType, propertyName, jdbcType, columnName, nullValue, statementName, resultMapName, columnIndex); +state.getResultConfig().addResultMapping(propertyName, columnName, columnIndex, javaType, jdbcType, nullValue, statementName, resultMapName, callback); } }); @@ -219,7 +217,7 @@ String value = childAttributes.getProperty(value); String resultMap = childAttributes.getProperty(resultMap); resultMap = state.applyNamespace(resultMap); -state.getResultConfig().addSubMap(value, resultMap); +state.getResultConfig().addDiscriminatorSubMap(value, resultMap); } }); @@ -233,7 +231,7 @@ String columnIndex = childAttributes.getProperty(columnIndex); String callback = childAttributes.getProperty(typeHandler); -state.getResultConfig().setDiscriminator(callback, javaType, jdbcType, columnName, nullValue, columnIndex); +state.getResultConfig().setDiscriminator(columnName, columnIndex, javaType, jdbcType, nullValue, callback); } }); } Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java?view=diffrev=514094r1=514093r2=514094 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java Fri Mar 2 22:56:03 2007 @@ -49,7 +49,7 @@ additionalResultClasses = state.getAllButFirstToken(resultClassName); resultClassName = state.getFirstToken(resultClassName); } -MappedStatementConfig statementConf = state.getConfig().newMappedStatementConfig(new XMLSqlSource(state, node), statement, id, resultMapName, additionalResultMapNames, parameterMapName, resultSetType, fetchSize, parameterClassName, resultClassName, additionalResultClasses, allowRemapping, xmlResultName, timeout, cacheModelName); +MappedStatementConfig statementConf = state.getConfig().newMappedStatementConfig(id, statement, new XMLSqlSource(state, node), parameterMapName, parameterClassName
svn commit: r545853 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: builder/xml/SqlMapConfigParser.java conifg/SqlMapConfiguration.java
Author: cbegin Date: Sun Jun 10 00:45:29 2007 New Revision: 545853 URL: http://svn.apache.org/viewvc?view=revrev=545853 Log: Renamed and reorganized some methods Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/SqlMapConfiguration.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java?view=diffrev=545853r1=545852r2=545853 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java Sun Jun 10 00:45:29 2007 @@ -144,7 +144,7 @@ javaType = state.getConfig().getTypeHandlerFactory().resolveAlias(javaType); callback = state.getConfig().getTypeHandlerFactory().resolveAlias(callback); -state.getConfig().addTypeHandler(Resources.classForName(javaType), jdbcType, Resources.instantiate(callback)); +state.getConfig().newTypeHandler(Resources.classForName(javaType), jdbcType, Resources.instantiate(callback)); } }); } Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/SqlMapConfiguration.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/SqlMapConfiguration.java?view=diffrev=545853r1=545852r2=545853 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/SqlMapConfiguration.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/SqlMapConfiguration.java Sun Jun 10 00:45:29 2007 @@ -56,49 +56,6 @@ return delegate; } - // - // Utility Methods - // - - TypeHandler resolveTypeHandler(TypeHandlerFactory typeHandlerFactory, Class clazz, String propertyName, Class javaType, String jdbcType) { -return resolveTypeHandler(typeHandlerFactory, clazz, propertyName, javaType, jdbcType, false); - } - - TypeHandler resolveTypeHandler(TypeHandlerFactory typeHandlerFactory, Class clazz, String propertyName, Class javaType, String jdbcType, boolean useSetterToResolve) { -TypeHandler handler; -if (clazz == null) { - // Unknown - handler = typeHandlerFactory.getUnkownTypeHandler(); -} else if (DomTypeMarker.class.isAssignableFrom(clazz)) { - // DOM - handler = typeHandlerFactory.getTypeHandler(String.class, jdbcType); -} else if (java.util.Map.class.isAssignableFrom(clazz)) { - // Map - if (javaType == null) { -handler = typeHandlerFactory.getUnkownTypeHandler(); //BUG 1012591 - typeHandlerFactory.getTypeHandler(java.lang.Object.class, jdbcType); - } else { -handler = typeHandlerFactory.getTypeHandler(javaType, jdbcType); - } -} else if (typeHandlerFactory.getTypeHandler(clazz, jdbcType) != null) { - // Primitive - handler = typeHandlerFactory.getTypeHandler(clazz, jdbcType); -} else { - // JavaBean - if (javaType == null) { -if (useSetterToResolve) { - Class type = PROBE.getPropertyTypeForSetter(clazz, propertyName); - handler = typeHandlerFactory.getTypeHandler(type, jdbcType); -} else { - Class type = PROBE.getPropertyTypeForGetter(clazz, propertyName); - handler = typeHandlerFactory.getTypeHandler(type, jdbcType); -} - } else { -handler = typeHandlerFactory.getTypeHandler(javaType, jdbcType); - } -} -return handler; - } - public void setClassInfoCacheEnabled (boolean classInfoCacheEnabled) { errorContext.setActivity(setting class info cache enabled/disabled); ClassInfo.setCacheEnabled(classInfoCacheEnabled); @@ -141,7 +98,15 @@ } } - public void addTypeHandler(Class javaType, String jdbcType, Object callback) { + public void setTransactionManager(TransactionManager txManager) { +delegate.setTxManager(txManager); + } + + public void setResultObjectFactory(ResultObjectFactory rof) { +delegate.setResultObjectFactory(rof); + } + + public void newTypeHandler(Class javaType, String jdbcType, Object callback) { try { errorContext.setActivity(building a building custom type handler); TypeHandlerFactory typeHandlerFactory = client.getDelegate().getTypeHandlerFactory(); @@ -166,14 +131,6 @@ errorContext.setObjectId(null); } - public void setTransactionManager(TransactionManager txManager) { -delegate.setTxManager(txManager); - } - - public void setResultObjectFactory(ResultObjectFactory rof) { -delegate.setResultObjectFactory(rof
svn commit: r545954 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: builder/xml/ conifg/ mapping/parameter/
Author: cbegin Date: Sun Jun 10 15:19:10 2007 New Revision: 545954 URL: http://svn.apache.org/viewvc?view=revrev=545954 Log: improved type safety for parameter map config Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ParameterMapConfig.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/SqlMapConfiguration.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMap.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/parameter/BasicParameterMapping.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java?view=diffrev=545954r1=545953r2=545954 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java Sun Jun 10 15:19:10 2007 @@ -143,7 +143,8 @@ private void addParameterMapNodelets() { parser.addNodelet(/sqlMap/parameterMap/end(), new Nodelet() { public void process(Node node) throws Exception { -state.getParamConfig().saveParameterMap(); +state.getConfig().getErrorContext().setMoreInfo(null); +state.getConfig().getErrorContext().setObjectId(null); state.setParamConfig(null); } }); @@ -152,8 +153,14 @@ Properties attributes = NodeletUtils.parseAttributes(node, state.getGlobalProps()); String id = state.applyNamespace(attributes.getProperty(id)); String parameterClassName = attributes.getProperty(class); -ParameterMapConfig paramConf = state.getConfig().newParameterMapConfig(id, parameterClassName); -state.setParamConfig(paramConf); +parameterClassName = state.getConfig().getTypeHandlerFactory().resolveAlias(parameterClassName); +try { + state.getConfig().getErrorContext().setMoreInfo(Check the parameter class.); + ParameterMapConfig paramConf = state.getConfig().newParameterMapConfig(id, Resources.classForName(parameterClassName)); + state.setParamConfig(paramConf); +} catch (Exception e) { + throw new SqlMapException(Error configuring ParameterMap. Could not set ParameterClass. Cause: + e, e); +} } }); parser.addNodelet(/sqlMap/parameterMap/parameter, new Nodelet() { @@ -167,8 +174,30 @@ String nullValue = childAttributes.getProperty(nullValue); String mode = childAttributes.getProperty(mode); String callback = childAttributes.getProperty(typeHandler); -String numericScale = childAttributes.getProperty(numericScale); -state.getParamConfig().addParameterMapping(propertyName, javaType, jdbcType, nullValue, mode, type, numericScale, callback, resultMap); +String numericScaleProp = childAttributes.getProperty(numericScale); + +callback = state.getConfig().getTypeHandlerFactory().resolveAlias(callback); +Object typeHandlerImpl = null; +if (callback != null) { + typeHandlerImpl = Resources.instantiate(callback); +} + +javaType = state.getConfig().getTypeHandlerFactory().resolveAlias(javaType); +Class javaClass = null; +try { + if (javaType != null javaType.length() 0) { +javaClass = Resources.classForName(javaType); + } +} catch (ClassNotFoundException e) { + throw new RuntimeException(Error setting javaType on parameter mapping. Cause: + e); +} + +Integer numericScale = null; +if (numericScaleProp != null) { + numericScale = new Integer(numericScaleProp); +} + +state.getParamConfig().addParameterMapping(propertyName, javaClass, jdbcType, nullValue, mode, type, numericScale, typeHandlerImpl, resultMap); } }); } Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ParameterMapConfig.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ParameterMapConfig.java?view=diffrev=545954r1=545953r2=545954 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ParameterMapConfig.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ParameterMapConfig.java Sun Jun 10 15:19:10 2007 @@ -1,7 +1,5 @@ package com.ibatis.sqlmap.engine.conifg; -import com.ibatis.common.resources.*; -import com.ibatis.sqlmap.client.*; import
svn commit: r545958 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: builder/xml/SqlMapParser.java builder/xml/SqlStatementParser.java conifg/MappedStatementConfig.java conifg/Resu
Author: cbegin Date: Sun Jun 10 15:37:21 2007 New Revision: 545958 URL: http://svn.apache.org/viewvc?view=revrev=545958 Log: Removed remaining saveXconfig methods Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ResultMapConfig.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java?view=diffrev=545958r1=545957r2=545958 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java Sun Jun 10 15:37:21 2007 @@ -206,7 +206,8 @@ private void addResultMapNodelets() { parser.addNodelet(/sqlMap/resultMap/end(), new Nodelet() { public void process(Node node) throws Exception { -state.getResultConfig().saveResultMap(); +state.getConfig().getErrorContext().setMoreInfo(null); +state.getConfig().getErrorContext().setObjectId(null); } }); parser.addNodelet(/sqlMap/resultMap, new Nodelet() { Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java?view=diffrev=545958r1=545957r2=545958 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java Sun Jun 10 15:37:21 2007 @@ -53,8 +53,6 @@ MappedStatementConfig statementConf = state.getConfig().newMappedStatementConfig(id, statement, new XMLSqlSource(state, node), parameterMapName, parameterClassName, resultMapName, additionalResultMapNames, resultClassName, additionalResultClasses, resultSetType, fetchSize, allowRemapping, timeout, cacheModelName, xmlResultName); findAndParseSelectKey(node, statementConf); - -statementConf.saveMappedStatement(); } private void findAndParseSelectKey(Node node, MappedStatementConfig config) { Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java?view=diffrev=545958r1=545957r2=545958 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java Sun Jun 10 15:37:21 2007 @@ -117,6 +117,7 @@ mappedStatement = statement; } rootStatement = statement; +delegate.addMappedStatement(mappedStatement); } public void setSelectKeyStatement(SqlSource processor, String resultClassName, String keyPropName, boolean runAfterSQL, String type) { @@ -169,10 +170,6 @@ } else { throw new SqlMapException(You cant set a select key statement on statement named + rootStatement.getId() + because it is not an InsertStatement.); } - } - - public void saveMappedStatement() { -delegate.addMappedStatement(mappedStatement); } private void setSqlForStatement(GeneralStatement statement, Sql sql) { Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ResultMapConfig.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ResultMapConfig.java?view=diffrev=545958r1=545957r2=545958 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ResultMapConfig.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/ResultMapConfig.java Sun Jun 10 15:37:21 2007 @@ -73,6 +73,8 @@ } errorContext.setMoreInfo(Check the result mappings.); resultMappingIndex = resultMappingList.size(); +resultMap.setResultMappingList(resultMappingList); +client.getDelegate().addResultMap(resultMap); } public void setDiscriminator(String columnName, String columnIndex, String javaType, String jdbcType, String nullValue, String callback) { @@ -121,13 +123,14
svn commit: r546736 - in /ibatis/trunk/java/docs/ja: iBATIS-SqlMaps-2_ja.pdf iBATIS-SqlMaps-2_ja.sxw
Author: cbegin Date: Tue Jun 12 21:53:22 2007 New Revision: 546736 URL: http://svn.apache.org/viewvc?view=revrev=546736 Log: Japanese user guide Added: ibatis/trunk/java/docs/ja/iBATIS-SqlMaps-2_ja.pdf (with props) ibatis/trunk/java/docs/ja/iBATIS-SqlMaps-2_ja.sxw (with props) Added: ibatis/trunk/java/docs/ja/iBATIS-SqlMaps-2_ja.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/ja/iBATIS-SqlMaps-2_ja.pdf?view=autorev=546736 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/ja/iBATIS-SqlMaps-2_ja.pdf -- svn:mime-type = application/octet-stream Added: ibatis/trunk/java/docs/ja/iBATIS-SqlMaps-2_ja.sxw URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/ja/iBATIS-SqlMaps-2_ja.sxw?view=autorev=546736 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/ja/iBATIS-SqlMaps-2_ja.sxw -- svn:mime-type = application/octet-stream
svn commit: r546738 - in /ibatis/trunk/java/docs: cn/ en/ fr/ it/ ko/
Author: cbegin Date: Tue Jun 12 22:01:08 2007 New Revision: 546738 URL: http://svn.apache.org/viewvc?view=revrev=546738 Log: updated language docs Added: ibatis/trunk/java/docs/cn/iBATIS-SqlMaps-2-Tutorial_cn.pdf ibatis/trunk/java/docs/en/iBATIS-DAO-2_en.pdf (with props) ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2-Tutorial_en.pdf (with props) ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2_en.pdf (with props) ibatis/trunk/java/docs/fr/iBATIS-SqlMaps-2-Tutorial_fr.pdf (with props) ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.sxw (with props) ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2-Tutorial_ko.pdf (with props) ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2_ko.pdf (with props) Removed: ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial-it.sxw Added: ibatis/trunk/java/docs/cn/iBATIS-SqlMaps-2-Tutorial_cn.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/cn/iBATIS-SqlMaps-2-Tutorial_cn.pdf?view=autorev=546738 == Binary files /tmp/tmpwS862v and /tmp/tmpiCCGwy differ Added: ibatis/trunk/java/docs/en/iBATIS-DAO-2_en.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/en/iBATIS-DAO-2_en.pdf?view=autorev=546738 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/en/iBATIS-DAO-2_en.pdf -- svn:mime-type = application/octet-stream Added: ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2-Tutorial_en.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2-Tutorial_en.pdf?view=autorev=546738 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2-Tutorial_en.pdf -- svn:mime-type = application/octet-stream Added: ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2_en.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2_en.pdf?view=autorev=546738 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/en/iBATIS-SqlMaps-2_en.pdf -- svn:mime-type = application/octet-stream Added: ibatis/trunk/java/docs/fr/iBATIS-SqlMaps-2-Tutorial_fr.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/fr/iBATIS-SqlMaps-2-Tutorial_fr.pdf?view=autorev=546738 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/fr/iBATIS-SqlMaps-2-Tutorial_fr.pdf -- svn:mime-type = application/octet-stream Added: ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.sxw URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.sxw?view=autorev=546738 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.sxw -- svn:mime-type = application/octet-stream Added: ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2-Tutorial_ko.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2-Tutorial_ko.pdf?view=autorev=546738 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2-Tutorial_ko.pdf -- svn:mime-type = application/octet-stream Added: ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2_ko.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2_ko.pdf?view=autorev=546738 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/ko/iBATIS-SqlMaps-2_ko.pdf -- svn:mime-type = application/octet-stream
svn commit: r546739 - /ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.pdf
Author: cbegin Date: Tue Jun 12 22:03:17 2007 New Revision: 546739 URL: http://svn.apache.org/viewvc?view=revrev=546739 Log: italian tutorial Added: ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.pdf (with props) Added: ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.pdf URL: http://svn.apache.org/viewvc/ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.pdf?view=autorev=546739 == Binary file - no diff available. Propchange: ibatis/trunk/java/docs/it/iBATIS-SqlMaps-2-Tutorial_it.pdf -- svn:mime-type = application/octet-stream
svn commit: r546741 - /ibatis/trunk/site/pages/javadownloads.vm
Author: cbegin Date: Tue Jun 12 22:17:46 2007 New Revision: 546741 URL: http://svn.apache.org/viewvc?view=revrev=546741 Log: Updated docs downloads Modified: ibatis/trunk/site/pages/javadownloads.vm Modified: ibatis/trunk/site/pages/javadownloads.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/javadownloads.vm?view=diffrev=546741r1=546740r2=546741 == --- ibatis/trunk/site/pages/javadownloads.vm (original) +++ ibatis/trunk/site/pages/javadownloads.vm Tue Jun 12 22:17:46 2007 @@ -69,47 +69,61 @@ ul lia href=/docs/java/pdf/iBATIS-SqlMaps-2_en.pdfSQL Maps for Java, Developer Guide/a - (Aug 9, 2006)/li +/li lia href=/docs/java/pdf/iBATIS-SqlMaps-2-Tutorial_en.pdfSQL Maps for Java, Tutorial/a - (Feb 18, 2006)/li -lia href=/docs/java/pdf/iBATIS-DAO-2_en.pdfDAO for Java, Developer - Guide/a - (June 17, 2006)/li +/li /ul /li liChinese PDF ul lia href=/docs/java/pdf/iBATIS-SqlMaps-2_cn.pdfSQL Maps for Java, Developer Guide/a - (June 17, 2004)/li +/li lia href=/docs/java/pdf/iBATIS-SqlMaps-2-Tutorial_cn.pdfSQL Maps for Java, Tutorial/a - (June 17, 2004)/li +/li /ul /li liKorean PDF ul lia href=/docs/java/pdf/iBATIS-SqlMaps-2_ko.pdfSQL Maps for Java, Developer Guide/a - (June 17, 2004)/li +/li lia href=/docs/java/pdf/iBATIS-SqlMaps-2-Tutorial_ko.pdfSQL Maps for Java, Tutorial/a - (June 17, 2004)/li +/li + /ul +/li +liJapanese PDF + ul +lia href=/docs/java/pdf/iBATIS-SqlMaps-2_ja.pdfSQL Maps for Java, + Developer Guide/a +/li +lia href=/docs/java/pdf/iBATIS-SqlMaps-2-Tutorial_ja.pdfSQL Maps for + Java, Tutorial/a +/li /ul /li liFrench PDF ul lia href=/docs/java/pdf/iBATIS-SqlMaps-2-Tutorial_fr.pdfSQL Maps for Java, Tutorial/a - (May 15, 2006)/li +/li /ul /li liItalian PDF ul -lia href=/docs/java/pdf/iBATIS-SqlMaps-2-Tutorial-it.pdfSQL Maps for +lia href=/docs/java/pdf/iBATIS-SqlMaps-2-Tutorial_it.pdfSQL Maps for + Java, Tutorial/a +/li + /ul +/li +liSpanish PDF + ul +lia href=/docs/java/pdf/iBATIS-SqlMaps-2-Tutorial_es.pdfSQL Maps for Java, Tutorial/a - (May 1, 2005)/li +/li /ul /li /ul
svn commit: r547853 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: builder/xml/SqlStatementParser.java conifg/MappedStatementConfig.java conifg/SqlMapConfiguration.java
Author: cbegin Date: Fri Jun 15 20:23:18 2007 New Revision: 547853 URL: http://svn.apache.org/viewvc?view=revrev=547853 Log: Improved type safety of MappedStatementConfig Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/SqlMapConfiguration.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java?view=diffrev=547853r1=547852r2=547853 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlStatementParser.java Fri Jun 15 20:23:18 2007 @@ -1,8 +1,10 @@ package com.ibatis.sqlmap.engine.builder.xml; import com.ibatis.common.xml.*; +import com.ibatis.common.resources.*; import com.ibatis.sqlmap.engine.conifg.*; import com.ibatis.sqlmap.engine.mapping.statement.*; +import com.ibatis.sqlmap.client.*; import org.w3c.dom.CharacterData; import org.w3c.dom.*; @@ -45,14 +47,47 @@ } } -String[] additionalResultClasses = null; +String[] additionalResultClassNames = null; if (resultClassName != null) { - additionalResultClasses = state.getAllButFirstToken(resultClassName); + additionalResultClassNames = state.getAllButFirstToken(resultClassName); resultClassName = state.getFirstToken(resultClassName); } -MappedStatementConfig statementConf = state.getConfig().newMappedStatementConfig(id, statement, new XMLSqlSource(state, node), parameterMapName, parameterClassName, resultMapName, additionalResultMapNames, resultClassName, additionalResultClasses, resultSetType, fetchSize, allowRemapping, timeout, cacheModelName, xmlResultName); +Class[] additionalResultClasses = null; +if (additionalResultClassNames != null) { + additionalResultClasses = new Class[additionalResultClassNames.length]; + for (int i = 0; i additionalResultClassNames.length; i++) { +additionalResultClasses[i] = resolveClass(additionalResultClassNames[i]); + } +} + +state.getConfig().getErrorContext().setMoreInfo(Check the parameter class.); +Class parameterClass = resolveClass(parameterClassName); + +state.getConfig().getErrorContext().setMoreInfo(Check the result class.); +Class resultClass = resolveClass(resultClassName); + +Integer timeoutInt = timeout == null ? null : new Integer(timeout); +Integer fetchSizeInt = fetchSize == null ? null : new Integer(fetchSize); +boolean allowRemappingBool = true.equals(allowRemapping); + +MappedStatementConfig statementConf = state.getConfig().newMappedStatementConfig(id, statement, +new XMLSqlSource(state, node), parameterMapName, parameterClass, resultMapName, additionalResultMapNames, +resultClass, additionalResultClasses, resultSetType, fetchSizeInt, allowRemappingBool, timeoutInt, cacheModelName, +xmlResultName); findAndParseSelectKey(node, statementConf); + } + + private Class resolveClass(String resultClassName) { +try { + if (resultClassName != null) { +return Resources.classForName(state.getConfig().getTypeHandlerFactory().resolveAlias(resultClassName)); + } else { +return null; + } +} catch (ClassNotFoundException e) { + throw new SqlMapException(Error. Could not initialize class. Cause: + e, e); +} } private void findAndParseSelectKey(Node node, MappedStatementConfig config) { Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java?view=diffrev=547853r1=547852r2=547853 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/conifg/MappedStatementConfig.java Fri Jun 15 20:23:18 2007 @@ -23,30 +23,33 @@ private static final InlineParameterMapParser PARAM_PARSER = new InlineParameterMapParser(); private ErrorContext errorContext; private ExtendedSqlMapClient client; - private SqlMapExecutorDelegate delegate; private TypeHandlerFactory typeHandlerFactory; private MappedStatement mappedStatement; private MappedStatement rootStatement; - MappedStatementConfig(SqlMapConfiguration config, String id, GeneralStatement statement
svn commit: r547856 [2/2] - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: conifg/ exchange/ execution/ impl/ mapping/result/ mapping/result/loader/ mapping/statement/
Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/MappedStatement.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/MappedStatement.java?view=diffrev=547856r1=547855r2=547856 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/MappedStatement.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/statement/MappedStatement.java Fri Jun 15 20:53:30 2007 @@ -1,391 +1,391 @@ -/* - * Copyright 2004 Clinton Begin - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.ibatis.sqlmap.engine.mapping.statement; - -import com.ibatis.common.jdbc.exception.NestedSQLException; -import com.ibatis.common.io.ReaderInputStream; - -import com.ibatis.sqlmap.client.event.RowHandler; -import com.ibatis.sqlmap.client.*; -import com.ibatis.sqlmap.engine.execution.SqlExecutor; -import com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap; -import com.ibatis.sqlmap.engine.mapping.result.ResultMap; -import com.ibatis.sqlmap.engine.mapping.sql.Sql; -import com.ibatis.sqlmap.engine.scope.ErrorContext; -import com.ibatis.sqlmap.engine.scope.StatementScope; -import com.ibatis.sqlmap.engine.transaction.Transaction; -import com.ibatis.sqlmap.engine.transaction.TransactionException; -import com.ibatis.sqlmap.engine.type.*; -import com.ibatis.sqlmap.engine.cache.*; -import com.ibatis.sqlmap.engine.impl.*; -import org.w3c.dom.Document; - -import javax.xml.parsers.*; -import java.sql.Connection; -import java.sql.SQLException; -import java.util.*; -import java.io.*; - -public class MappedStatement { - private String id; - private Integer resultSetType; - private Integer fetchSize; - private ResultMap resultMap; - private ParameterMap parameterMap; - private Class parameterClass; - private Sql sql; - private int baseCacheKey; - private ExtendedSqlMapClient sqlMapClient; - private Integer timeout; - private ResultMap[] additionalResultMaps = new ResultMap[0]; - private List executeListeners = new ArrayList(); - private String resource; - - public StatementType getStatementType() { -return StatementType.UNKNOWN; - } - - public int executeUpdate(StatementScope statementScope, Transaction trans, Object parameterObject) - throws SQLException { -ErrorContext errorContext = statementScope.getErrorContext(); -errorContext.setActivity(preparing the mapped statement for execution); -errorContext.setObjectId(this.getId()); -errorContext.setResource(this.getResource()); - -statementScope.getSession().setCommitRequired(true); - -try { - parameterObject = validateParameter(parameterObject); - - Sql sql = getSql(); - - errorContext.setMoreInfo(Check the parameter map.); - ParameterMap parameterMap = sql.getParameterMap(statementScope, parameterObject); - - errorContext.setMoreInfo(Check the result map.); - ResultMap resultMap = sql.getResultMap(statementScope, parameterObject); - - statementScope.setResultMap(resultMap); - statementScope.setParameterMap(parameterMap); - - int rows = 0; - - errorContext.setMoreInfo(Check the parameter map.); - Object[] parameters = parameterMap.getParameterObjectValues(statementScope, parameterObject); - - errorContext.setMoreInfo(Check the SQL statement.); - String sqlString = sql.getSql(statementScope, parameterObject); - - errorContext.setActivity(executing mapped statement); - errorContext.setMoreInfo(Check the statement or the result map.); - rows = sqlExecuteUpdate(statementScope, trans.getConnection(), sqlString, parameters); - - errorContext.setMoreInfo(Check the output parameters.); - if (parameterObject != null) { -postProcessParameterObject(statementScope, parameterObject, parameters); - } - - errorContext.reset(); - sql.cleanup(statementScope); - notifyListeners(); - return rows; -} catch (SQLException e) { - errorContext.setCause(e); - throw new NestedSQLException(errorContext.toString(), e.getSQLState(), e.getErrorCode(), e); -} catch (Exception e) { - errorContext.setCause(e); - throw new NestedSQLException(errorContext.toString(), e); -} - } - - public Object executeQueryForObject(StatementScope statementScope,
svn commit: r547857 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common: jdbc/exception/RuntimeSQLException.java util/Stopwatch.java util/Throttle.java util/ThrottledPool.java
Author: cbegin Date: Fri Jun 15 21:02:22 2007 New Revision: 547857 URL: http://svn.apache.org/viewvc?view=revrev=547857 Log: removed useless classes and comments Removed: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/util/Stopwatch.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/util/Throttle.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/util/ThrottledPool.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/RuntimeSQLException.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/RuntimeSQLException.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/RuntimeSQLException.java?view=diffrev=547857r1=547856r2=547857 == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/RuntimeSQLException.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/exception/RuntimeSQLException.java Fri Jun 15 21:02:22 2007 @@ -32,7 +32,6 @@ /** * Constructor to pass along a message - * @see com.ibatis.common.exception.RuntimeException * @param msg - the message */ public RuntimeSQLException(String msg) { @@ -41,7 +40,6 @@ /** * Constructor to pass along another exception - * @see com.ibatis.common.exception.RuntimeException * @param sqlException - the exception */ public RuntimeSQLException(SQLException sqlException) { @@ -50,7 +48,6 @@ /** * Constructor to pass along a message and an exception - * @see com.ibatis.common.exception.RuntimeException * @param msg - the message * @param sqlException - the exception */
svn commit: r607147 - /ibatis/trunk/java/mapper/mapper2/pom.xml
Author: cbegin Date: Thu Dec 27 16:13:45 2007 New Revision: 607147 URL: http://svn.apache.org/viewvc?rev=607147view=rev Log: insignificant change Modified: ibatis/trunk/java/mapper/mapper2/pom.xml Modified: ibatis/trunk/java/mapper/mapper2/pom.xml URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/pom.xml?rev=607147r1=607146r2=607147view=diff == --- ibatis/trunk/java/mapper/mapper2/pom.xml (original) +++ ibatis/trunk/java/mapper/mapper2/pom.xml Thu Dec 27 16:13:45 2007 @@ -253,3 +253,4 @@ /distributionManagement -- /project + \ No newline at end of file
svn commit: r639024 - in /ibatis/trunk/site: build.bat pages/javadownloads.vm
Author: cbegin Date: Wed Mar 19 14:27:42 2008 New Revision: 639024 URL: http://svn.apache.org/viewvc?rev=639024view=rev Log: Updated downloads page in preparation for next release Modified: ibatis/trunk/site/build.bat ibatis/trunk/site/pages/javadownloads.vm Modified: ibatis/trunk/site/build.bat URL: http://svn.apache.org/viewvc/ibatis/trunk/site/build.bat?rev=639024r1=639023r2=639024view=diff == --- ibatis/trunk/site/build.bat (original) +++ ibatis/trunk/site/build.bat Wed Mar 19 14:27:42 2008 @@ -2,4 +2,3 @@ call ant.bat -pause \ No newline at end of file Modified: ibatis/trunk/site/pages/javadownloads.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/javadownloads.vm?rev=639024r1=639023r2=639024view=diff == --- ibatis/trunk/site/pages/javadownloads.vm (original) +++ ibatis/trunk/site/pages/javadownloads.vm Wed Mar 19 14:27:42 2008 @@ -10,9 +10,9 @@ table cellpadding=0 cellspacing=0 border=0 tr td rowspan=2 width=70% - h4Releases/h4 + h4Current Release/h4 piBATIS 2.3.0 is the current and best release. It is also the first iBATIS release that - does not include the DAO framework./p + does not include the DAO framework (see sidebar for more)./p ul lia href=[preferred]/ibatis/binaries/ibatis.java/ibatis-2.3.0.677.zipbiBATIS Java 2.3.0 Binaries, Source, and Documentation/b/a (Dec 1, 2006) @@ -23,23 +23,7 @@ /li /ul - piBATIS 2.2.0 is also available. iBATIS 2.2.0 is the last release that includes - the iBATIS DAO framework. After 2.2.0, - the DAO iBATIS framework is removed from the downloads. - We suggest converting iBATIS framework DAOs to the - a href=http://www.springframework.org; target=_blankSpring Framework/a. - /p - ul -lia href=[preferred]/ibatis/binaries/ibatis.java/iBATIS_DBL-2.2.0.638.zipbiBATIS Java 2.2.0 - Binaries, Source and Documentation/b/a (Aug 16, 2006) - [a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/iBATIS_DBL-2.2.0.638.zip.md5;MD5/a] - [a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/iBATIS_DBL-2.2.0.638.zip.asc;PGP/a] - [Status: General Availability] - a href=http://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12310720styleName=TextprojectId=10601Create=Create;Release Notes/a -/li - /ul - - h4Examples/h4 + h4Example Application/h4 ul lia href=[preferred]/ibatis/binaries/ibatis.java/JPetStore-5.0.zipJPetStore 5.0 Example Application/a @@ -156,7 +140,20 @@ pThe DAO Framework was deprecated in 2.3, but will remain permanently available as it was in 2.2./p ul -lia href=[preferred]/ibatis/binaries/ibatis.java/iBATIS_DAO-2.2.0.638.zipbStandalone DAO Framework 2.2.0/b/a/li +li + a href=[preferred]/ibatis/binaries/ibatis.java/iBATIS_DAO-2.2.0.638.zipbStandalone DAO Framework 2.2.0/b/a + br/[a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/iBATIS_DAO-2.2.0.638.zip.md5;MD5/a | + a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/iBATIS_DAO-2.2.0.638.zip.asc;PGP/a ] + /li + /ul + ul + li + a href=[preferred]/ibatis/binaries/ibatis.java/iBATIS_DBL-2.2.0.638.zipbFull iBATIS Java 2.2.0 Release/b/a + br/[a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/iBATIS_DBL-2.2.0.638.zip.md5;MD5/a | + a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/iBATIS_DBL-2.2.0.638.zip.asc;PGP/a | + a href=http://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12310720styleName=TextprojectId=10601Create=Create;Notes/a] + br/[Status: General Availability] (Aug 16, 2006) + /li /ul pIf you do not see the file you need, or you're looking for an older version, please see the release archives./p
svn commit: r639946 - /ibatis/trunk/java/mapper/mapper2/test.txt
Author: cbegin Date: Fri Mar 21 20:50:30 2008 New Revision: 639946 URL: http://svn.apache.org/viewvc?rev=639946view=rev Log: testing repopsitory errors Added: ibatis/trunk/java/mapper/mapper2/test.txt Added: ibatis/trunk/java/mapper/mapper2/test.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/test.txt?rev=639946view=auto == --- ibatis/trunk/java/mapper/mapper2/test.txt (added) +++ ibatis/trunk/java/mapper/mapper2/test.txt Fri Mar 21 20:50:30 2008 @@ -0,0 +1 @@ +test
svn commit: r640152 - in /ibatis/trunk/java/mapper/mapper2: build/ src/com/ibatis/common/jdbc/ src/com/ibatis/sqlmap/engine/builder/xml/ src/com/ibatis/sqlmap/engine/config/ src/com/ibatis/sqlmap/engi
Author: cbegin Date: Sat Mar 22 21:56:51 2008 New Revision: 640152 URL: http://svn.apache.org/viewvc?rev=640152view=rev Log: Made column label/name configurable RE: issue 490 Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/ScriptRunner.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/AutoResultMap.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.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=640152r1=640151r2=640152view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sat Mar 22 21:56:51 2008 @@ -1,5 +1,5 @@ #Build version info -#Fri Mar 21 19:27:28 MDT 2008 +#Sat Mar 22 22:51:13 MDT 2008 version=2.3.1 -buildDate=2008/03/21 19\:27 -buildNum=704 +buildDate=2008/03/22 22\:51 +buildNum=706 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/ScriptRunner.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/ScriptRunner.java?rev=640152r1=640151r2=640152view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/ScriptRunner.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/common/jdbc/ScriptRunner.java Sat Mar 22 21:56:51 2008 @@ -180,7 +180,7 @@ ResultSetMetaData md = rs.getMetaData(); int cols = md.getColumnCount(); for (int i = 0; i cols; i++) { - String name = md.getColumnName(i); + String name = md.getColumnLabel(i); print(name + \t); } println(); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java?rev=640152r1=640151r2=640152view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java Sat Mar 22 21:56:51 2008 @@ -111,6 +111,10 @@ boolean enhancementEnabled = (enhancementEnabledAttr == null || true.equals(enhancementEnabledAttr)); config.setEnhancementEnabled(enhancementEnabled); +String useColumnLabelAttr = attributes.getProperty(useColumnLabel); +boolean useColumnLabel = (useColumnLabelAttr == null || true.equals(useColumnLabelAttr)); +config.setUseColumnLabel(useColumnLabel); + String defaultTimeoutAttr = attributes.getProperty(defaultStatementTimeout); Integer defaultTimeout = defaultTimeoutAttr == null ? null : Integer.valueOf(defaultTimeoutAttr); config.setDefaultStatementTimeout(defaultTimeout); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java?rev=640152r1=640151r2=640152view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java Sat Mar 22 21:56:51 2008 @@ -85,6 +85,10 @@ AccessPlanFactory.setBytecodeEnhancementEnabled(enhancementEnabled); } + public void setUseColumnLabel(boolean useColumnLabel) { +client.getDelegate().setUseColumnLabel(useColumnLabel); + } + public void setDefaultStatementTimeout(Integer defaultTimeout) { errorContext.setActivity(setting default timeout); if (defaultTimeout != null) { Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java?rev=640152r1=640151r2=640152view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis
svn commit: r640154 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: builder/xml/SqlMapConfigParser.java builder/xml/sql-map-config-2.dtd config/SqlMapConfiguration.java execution/
Author: cbegin Date: Sat Mar 22 22:10:18 2008 New Revision: 640154 URL: http://svn.apache.org/viewvc?rev=640154view=rev Log: Added setting to force multiple result set support Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/impl/SqlMapExecutorDelegate.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java?rev=640154r1=640153r2=640154view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapConfigParser.java Sat Mar 22 22:10:18 2008 @@ -115,6 +115,10 @@ boolean useColumnLabel = (useColumnLabelAttr == null || true.equals(useColumnLabelAttr)); config.setUseColumnLabel(useColumnLabel); +String forceMultipleResultSetSupportAttr = attributes.getProperty(forceMultipleResultSetSupport); +boolean forceMultipleResultSetSupport = true.equals(forceMultipleResultSetSupportAttr); +config.setForceMultipleResultSetSupport(forceMultipleResultSetSupport); + String defaultTimeoutAttr = attributes.getProperty(defaultStatementTimeout); Integer defaultTimeout = defaultTimeoutAttr == null ? null : Integer.valueOf(defaultTimeoutAttr); config.setDefaultStatementTimeout(defaultTimeout); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd?rev=640154r1=640153r2=640154view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd Sat Mar 22 22:10:18 2008 @@ -37,6 +37,7 @@ errorTracingEnabled (true | false) #IMPLIED useStatementNamespaces (true | false) #IMPLIED useColumnLabel (true | false) #IMPLIED +forceMultipleResultSetSupport (true | false) #IMPLIED defaultStatementTimeout CDATA #IMPLIED Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java?rev=640154r1=640153r2=640154view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/SqlMapConfiguration.java Sat Mar 22 22:10:18 2008 @@ -89,6 +89,10 @@ client.getDelegate().setUseColumnLabel(useColumnLabel); } + public void setForceMultipleResultSetSupport(boolean forceMultipleResultSetSupport) { + client.getDelegate().setForceMultipleResultSetSupport(forceMultipleResultSetSupport); + } + public void setDefaultStatementTimeout(Integer defaultTimeout) { errorContext.setActivity(setting default timeout); if (defaultTimeout != null) { Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java?rev=640154r1=640153r2=640154view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/execution/SqlExecutor.java Sat Mar 22 22:10:18 2008 @@ -295,7 +295,7 @@ private ResultSet handleMultipleResults(PreparedStatement ps, StatementScope statementScope, int skipResults, int maxResults, RowHandlerCallback callback) throws SQLException { ResultSet rs; -rs = getFirstResultSet(ps); +rs = getFirstResultSet(statementScope, ps); if (rs != null) { handleResults(statementScope, rs, skipResults, maxResults, callback); } @@ -309,7 +309,7 @@ multipleResults.add(defaultRowHandler.getList()); ResultMap[] resultMaps = statement.getAdditionalResultMaps
svn commit: r640157 - /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java
Author: cbegin Date: Sat Mar 22 22:22:18 2008 New Revision: 640157 URL: http://svn.apache.org/viewvc?rev=640157view=rev Log: fixed ibatis 406 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java?rev=640157r1=640156r2=640157view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java Sat Mar 22 22:22:18 2008 @@ -358,11 +358,9 @@ } public Object setResultObjectValues(StatementScope statementScope, Object resultObject, Object[] values) { - +final String previousNestedKey = statementScope.getCurrentNestedKey(); String ukey = (String)getUniqueKey(statementScope.getCurrentNestedKey(), values); - Map uniqueKeys = statementScope.getUniqueKeys(this); - statementScope.setCurrentNestedKey(ukey); if (uniqueKeys != null uniqueKeys.containsKey(ukey)) { // Unique key is already known, so get the existing result object and process additional results. @@ -386,6 +384,7 @@ resultObject = NO_VALUE; } +statementScope.setCurrentNestedKey(previousNestedKey); return resultObject; }
svn commit: r640159 - in /ibatis/trunk/java/mapper/mapper2: build/version.properties src/com/ibatis/sqlmap/engine/mapping/result/loader/LazyResultLoader.java
Author: cbegin Date: Sat Mar 22 22:59:56 2008 New Revision: 640159 URL: http://svn.apache.org/viewvc?rev=640159view=rev Log: Fixed 487: Set support in lazy loader Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/loader/LazyResultLoader.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=640159r1=640158r2=640159view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sat Mar 22 22:59:56 2008 @@ -1,5 +1,5 @@ #Build version info -#Sat Mar 22 22:51:13 MDT 2008 +#Sat Mar 22 23:32:54 MDT 2008 version=2.3.1 -buildDate=2008/03/22 22\:51 -buildNum=706 +buildDate=2008/03/22 23\:32 +buildNum=708 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/loader/LazyResultLoader.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/loader/LazyResultLoader.java?rev=640159r1=640158r2=640159view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/loader/LazyResultLoader.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/loader/LazyResultLoader.java Sat Mar 22 22:59:56 2008 @@ -16,7 +16,6 @@ package com.ibatis.sqlmap.engine.mapping.result.loader; import com.ibatis.common.beans.ClassInfo; - import com.ibatis.sqlmap.engine.impl.SqlMapClientImpl; import java.lang.reflect.InvocationHandler; @@ -25,12 +24,14 @@ import java.sql.SQLException; import java.util.Collection; import java.util.List; +import java.util.Set; /** * Class to lazily load results into objects */ public class LazyResultLoader implements InvocationHandler { + private static final Class[] SET_INTERFACES = new Class[]{Set.class}; private static final Class[] LIST_INTERFACES = new Class[]{List.class}; protected SqlMapClientImpl client; @@ -67,7 +68,11 @@ if (Collection.class.isAssignableFrom(targetType)) { InvocationHandler handler = new LazyResultLoader(client, statementName, parameterObject, targetType); ClassLoader cl = targetType.getClassLoader(); - return Proxy.newProxyInstance(cl, LIST_INTERFACES, handler); + if (Set.class.isAssignableFrom(targetType)) { +return Proxy.newProxyInstance(cl, SET_INTERFACES, handler); + } else { +return Proxy.newProxyInstance(cl, LIST_INTERFACES, handler); + } } else { return ResultLoader.getResult(client, statementName, parameterObject, targetType); }
svn commit: r640168 - in /ibatis/trunk/java/mapper/mapper2: build/ src/com/ibatis/sqlmap/engine/mapping/parameter/ src/com/ibatis/sqlmap/engine/mapping/result/ src/com/ibatis/sqlmap/engine/type/ test/
Author: cbegin Date: Sun Mar 23 00:36:59 2008 New Revision: 640168 URL: http://svn.apache.org/viewvc?rev=640168view=rev Log: Added support for Java 5 enumerations Added: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/EnumTypeHandler.java - copied, changed from r640008, ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/StringTypeHandler.java ibatis/trunk/java/mapper/mapper2/test/testdomain/DocType.java Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/parameter/ParameterMap.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/TypeHandlerFactory.java ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/Documents.xml ibatis/trunk/java/mapper/mapper2/test/com/ibatis/sqlmap/maps/PrivateBook.xml ibatis/trunk/java/mapper/mapper2/test/scripts/docs-init.sql ibatis/trunk/java/mapper/mapper2/test/testdomain/Document.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=640168r1=640167r2=640168view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Sun Mar 23 00:36:59 2008 @@ -1,5 +1,5 @@ #Build version info -#Sat Mar 22 23:32:54 MDT 2008 +#Sun Mar 23 00:00:08 MDT 2008 version=2.3.1 -buildDate=2008/03/22 23\:32 -buildNum=708 +buildDate=2008/03/23 00\:00 +buildNum=709 Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/parameter/ParameterMap.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/parameter/ParameterMap.java?rev=640168r1=640167r2=640168view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/parameter/ParameterMap.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/parameter/ParameterMap.java Sun Mar 23 00:36:59 2008 @@ -120,7 +120,7 @@ if (parameterMappings != null) { for (int i = 0; i parameterMappings.length; i++) { -ParameterMapping mapping = (ParameterMapping) parameterMappings[i]; +ParameterMapping mapping = parameterMappings[i]; errorContext.setMoreInfo(mapping.getErrorString()); if (mapping.isInputAllowed()) { setParameter(ps, mapping, parameters, i); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java?rev=640168r1=640167r2=640168view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java Sun Mar 23 00:36:59 2008 @@ -345,8 +345,7 @@ columnValues[i] = getPrimitiveResultMappingValue(rs, mapping); if (columnValues[i] == null) { columnValues[i] = doNullMapping(columnValues[i], mapping); -} -else { +} else { foundData = true; } } Copied: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/EnumTypeHandler.java (from r640008, ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/StringTypeHandler.java) URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/EnumTypeHandler.java?p2=ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/EnumTypeHandler.javap1=ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/StringTypeHandler.javar1=640008r2=640168rev=640168view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/StringTypeHandler.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/type/EnumTypeHandler.java Sun Mar 23 00:36:59 2008 @@ -23,11 +23,17 @@ /** * String implementation of TypeHandler */ -public class StringTypeHandler extends BaseTypeHandler implements TypeHandler { +public class EnumTypeHandler extends BaseTypeHandler implements TypeHandler { + + private Class type; + + public EnumTypeHandler(Class type) { +this.type = type; + } public void setParameter(PreparedStatement ps, int i, Object parameter, String jdbcType) throws SQLException { -ps.setString(i, ((String) parameter
svn commit: r640305 - /ibatis/tags/java_release_2.3.1-710/
Author: cbegin Date: Sun Mar 23 20:46:17 2008 New Revision: 640305 URL: http://svn.apache.org/viewvc?rev=640305view=rev Log: 2.3.1 Build tag Added: ibatis/tags/java_release_2.3.1-710/ - copied from r640304, ibatis/trunk/java/
svn commit: r640306 - in /ibatis/trunk/java/jpetstore/jpetstore5/lib: ibatis-2.3.1.710.jar ibatis-common-2.jar ibatis-dao-2.jar ibatis-sqlmap-2.jar
Author: cbegin Date: Sun Mar 23 20:56:28 2008 New Revision: 640306 URL: http://svn.apache.org/viewvc?rev=640306view=rev Log: updated ibatis libraries for JPetStore 5 Added: ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-2.3.1.710.jar (with props) Removed: ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-sqlmap-2.jar Modified: ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-common-2.jar ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-dao-2.jar Added: ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-2.3.1.710.jar URL: http://svn.apache.org/viewvc/ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-2.3.1.710.jar?rev=640306view=auto == Binary file - no diff available. Propchange: ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-2.3.1.710.jar -- svn:mime-type = application/octet-stream Modified: ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-common-2.jar URL: http://svn.apache.org/viewvc/ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-common-2.jar?rev=640306r1=640305r2=640306view=diff == Binary files - no diff available. Modified: ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-dao-2.jar URL: http://svn.apache.org/viewvc/ibatis/trunk/java/jpetstore/jpetstore5/lib/ibatis-dao-2.jar?rev=640306r1=640305r2=640306view=diff == Binary files - no diff available.
svn commit: r645515 - /ibatis/trunk/site/pages/index.vm
Author: cbegin Date: Mon Apr 7 06:29:33 2008 New Revision: 645515 URL: http://svn.apache.org/viewvc?rev=645515view=rev Log: removed statement about DTD Modified: ibatis/trunk/site/pages/index.vm Modified: ibatis/trunk/site/pages/index.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/index.vm?rev=645515r1=645514r2=645515view=diff == --- ibatis/trunk/site/pages/index.vm (original) +++ ibatis/trunk/site/pages/index.vm Mon Apr 7 06:29:33 2008 @@ -50,7 +50,7 @@ h2News/h2 h3iBATIS 2.3.1 Beta Available/h3 -p(March 25, 2008) This is a long overdue maintenance release. Fixes about 20 issues and includes two significant improvements. The first is the elimination of the Throttle. Originally included to artificially constrain threads, requests, and transactions to improve performance on certain infrastructure. It's not as much of an issue anymore and today the Throttle caused more problems than it solved. So bye-bye. :-) The only real impact you'll see is that the maxSessions/maxTransactions/maxRequests no longer have any effect whatsoever. They remain in the DTD only for backward compatibility. The other new change is built-in support for enums out of the box! It's currently a Beta release as per our process. But if all goes well over the next week or two, we'll vote to promote it to GA. The best thing you can do is test it out for us! +p(March 25, 2008) This is a long overdue maintenance release. Fixes about 20 issues and includes two significant improvements. The first is the elimination of the Throttle. Originally included to artificially constrain threads, requests, and transactions to improve performance on certain infrastructure. It's not as much of an issue anymore and today the Throttle caused more problems than it solved. So bye-bye. :-) The only real impact you'll see is that the maxSessions/maxTransactions/maxRequests no longer have any effect whatsoever. The other new change is built-in support for enums out of the box! It's currently a Beta release as per our process. But if all goes well over the next week or two, we'll vote to promote it to GA. The best thing you can do is test it out for us! pba href=javadownloads.cgiSo go get the 2.3.1 Beta from the Java downloads page now!/a/b/p h3Abator 1.1 Available/h3
svn commit: r677174 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml: sql-map-2.dtd sql-map-config-2.dtd
Author: cbegin Date: Tue Jul 15 23:49:21 2008 New Revision: 677174 URL: http://svn.apache.org/viewvc?rev=677174view=rev Log: iBATIS 515 -- Commented DTDs! Thanks Benjamin Bortfeldt Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-config-2.dtd Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd?rev=677174r1=677173r2=677174view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd Tue Jul 15 23:49:21 2008 @@ -1,5 +1,5 @@ ?xml version=1.0 encoding=UTF-8 ? - + !-- Copyright 2004 Clinton Begin @@ -16,17 +16,29 @@ limitations under the License. -- +!--The root element of an iBATIS SQL Map file. +A single SQL Map XML file can contain as many cache models, parameter maps, result maps and +statements as you like. Use discretion and organize the statements and maps appropriately for your +application (group them logically).-- !ELEMENT sqlMap (typeAlias* | cacheModel* | resultMap* | parameterMap* | sql* | statement* | insert* | update* | delete* | select* | procedure*)+ !ATTLIST sqlMap xmlns:fo CDATA #IMPLIED namespace CDATA #IMPLIED +!--The parameterMap is responsible for mapping JavaBeans properties to the parameters of a statement. +The parameterMap itself only requires a id attribute that is an identifier that statements will use to refer to it. +The class attribute is optional but highly recommended. Similar to the parameterClass attribute of a statement, +the class attribute allows the framework to validate the incoming parameter as well as optimize the engine +for performance. The parameterMap can contain any number of parameter mappings that map directly to the +parameters of a statement.-- !ELEMENT parameterMap (parameter+) !ATTLIST parameterMap id CDATA #REQUIRED class CDATA #REQUIRED + +!-- The parameter tag is used to describe the parameters of a parameterMap.-- !ELEMENT parameter EMPTY !ATTLIST parameter property CDATA #REQUIRED @@ -39,6 +51,27 @@ resultMap CDATA #IMPLIED numericScale CDATA #IMPLIED +!--Result maps are an extremely important component of Data Mapper. The resultMap is responsible for +mapping JavaBeans properties to the columns of a ResultSet produced by executing a query mapped +statement. +The resultMap itself has a id attribute that statements will use to refer to it. The resultMap also has a +class attribute that is the fully qualified (i.e. full package) name of a class or a type alias. This class will +be instantiated and populated based on the result mappings it contains. The extends attribute can be +optionally set to the name of another resultMap upon which to base a resultMap. This is similar to +extending a class in Java, all properties of the super resultMap will be included as part of the sub +resultMap. The properties of the super resultMap are always inserted before the sub resultMap +properties and the parent resultMap must be defined before the child. The classes for the super/sub +resultMaps need not be the same, nor do they need to be related at all (they can each use any class). + +The resultMap element also supports the attribute groupBy. The groupBy attribute is used to specify a list +of properties in this resultMap that are used to identify unique rows in the returned result set. Rows with +equal values for the specified properties will only generate one result object. Use groupBy in combination +with nested resultMaps to solve the N+1 query problem (see following discussion for examples). + +The resultMap can contain any number of result mappings that map JavaBean properties to the columns of a +ResultSet. These property mappings will be applied in the order that they are defined in the document. The +associated class must be a JavaBeans compliant class with appropriate get/set methods for each of the +properties, a Map or XML.-- !ELEMENT resultMap (result*, discriminator?) !ATTLIST resultMap id CDATA #REQUIRED @@ -47,6 +80,9 @@ xmlName CDATA #IMPLIED groupBy CDATA #IMPLIED +!--Results map JavaBean properties to the columns of a ResultSet. These property mappings will be applied +in the order that they are defined in the document. The associated class must be a JavaBeans compliant +class with appropriate get/set methods for each of the properties, a Map or XML.-- !ELEMENT result EMPTY !ATTLIST result property CDATA #REQUIRED @@ -59,6 +95,7 @@ resultMap CDATA #IMPLIED typeHandler CDATA #IMPLIED +!-- TODO: add documentation. Could not find anything
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=677189view=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=677189r1=677188r2=677189view=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=677189r1=677188r2=677189view=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=677189r1=677188r2=677189view=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: 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=677191view=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: r677820 - in /ibatis/trunk/site: pages/index.vm pages/javadownloads.vm template/menu.vm
Author: cbegin Date: Thu Jul 17 22:10:49 2008 New Revision: 677820 URL: http://svn.apache.org/viewvc?rev=677820view=rev Log: Updated with CI links Modified: ibatis/trunk/site/pages/index.vm ibatis/trunk/site/pages/javadownloads.vm ibatis/trunk/site/template/menu.vm Modified: ibatis/trunk/site/pages/index.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/index.vm?rev=677820r1=677819r2=677820view=diff == --- ibatis/trunk/site/pages/index.vm (original) +++ ibatis/trunk/site/pages/index.vm Thu Jul 17 22:10:49 2008 @@ -49,6 +49,15 @@ h2News/h2 + +h3iBATIS 2.3.3 BETA Released. And it will remain beta until.../h3 +p(Jul 16, 2008) Practically moments after promoting iBATIS 2.3.2 to GA, a number of nasty bugs were discovered, particularly with the Spring integration. We refactored a lot of +internal (i.e. non-client) code in these latest versions, and so as an end-user, you really need to test the betas! So from now on, we're going to wait until we get enough confirmation +from actual production implementations (either through test suites or staging environments) that things are working well. I'm thinking at least 20 responses before moving to GA. Maybe in the long run we'll +identify dedicated testers who are willing to update to the latest beta and run a comprehensive application test suite against it. /p +pba href=javadownloads.cgiGet the 2.3.3 Beta from the Java downloads page now!/a/b/p + + h3iBATIS 2.3.2 Promoted to General Availability/h3 p(Jun 30, 2008) The latest version of iBATIS has been promoted to GA. This latest version requires Java 5. While it wasn't planned that way originally, we decided to take the plunge and start to encourage our users to upgrade their platforms (or at least become one more reason to do so). Sun will be discontinuing support for JDK 1.4 in about four months and Modified: ibatis/trunk/site/pages/javadownloads.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/javadownloads.vm?rev=677820r1=677819r2=677820view=diff == --- ibatis/trunk/site/pages/javadownloads.vm (original) +++ ibatis/trunk/site/pages/javadownloads.vm Thu Jul 17 22:10:49 2008 @@ -7,23 +7,43 @@ h2iBATIS for Java Downloads/h2 + table cellpadding=0 cellspacing=0 border=0 tr td rowspan=2 width=70% - h4Current Release 2.3.2 (JDK 1.5 Required)/h4 + div style=float:right;width:150px;vertical-align:top;padding:5px;background-color:#CCF + bBETA is the new Production:/b + Our Beta status is a maker that is simply an indication that the product is new and has yet to be deployed to known production environments. Once + we have enough feedback from users that the sofware is working as intended, then we promote the status of the build to General Availability. The + software does not change between Beta and General Availability release status. + br/br/ + As the development team, we can only release Beta status software. YOU must get it promoted to General Availability by responding to the [ANNOUNCE] + email on the Mailing list with your vote of confidence and your experience having deployed it to your production environment. + br/br/ + Please download this version and test it in the most production-like way possible and post your experience to the release announcement thread. + If you absolutely require the last General Availability version, you can download it in the sidebar to the right. + /div + + h4Release 2.3.3 (JDK 1.5 Required)/h4 ul li - a href=[preferred]/ibatis/binaries/ibatis.java/ibatis-2.3.2.715.zipbDownload iBATIS Java 2.3.2/b/a + a href=[preferred]/ibatis/binaries/ibatis.java/ibatis-2.3.3.720.zipbDownload iBATIS Java 2.3.3/b/a br/ Includes binaries, source, and documentation - br/ [Status: Beta | Apr 22, 2008] + br/ [Status: bBeta/b | Jul 16, 2008] br/ - [a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/ibatis-2.3.2.715.zip.md5;MD5/a] - [a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/ibatis-2.3.2.715.zip.asc;PGP/a] + [a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/ibatis-2.3.3.720.zip.md5;MD5/a] + [a href=http://www.apache.org/dist/ibatis/binaries/ibatis.java/ibatis-2.3.3.720.zip.asc;PGP/a] - a href=https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10601styleName=Htmlversion=1231;Release Notes /ai(2.3.1 because they're more relevant)/i + a href=https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=10601styleName=Htmlversion=12313115;Release Notes /a +/li + /ul
svn commit: r677821 - in /ibatis/trunk/java/mapper/mapper2: build/version.properties doc/release.txt
Author: cbegin Date: Thu Jul 17 22:11:19 2008 New Revision: 677821 URL: http://svn.apache.org/viewvc?rev=677821view=rev Log: CI build data Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties ibatis/trunk/java/mapper/mapper2/doc/release.txt Modified: ibatis/trunk/java/mapper/mapper2/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/build/version.properties?rev=677821r1=677820r2=677821view=diff == --- ibatis/trunk/java/mapper/mapper2/build/version.properties (original) +++ ibatis/trunk/java/mapper/mapper2/build/version.properties Thu Jul 17 22:11:19 2008 @@ -1,5 +1,5 @@ #Build version info -#Wed Jul 16 02:06:22 MDT 2008 -version=2.3.3 -buildDate=2008/07/16 02\:06 -buildNum=720 +#Thu Jul 17 23:04:56 MDT 2008 +version=2.3.3.x-build +buildDate=2008/07/17 23\:04 +buildNum=721 Modified: ibatis/trunk/java/mapper/mapper2/doc/release.txt URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/doc/release.txt?rev=677821r1=677820r2=677821view=diff == --- ibatis/trunk/java/mapper/mapper2/doc/release.txt (original) +++ ibatis/trunk/java/mapper/mapper2/doc/release.txt Thu Jul 17 22:11:19 2008 @@ -2,6 +2,12 @@ Build Number: @buildNum@ -- +Next Version +-- + + o + +-- 2.3.3 --
svn commit: r677827 - in /ibatis/trunk/site/pages: archive.vm index.vm
Author: cbegin Date: Thu Jul 17 22:39:34 2008 New Revision: 677827 URL: http://svn.apache.org/viewvc?rev=677827view=rev Log: (empty) Modified: ibatis/trunk/site/pages/archive.vm ibatis/trunk/site/pages/index.vm Modified: ibatis/trunk/site/pages/archive.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/archive.vm?rev=677827r1=677826r2=677827view=diff == --- ibatis/trunk/site/pages/archive.vm (original) +++ ibatis/trunk/site/pages/archive.vm Thu Jul 17 22:39:34 2008 @@ -7,6 +7,52 @@ h2News Archive/h2 +h3iBATIS 2.3.2 Promoted to General Availability/h3 +p(Jun 30, 2008) The latest version of iBATIS has been promoted to GA. This latest version requires Java 5. While it wasn't planned that way originally, we decided to take the plunge +and start to encourage our users to upgrade their platforms (or at least become one more reason to do so). Sun will be discontinuing support for JDK 1.4 in about four months and +most of the world has already moved to Java 5. This also allows us to include built-in support for enumerations and will better prepare you for iBATIS 3 when the time comes. /p +pba href=javadownloads.cgiGet the 2.3.2 GA from the Java downloads page now!/a/b/p + +h3iBATIS 2.3.2 Beta and German Docs/h3 +p(Apr 22, 2008) I've released a small update which corrects a few logistical issues with the 2.3.1 deploy. It's a very minor release, but this will be the next GA version if all goes well. Thus 2.3.1 will never be GA, so get this one. In addition to that, bAxel Leucht/b has contributed documentation in German. So now all of my co-workers at Arvato can read about iBATIS too! ;-) Thanks Axel. + +h3Abator Renamed to iBATOR/h3 +p(April 14, 2008) Due to a trade registration dispute, Abator is renamed to iBATOR. iBATOR is + currently a work in progress, but an initial code drop has been added to SVN. See the + a href=ibator.htmlnew iBATOR page/a for more information. +/p + +h3iBATIS 2.3.1 Beta Available/h3 +p(March 25, 2008) This is a long overdue maintenance release. Fixes about 20 issues and includes two significant improvements. The first is the elimination of the Throttle. Originally included to artificially constrain threads, requests, and transactions to improve performance on certain infrastructure. It's not as much of an issue anymore and today the Throttle caused more problems than it solved. So bye-bye. :-) The only real impact you'll see is that the maxSessions/maxTransactions/maxRequests no longer have any effect whatsoever. The other new change is built-in support for enums out of the box! It's currently a Beta release as per our process. But if all goes well over the next week or two, we'll vote to promote it to GA. The best thing you can do is test it out for us! + +h3Abator 1.1 Available/h3 +p(March 20, 2008) Abator version 1.1 is available. This version has quite a few minor enhancements, + two major enhancements (two new methods can be generated), and a few bug fixes. Check it out + a href=abator.htmlhere/a. + +h3It's quiet, too quiet!/h3 + p(March 10, 2008) Yes, we're alive. I felt the need to update the homepage since it's been a while(!). All of the activity is on the mailing list these days, + and we haven't had a major release in a while. That's all about to change. The iBATIS 3.0 whiteboard has been up for a while and I think the ideas are sound. We've had a lot + of great feedback and it's time to get to work. iBATIS will have it's sixth birthday on July 1st, 2008. I'd like to suggest that we have a Beta + version of iBATIS 3.0 out by that day. Don't get too excited! If you're currently using 2.0, you likely will be for a long time (heck, Larry still uses 1.x). So, we'll + continue to support it for a long time as well. iBATIS 3.0 will be the biggest change to the framework since the original concept. While we're hoping to hold + true to some of the philosophies that have made iBATIS popular, it will look very different. Check out the iBATIS 3.0 whiteboard for more./p + pba href=http://opensource.atlassian.com/confluence/oss/display/IBATIS/iBATIS+3.0+Whiteboard;Check out the iBATIS 3.0 Whiteboard and tell us what you think!/a/b/p + +h3iBATIS 3.0 Design Whiteboard/h3 + p(June 12, 2007) Next month, on July 1st iBATIS will officially be 5 years old, and 2.0 alone + will be 3 years long in the tooth. It's time, or perhaps overdue that we start designing and + implementing the third version. A lot has changed in 5 years, many best practices are now simply + old practices. It's time to start from scratch. Clinton's thoughts are up. This is your chance to + influence the future direction of iBATIS./p + pba href=http://opensource.atlassian.com/confluence/oss/display/IBATIS/iBATIS+3.0+Whiteboard;Check out the iBATIS 3.0 Whiteboard and have your say!/a/b/p + +h3Java Documentation in 7
svn commit: r677835 - in /ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine: builder/xml/SqlMapParser.java builder/xml/sql-map-2.dtd config/ResultMapConfig.java mapping/result/ResultMap.ja
Author: cbegin Date: Thu Jul 17 23:30:03 2008 New Revision: 677835 URL: http://svn.apache.org/viewvc?rev=677835view=rev Log: JIRA 375 Provide a way for not creating items from nested ResultMaps when the items contain only null values Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/ResultMapConfig.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMapping.java Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java?rev=677835r1=677834r2=677835view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/SqlMapParser.java Thu Jul 17 23:30:03 2008 @@ -243,6 +243,7 @@ String statementName = childAttributes.getProperty(select); String resultMapName = childAttributes.getProperty(resultMap); String callback = childAttributes.getProperty(typeHandler); +String notNullColumn = childAttributes.getProperty(notNullColumn); state.getConfig().getErrorContext().setMoreInfo(Check the result mapping property type or name.); Class javaClass = null; @@ -275,7 +276,7 @@ } } -state.getResultConfig().addResultMapping(propertyName, columnName, columnIndex, javaClass, jdbcType, nullValue, statementName, resultMapName, typeHandlerImpl); +state.getResultConfig().addResultMapping(propertyName, columnName, columnIndex, javaClass, jdbcType, nullValue, notNullColumn, statementName, resultMapName, typeHandlerImpl); } }); Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd?rev=677835r1=677834r2=677835view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/builder/xml/sql-map-2.dtd Thu Jul 17 23:30:03 2008 @@ -91,6 +91,7 @@ columnIndex CDATA #IMPLIED jdbcType CDATA #IMPLIED nullValue CDATA #IMPLIED +notNullColumn CDATA #IMPLIED select CDATA #IMPLIED resultMap CDATA #IMPLIED typeHandler CDATA #IMPLIED Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/ResultMapConfig.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/ResultMapConfig.java?rev=677835r1=677834r2=677835view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/ResultMapConfig.java (original) +++ ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/config/ResultMapConfig.java Thu Jul 17 23:30:03 2008 @@ -101,7 +101,7 @@ discriminator.addSubMap(value.toString(), resultMap); } - public void addResultMapping(String propertyName, String columnName, Integer columnIndex, Class javaClass, String jdbcType, String nullValue, String statementName, String resultMapName, Object impl) { + public void addResultMapping(String propertyName, String columnName, Integer columnIndex, Class javaClass, String jdbcType, String nullValue, String notNullColumn, String statementName, String resultMapName, Object impl) { errorContext.setObjectId(propertyName + mapping of the + resultMap.getId() + result map); TypeHandler handler; if (impl != null) { @@ -121,6 +121,7 @@ mapping.setJdbcTypeName(jdbcType); mapping.setTypeHandler(handler); mapping.setNullValue(nullValue); +mapping.setNotNullColumn(notNullColumn); mapping.setStatementName(statementName); mapping.setNestedResultMapName(resultMapName); if (resultMapName != null resultMapName.length() 0) { Modified: ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java?rev=677835r1=677834r2=677835view=diff == --- ibatis/trunk/java/mapper/mapper2/src/com/ibatis/sqlmap/engine/mapping/result/ResultMap.java (original
svn commit: r678643 - /ibatis/trunk/java/jpetstore/jpetstore5/
Author: cbegin Date: Mon Jul 21 22:35:29 2008 New Revision: 678643 URL: http://svn.apache.org/viewvc?rev=678643view=rev Log: (empty) Modified: ibatis/trunk/java/jpetstore/jpetstore5/ (props changed) Propchange: ibatis/trunk/java/jpetstore/jpetstore5/ -- --- svn:ignore (added) +++ svn:ignore Mon Jul 21 22:35:29 2008 @@ -0,0 +1 @@ +Jpetstore5.iml
svn commit: r679240 - in /ibatis/trunk/java/jpetstore/jpetstore5: build/build.xml test/com/ibatis/jpetstore/persistence/DaoManagerTest.java
Author: cbegin Date: Wed Jul 23 17:07:52 2008 New Revision: 679240 URL: http://svn.apache.org/viewvc?rev=679240view=rev Log: added a test and improved build test failure notification Added: ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java Modified: ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml Modified: ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml URL: http://svn.apache.org/viewvc/ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml?rev=679240r1=679239r2=679240view=diff == --- ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml (original) +++ ibatis/trunk/java/jpetstore/jpetstore5/build/build.xml Wed Jul 23 17:07:52 2008 @@ -88,7 +88,7 @@ /target target name=test depends=coverage.instrument -junit printsummary=yes haltonfailure=no +junit printsummary=yes haltonfailure=no failureproperty=tests_failed classpath refid=classpath/ formatter type=xml/ @@ -160,6 +160,8 @@ /jar /target - target name=all depends=test.report, coverage.report, war/ + target name=all depends=test.report, coverage.report, war +fail if=tests_failed message=The tests did not pass/ + /target /project Added: ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java?rev=679240view=auto == --- ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java (added) +++ ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/persistence/DaoManagerTest.java Wed Jul 23 17:07:52 2008 @@ -0,0 +1,16 @@ +package com.ibatis.jpetstore.persistence; + +import com.ibatis.jpetstore.persistence.iface.CategoryDao; +import com.ibatis.dao.client.DaoManager; +import junit.framework.TestCase; + +public class DaoManagerTest extends TestCase { + + public void testShouldGetDaoManagerInstance() { +DaoManager daoMgr = DaoConfig.getDaoManager(); +assertNotNull(daoMgr); +CategoryDao catDao = (CategoryDao)daoMgr.getDao(CategoryDao.class); +assertNotNull(catDao); + } + +}
svn commit: r679245 - in /ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/domain: BeanIntrospector.java BeanTest.java ClassIntrospector.java
Author: cbegin Date: Wed Jul 23 17:29:36 2008 New Revision: 679245 URL: http://svn.apache.org/viewvc?rev=679245view=rev Log: (empty) Added: ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/domain/BeanIntrospector.java ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/domain/ClassIntrospector.java Modified: ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/domain/BeanTest.java Added: ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/domain/BeanIntrospector.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/domain/BeanIntrospector.java?rev=679245view=auto == --- ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/domain/BeanIntrospector.java (added) +++ ibatis/trunk/java/jpetstore/jpetstore5/test/com/ibatis/jpetstore/domain/BeanIntrospector.java Wed Jul 23 17:29:36 2008 @@ -0,0 +1,478 @@ +/* + * Copyright 2004 Clinton Begin + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.ibatis.jpetstore.domain; + +import java.util.*; +import java.lang.reflect.Method; + +/** + * Abstract class used to help development of Probe implementations + */ +public class BeanIntrospector { + + protected Object getIndexedProperty(Object object, String indexedName) { + +Object value = null; + +try { + String name = indexedName.substring(0, indexedName.indexOf('[')); + int i = Integer.parseInt(indexedName.substring(indexedName.indexOf('[') + 1, indexedName.indexOf(']'))); + Object list = null; + if(.equals(name)) { +list = object; + } else { +list = getProperty(object, name); + } + + if (list instanceof List) { +value = ((List) list).get(i); + } else if (list instanceof Object[]) { +value = ((Object[]) list)[i]; + } else if (list instanceof char[]) { +value = new Character(((char[]) list)[i]); + } else if (list instanceof boolean[]) { +value = new Boolean(((boolean[]) list)[i]); + } else if (list instanceof byte[]) { +value = new Byte(((byte[]) list)[i]); + } else if (list instanceof double[]) { +value = new Double(((double[]) list)[i]); + } else if (list instanceof float[]) { +value = new Float(((float[]) list)[i]); + } else if (list instanceof int[]) { +value = new Integer(((int[]) list)[i]); + } else if (list instanceof long[]) { +value = new Long(((long[]) list)[i]); + } else if (list instanceof short[]) { +value = new Short(((short[]) list)[i]); + } else { +throw new RuntimeException(The ' + name + ' property of the + object.getClass().getName() + class is not a List or Array.); + } + +} catch (RuntimeException e) { + throw e; +} catch (Exception e) { + throw new RuntimeException(Error getting ordinal list from JavaBean. Cause + e, e); +} + +return value; + } + + protected Class getIndexedType(Object object, String indexedName) { + +Class value = null; + +try { + String name = indexedName.substring(0, indexedName.indexOf('[')); + int i = Integer.parseInt(indexedName.substring(indexedName.indexOf('[') + 1, indexedName.indexOf(']'))); + Object list = null; + if(!.equals(name)) { +list = getProperty(object, name); + } else { +list = object; + } + + if (list instanceof List) { +value = ((List) list).get(i).getClass(); + } else if (list instanceof Object[]) { +value = ((Object[]) list)[i].getClass(); + } else if (list instanceof char[]) { +value = Character.class; + } else if (list instanceof boolean[]) { +value = Boolean.class; + } else if (list instanceof byte[]) { +value = Byte.class; + } else if (list instanceof double[]) { +value = Double.class; + } else if (list instanceof float[]) { +value = Float.class; + } else if (list instanceof int[]) { +value = Integer.class; + } else if (list instanceof long[]) { +value = Long.class; + } else if (list instanceof short[]) { +value = Short.class; + } else { +throw new RuntimeException(The ' + name + ' property of the + object.getClass().getName() + class is not a List or Array
svn commit: r681390 - /ibatis/trunk/site/pages/javadownloads.vm
Author: cbegin Date: Thu Jul 31 07:55:47 2008 New Revision: 681390 URL: http://svn.apache.org/viewvc?rev=681390view=rev Log: beta description changes Modified: ibatis/trunk/site/pages/javadownloads.vm Modified: ibatis/trunk/site/pages/javadownloads.vm URL: http://svn.apache.org/viewvc/ibatis/trunk/site/pages/javadownloads.vm?rev=681390r1=681389r2=681390view=diff == --- ibatis/trunk/site/pages/javadownloads.vm (original) +++ ibatis/trunk/site/pages/javadownloads.vm Thu Jul 31 07:55:47 2008 @@ -17,7 +17,7 @@ we have enough feedback from users that the sofware is working as intended, then we promote the status of the build to General Availability. The software does not change between Beta and General Availability release status. br/br/ - As the development team, we can only release Beta status software. YOU must get it promoted to General Availability by responding to the [ANNOUNCE] + As the development team, we can only release Beta status software. YOU must get it promoted to General Availability by responding to the ANNOUNCE email on the Mailing list with your vote of confidence and your experience having deployed it to your production environment. br/br/ Please download this version and test it in the most production-like way possible and post your experience to the release announcement thread.
svn commit: r683745 [9/22] - in /ibatis/trunk/java/ibatis-3: ./ ibatis-3-compat/ ibatis-3-compat/src/ ibatis-3-compat/src/main/ ibatis-3-compat/src/main/java/ ibatis-3-compat/src/main/java/com/ ibatis
Added: ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/IterateTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/IterateTest.java?rev=683745view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/IterateTest.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/test/java/com/ibatis/sqlmap/IterateTest.java Thu Aug 7 16:21:46 2008 @@ -0,0 +1,160 @@ +package com.ibatis.sqlmap; + +import testdomain.Account; + +import java.sql.SQLException; +import java.util.*; + +public class IterateTest extends BaseSqlMapTest { + + protected void setUp() throws Exception { +initSqlMap(com/ibatis/sqlmap/maps/SqlMapConfig.xml, null); +initScript(scripts/account-init.sql); + } + + protected void tearDown() throws Exception { + } + + // Iterate + + public void testIterate() throws SQLException { +List params = Arrays.asList(new Integer[]{new Integer(1), new Integer(2), new Integer(3)}); +List list = sqlMap.queryForList(dynamicIterate, params); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + // Iterate + + public void testIterateInConditional() throws SQLException { +List params = Arrays.asList(new Integer[]{new Integer(1), new Integer(2), new Integer(3)}); +List list = sqlMap.queryForList(dynamicIterateInConditional, params); +assertEquals(2, list.size()); +assertAccount1((Account) list.get(0)); +assertEquals(1, ((Account) list.get(0)).getId()); +assertEquals(3, ((Account) list.get(1)).getId()); + } + + public void testIterateLiteral() throws SQLException { +List params = Arrays.asList(new Integer[]{new Integer(1), new Integer(2), new Integer(3)}); +List list = sqlMap.queryForList(dynamicIterateLiteral, params); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + public void testMultiIterate() throws SQLException { +List params = Arrays.asList(new Integer[]{new Integer(1), new Integer(2), new Integer(3)}); +List list = sqlMap.queryForList(multiDynamicIterate, params); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + public void testMultiIterateLiteral() throws SQLException { +List params = Arrays.asList(new Integer[]{new Integer(1), new Integer(2), new Integer(3)}); +List list = sqlMap.queryForList(multiDynamicIterateLiteral, params); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + // ARRAY + + public void testArrayPropertyIterate() throws SQLException { +Account account = new Account(); +account.setIds(new int[]{1, 2, 3}); +List list = sqlMap.queryForList(dynamicQueryByExample, account); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + public void testArrayPropertyIterate2() throws SQLException { +Account account = new Account(); +account.setAge(4); +account.setIds(new int[]{1, 2, 3}); +List list = sqlMap.queryForList(dynamicQueryByExample2, account); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + public void testArrayPropertyIterate2Literal() throws SQLException { +Account account = new Account(); +account.setAge(4); +account.setIds(new int[]{1, 2, 3}); +List list = sqlMap.queryForList(dynamicQueryByExample2Literal, account); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + // LIST IN MAP + + public void testListInMap() throws SQLException { +List paramList = new Vector(); +paramList.add(new Integer(1)); +paramList.add(new Integer(2)); +paramList.add(new Integer(3)); + +Map paramMap = new HashMap(); +paramMap.put(paramList, paramList); + +List list = sqlMap.queryForList(iterateListInMap, paramMap); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + public void testListDirect() throws SQLException { +List paramList = new Vector(); +paramList.add(new Integer(1)); +paramList.add(new Integer(2)); +paramList.add(new Integer(3)); + +List list = sqlMap.queryForList(iterateListDirect, paramList); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + public void testIterateNestedListProperty() throws SQLException { +Account account = new Account(); +account.setAccountList(new ArrayList()); +account.getAccountList().add(new Account(1)); +account.getAccountList().add(new Account(2)); +account.getAccountList().add(new Account(3)); + +List list = sqlMap.queryForList(iterateNestedListProperty, account); +assertAccount1((Account) list.get(0)); +assertEquals(3, list.size()); + } + + public void testIterateNestedListPropertyB() throws SQLException { +Account account =
svn commit: r683745 [22/22] - in /ibatis/trunk/java/ibatis-3: ./ ibatis-3-compat/ ibatis-3-compat/src/ ibatis-3-compat/src/main/ ibatis-3-compat/src/main/java/ ibatis-3-compat/src/main/java/com/ ibati
Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/LongTypeHandlerTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/LongTypeHandlerTest.java?rev=683745view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/LongTypeHandlerTest.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/LongTypeHandlerTest.java Thu Aug 7 16:21:46 2008 @@ -0,0 +1,53 @@ +package org.apache.ibatis.type; + +import org.jmock.Expectations; +import org.junit.*; + +public class LongTypeHandlerTest extends BaseTypeHandlerTest { + + private static final TypeHandler TYPE_HANDLER = new LongTypeHandler(); + + @Test + public void shouldSetParameter() + throws Exception { +mockery.checking(new Expectations() { + { +one(ps).setLong(with(any(int.class)), with(any(long.class))); + } +}); +TYPE_HANDLER.setParameter(ps, 1, 100l, null); +mockery.assertIsSatisfied(); + } + + @Test + public void shouldGetResultFromResultSet() + throws Exception { +mockery.checking(new Expectations() { + { +one(rs).getLong(with(any(String.class))); +will(returnValue(100l)); +one(rs).wasNull(); +will(returnValue(false)); + } +}); +Assert.assertEquals(100l, TYPE_HANDLER.getResult(rs, column)); +mockery.assertIsSatisfied(); + } + + @Test + public void shouldGetResultFromCallableStatement() + throws Exception { +mockery.checking(new Expectations() { + { +one(cs).getLong(with(any(int.class))); +will(returnValue(100l)); +one(cs).wasNull(); +will(returnValue(false)); + } +}); +Assert.assertEquals(100l, TYPE_HANDLER.getResult(cs, 1)); +mockery.assertIsSatisfied(); + } + + +} \ No newline at end of file Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/ObjectTypeHandlerTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/ObjectTypeHandlerTest.java?rev=683745view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/ObjectTypeHandlerTest.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/ObjectTypeHandlerTest.java Thu Aug 7 16:21:46 2008 @@ -0,0 +1,53 @@ +package org.apache.ibatis.type; + +import org.jmock.Expectations; +import org.junit.*; + +public class ObjectTypeHandlerTest extends BaseTypeHandlerTest { + + private static final TypeHandler TYPE_HANDLER = new ObjectTypeHandler(); + + @Test + public void shouldSetParameter() + throws Exception { +mockery.checking(new Expectations() { + { +one(ps).setObject(with(any(int.class)), with(any(String.class))); + } +}); +TYPE_HANDLER.setParameter(ps, 1, Hello, null); +mockery.assertIsSatisfied(); + } + + @Test + public void shouldGetResultFromResultSet() + throws Exception { +mockery.checking(new Expectations() { + { +one(rs).getObject(with(any(String.class))); +will(returnValue(Hello)); +one(rs).wasNull(); +will(returnValue(false)); + } +}); +Assert.assertEquals(Hello, TYPE_HANDLER.getResult(rs, column)); +mockery.assertIsSatisfied(); + } + + @Test + public void shouldGetResultFromCallableStatement() + throws Exception { +mockery.checking(new Expectations() { + { +one(cs).getObject(with(any(int.class))); +will(returnValue(Hello)); +one(cs).wasNull(); +will(returnValue(false)); + } +}); +Assert.assertEquals(Hello, TYPE_HANDLER.getResult(cs, 1)); +mockery.assertIsSatisfied(); + } + + +} \ No newline at end of file Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/ShortTypeHandlerTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/ShortTypeHandlerTest.java?rev=683745view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/ShortTypeHandlerTest.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/type/ShortTypeHandlerTest.java Thu Aug 7 16:21:46 2008 @@ -0,0 +1,53 @@ +package org.apache.ibatis.type; + +import org.jmock.Expectations; +import org.junit.*; + +public class ShortTypeHandlerTest extends BaseTypeHandlerTest { + + private static final TypeHandler TYPE_HANDLER = new ShortTypeHandler(); + + @Test + public void shouldSetParameter() + throws Exception { +mockery.checking(new Expectations() { +
svn commit: r683745 [16/22] - in /ibatis/trunk/java/ibatis-3: ./ ibatis-3-compat/ ibatis-3-compat/src/ ibatis-3-compat/src/main/ ibatis-3-compat/src/main/java/ ibatis-3-compat/src/main/java/com/ ibati
Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java?rev=683745view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandler.java Thu Aug 7 16:21:46 2008 @@ -0,0 +1,472 @@ +package org.apache.ibatis.executor.resultset; + +import org.apache.ibatis.cache.CacheKey; +import org.apache.ibatis.mapping.Configuration; +import org.apache.ibatis.executor.Executor; +import org.apache.ibatis.executor.loader.*; +import org.apache.ibatis.executor.parameter.ParameterHandler; +import org.apache.ibatis.executor.result.*; +import org.apache.ibatis.mapping.*; +import org.apache.ibatis.reflection.*; +import org.apache.ibatis.type.*; + +import java.sql.*; +import java.util.*; + +public class DefaultResultSetHandler implements ResultSetHandler { + + private static final Object NO_VALUE = new Object(); + + private final Executor executor; + private final ObjectFactory objectFactory; + private final TypeHandlerRegistry typeHandlerRegistry; + private final MappedStatement mappedStatement; + private final int rowOffset; + private final int rowLimit; + private final Object parameterObject; + + private final Map nestedResultObjects; + private CacheKey currentNestedKey; + + private ResultHandler resultHandler; + + private ReferenceBoolean foundValues; + + public DefaultResultSetHandler(Executor executor, MappedStatement mappedStatement, ParameterHandler parameterHandler, int rowOffset, int rowLimit, ResultHandler resultHandler) { +this.executor = executor; +this.objectFactory = mappedStatement.getConfiguration().getObjectFactory(); +this.typeHandlerRegistry = mappedStatement.getConfiguration().getTypeHandlerRegistry(); +this.mappedStatement = mappedStatement; +this.rowOffset = rowOffset; +this.rowLimit = rowLimit; +this.parameterObject = parameterHandler.getParameterObject(); +this.nestedResultObjects = new HashMap(); +this.resultHandler = resultHandler; +this.foundValues = new ReferenceBoolean(false); + } + + public List handleResultSets(Statement statement) throws SQLException { +ListList resultsList = new ArrayListList(); +ResultSet rs = getFirstResultSet(statement); +if (rs != null) { + try { +for (int i = 0, n = mappedStatement.getResultMaps().size(); i n; i++) { + ResultMap resultMap = mappedStatement.getResultMaps().get(i); + if (resultHandler == null) { +DefaultResultHandler defaultResultHandler = new DefaultResultHandler(); +handleResults(rs, resultMap, defaultResultHandler, rowOffset, rowLimit); +resultsList.add(defaultResultHandler.getResultList()); + } else { +handleResults(rs, resultMap, resultHandler, rowOffset, rowLimit); + } + if (moveToNextResultsSafely(statement)) { +rs = statement.getResultSet(); +nestedResultObjects.clear(); + } else { +break; + } +} + } finally { +closeResultSet(rs); + } +} +if (resultsList.size() == 1) { + return resultsList.get(0); +} else { + return resultsList; +} + } + + public void handleOutputParameters(CallableStatement callableStatement) throws SQLException { +ParameterMap parameterMap = mappedStatement.getParameterMap(); +MetaObject metaParam = MetaObject.forObject(parameterObject); +ListParameterMapping parameterMappings = mappedStatement.getDynamicParameterMappings(parameterObject); +for (int i = 0; i parameterMappings.size(); i++) { + ParameterMapping parameterMapping = parameterMappings.get(i); + if (parameterMapping.getMode() == ParameterMode.OUT || parameterMapping.getMode() == ParameterMode.INOUT) { +if (java.sql.ResultSet.equalsIgnoreCase(parameterMapping.getJavaType().getName())) { + // TODO: We need an easy way to unit test this without installing Oracle. + // Mocks are obvious, but will they be effective enough? DBunit? + ResultSet rs = (ResultSet) callableStatement.getObject(i + 1); + ResultMap resultMap = mappedStatement.getConfiguration().getResultMap(parameterMapping.getResultMapId()); + if (resultMap == null) { +throw new RuntimeException(Parameter requires ResultMap for output types of java.sql.ResultSet); + } else { +DefaultResultHandler resultHandler = new DefaultResultHandler(); +handleResults(rs, resultMap, resultHandler,
svn commit: r683750 - in /ibatis/trunk/java/ibatis-3: ./ ibatis-3-compat/ ibatis-3-core/
Author: cbegin Date: Thu Aug 7 16:41:35 2008 New Revision: 683750 URL: http://svn.apache.org/viewvc?rev=683750view=rev Log: Ignored a bunch of build products. Modified: ibatis/trunk/java/ibatis-3/ (props changed) ibatis/trunk/java/ibatis-3/ibatis-3-compat/ (props changed) ibatis/trunk/java/ibatis-3/ibatis-3-core/ (props changed) Propchange: ibatis/trunk/java/ibatis-3/ -- --- svn:ignore (added) +++ svn:ignore Thu Aug 7 16:41:35 2008 @@ -0,0 +1,5 @@ +ibatis-3.iml +ibatis-3.ipr +ibatis-3.iws +derby.log +ibderby Propchange: ibatis/trunk/java/ibatis-3/ibatis-3-compat/ -- --- svn:ignore (added) +++ svn:ignore Thu Aug 7 16:41:35 2008 @@ -0,0 +1,4 @@ +ibderby +derby.log +target +ibatis-3-compat.iml Propchange: ibatis/trunk/java/ibatis-3/ibatis-3-core/ -- --- svn:ignore (added) +++ svn:ignore Thu Aug 7 16:41:35 2008 @@ -0,0 +1,4 @@ +derby.log +ibderby +target +ibatis-3-core.iml
svn commit: r683807 - /ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/cache/SoftCacheTest.java
Author: cbegin Date: Thu Aug 7 19:46:34 2008 New Revision: 683807 URL: http://svn.apache.org/viewvc?rev=683807view=rev Log: Ignoring SoftCacheTest until such time as it can be made to run reliably on all architectures. Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/cache/SoftCacheTest.java Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/cache/SoftCacheTest.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/cache/SoftCacheTest.java?rev=683807r1=683806r2=683807view=diff == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/cache/SoftCacheTest.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/cache/SoftCacheTest.java Thu Aug 7 19:46:34 2008 @@ -6,7 +6,7 @@ public class SoftCacheTest { - @Test + @Test @Ignore(Until we can find a reliable way to test it on all machines.) public void shouldDemonstrateObjectsBeingCollectedAsNeeded() throws Exception { SoftCache cache = new SoftCache(); int n = 10;
svn commit: r684014 - in /ibatis/trunk/java/ibatis-3: ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/ ibatis-3-core/src/main/java/org/apache/ibatis/mapping/
Author: cbegin Date: Fri Aug 8 09:33:26 2008 New Revision: 684014 URL: http://svn.apache.org/viewvc?rev=684014view=rev Log: Introduced ExecutorType to replace old cooperative booleans. Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/ExecutorType.java Modified: ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java Modified: ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java?rev=684014r1=684013r2=684014view=diff == --- ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-compat/src/main/java/com/ibatis/sqlmap/engine/builder/XmlSqlMapConfigParser.java Fri Aug 8 09:33:26 2008 @@ -8,6 +8,7 @@ import org.apache.ibatis.reflection.*; import org.apache.ibatis.type.*; import org.apache.ibatis.xml.*; +import org.apache.ibatis.mapping.ExecutorType; import java.io.Reader; import java.util.*; @@ -94,10 +95,14 @@ config.setEnhancementEnabled(enhancementEnabled); boolean statementCachingEnabled = context.getBooleanAttribute(statementCachingEnabled, true); -config.setStatementCachingEnabled(statementCachingEnabled); +if (statementCachingEnabled) { + config.setDefaultExecutorType(ExecutorType.REUSE); +} boolean batchUpdatesEnabled = context.getBooleanAttribute(batchUpdatesEnabled, true); -config.setBatchUpdatesEnabled(batchUpdatesEnabled); +if (batchUpdatesEnabled) { + config.setDefaultExecutorType(ExecutorType.BATCH); +} boolean cacheModelsEnabled = context.getBooleanAttribute(cacheModelsEnabled, true); config.setCacheEnabled(cacheModelsEnabled); Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java?rev=684014r1=684013r2=684014view=diff == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/Configuration.java Fri Aug 8 09:33:26 2008 @@ -22,9 +22,7 @@ private boolean useColumnLabel = true; private boolean cacheEnabled; - //TODO: Make enum for reuse/batch/simple executors - private boolean statementCachingEnabled; - private boolean batchUpdatesEnabled; + private ExecutorType defaultExecutorType = ExecutorType.SIMPLE; private Properties variables = new Properties(); private ObjectFactory objectFactory = new DefaultObjectFactory(); @@ -70,20 +68,12 @@ this.generatedKeysEnabled = generatedKeysEnabled; } - public boolean isStatementCachingEnabled() { -return statementCachingEnabled; + public ExecutorType getDefaultExecutorType() { +return defaultExecutorType; } - public void setStatementCachingEnabled(boolean statementCachingEnabled) { -this.statementCachingEnabled = statementCachingEnabled; - } - - public boolean isBatchUpdatesEnabled() { -return batchUpdatesEnabled; - } - - public void setBatchUpdatesEnabled(boolean batchUpdatesEnabled) { -this.batchUpdatesEnabled = batchUpdatesEnabled; + public void setDefaultExecutorType(ExecutorType defaultExecutorType) { +this.defaultExecutorType = defaultExecutorType; } public boolean isCacheEnabled() { @@ -153,10 +143,16 @@ } public Executor newExecutor(Connection conn) { +return newExecutor(conn,defaultExecutorType); + } + + public Executor newExecutor(Connection conn, ExecutorType executorType) { +executorType = executorType == null ? defaultExecutorType : executorType; +executorType = executorType == null ? ExecutorType.SIMPLE : executorType; Executor executor; -if (batchUpdatesEnabled) { +if (ExecutorType.BATCH == executorType) { executor = new BatchExecutor(conn); -} else if (statementCachingEnabled) { +} else if (ExecutorType.REUSE == executorType) { executor = new ReuseExecutor(conn); } else { executor = new SimpleExecutor(conn); Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/ExecutorType.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/mapping/ExecutorType.java?rev=684014view=auto
svn commit: r684074 - in /ibatis/trunk/java/ibatis-3/ibatis-3-core/src: main/java/org/apache/ibatis/metadata/ test/java/org/apache/ibatis/metadata/
Author: cbegin Date: Fri Aug 8 13:13:28 2008 New Revision: 684074 URL: http://svn.apache.org/viewvc?rev=684074view=rev Log: Added DB Metadata classes Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Column.java (with props) ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Database.java (with props) ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/DatabaseFactory.java (with props) ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Table.java (with props) ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/metadata/ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/metadata/MetadataTest.java (with props) Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Column.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Column.java?rev=684074view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Column.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Column.java Fri Aug 8 13:13:28 2008 @@ -0,0 +1,40 @@ +package org.apache.ibatis.metadata; + +public class Column { + + private String name; + private int type; + + public Column(String name, int type) { +this.name = name; +this.type = type; + } + + public String getName() { +return name; + } + + public int getType() { +return type; + } + + public boolean equals(Object o) { +if (this == o) return true; +if (o == null || getClass() != o.getClass()) return false; + +final Column column = (Column) o; + +if (type != column.type) return false; +if (name != null ? !name.equals(column.name) : column.name != null) return false; + +return true; + } + + public int hashCode() { +int result; +result = (name != null ? name.hashCode() : 0); +result = 29 * result + type; +return result; + } + +} Propchange: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Column.java -- svn:executable = * Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Database.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Database.java?rev=684074view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Database.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Database.java Fri Aug 8 13:13:28 2008 @@ -0,0 +1,57 @@ +package org.apache.ibatis.metadata; + +import java.util.HashMap; +import java.util.Map; + +public class Database { + + private String catalog; + private String schema; + + private Map tables = new HashMap(); + + public Database(String catalog, String schema) { +this.catalog = catalog; +this.schema = schema; + } + + public String getCatalog() { +return catalog; + } + + public String getSchema() { +return schema; + } + + public void addTable(Table table) { +tables.put(table.getName().toUpperCase(), table); + } + + public Table getTable(String name) { +return (Table)tables.get(name.toUpperCase()); + } + + public String[] getTableNames() { +return (String[])tables.keySet().toArray(new String[tables.size()]); + } + + public boolean equals(Object o) { +if (this == o) return true; +if (o == null || getClass() != o.getClass()) return false; + +final Database database = (Database) o; + +if (catalog != null ? !catalog.equals(database.catalog) : database.catalog != null) return false; +if (schema != null ? !schema.equals(database.schema) : database.schema != null) return false; + +return true; + } + + public int hashCode() { +int result; +result = (catalog != null ? catalog.hashCode() : 0); +result = 29 * result + (schema != null ? schema.hashCode() : 0); +return result; + } + +} Propchange: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/Database.java -- svn:executable = * Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/DatabaseFactory.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/metadata/DatabaseFactory.java?rev=684074view=auto
svn commit: r684110 - in /ibatis/trunk/java: mapper/mapper2/ mapper2/
Author: cbegin Date: Fri Aug 8 14:55:14 2008 New Revision: 684110 URL: http://svn.apache.org/viewvc?rev=684110view=rev Log: Moved remotely Added: ibatis/trunk/java/mapper2/ - copied from r684109, ibatis/trunk/java/mapper/mapper2/ Removed: ibatis/trunk/java/mapper/mapper2/
svn commit: r684112 - in /ibatis/trunk/java: ibatis-2/ mapper2/
Author: cbegin Date: Fri Aug 8 14:55:49 2008 New Revision: 684112 URL: http://svn.apache.org/viewvc?rev=684112view=rev Log: Added: ibatis/trunk/java/ibatis-2/ - copied from r684111, ibatis/trunk/java/mapper2/ Removed: ibatis/trunk/java/mapper2/
svn commit: r684113 - /ibatis/trunk/java/ibatis-2/tools/
Author: cbegin Date: Fri Aug 8 14:56:10 2008 New Revision: 684113 URL: http://svn.apache.org/viewvc?rev=684113view=rev Log: Removed file/folder Removed: ibatis/trunk/java/ibatis-2/tools/
svn commit: r684115 - /ibatis/trunk/java/jpetstore/jpetstore4/
Author: cbegin Date: Fri Aug 8 14:57:48 2008 New Revision: 684115 URL: http://svn.apache.org/viewvc?rev=684115view=rev Log: Removed file/folder Removed: ibatis/trunk/java/jpetstore/jpetstore4/
svn commit: r684114 - in /ibatis/trunk/java: docs-2/ docs/
Author: cbegin Date: Fri Aug 8 14:57:21 2008 New Revision: 684114 URL: http://svn.apache.org/viewvc?rev=684114view=rev Log: Added: ibatis/trunk/java/docs-2/ - copied from r684113, ibatis/trunk/java/docs/ Removed: ibatis/trunk/java/docs/
svn commit: r684116 - in /ibatis/trunk/java: ibatis-2-core/ ibatis-2/
Author: cbegin Date: Fri Aug 8 14:58:44 2008 New Revision: 684116 URL: http://svn.apache.org/viewvc?rev=684116view=rev Log: Renamed remotely Added: ibatis/trunk/java/ibatis-2-core/ - copied from r684115, ibatis/trunk/java/ibatis-2/ Removed: ibatis/trunk/java/ibatis-2/
svn commit: r684117 - in /ibatis/trunk/java: docs-2/ ibatis-2-docs/
Author: cbegin Date: Fri Aug 8 14:59:00 2008 New Revision: 684117 URL: http://svn.apache.org/viewvc?rev=684117view=rev Log: Renamed remotely Added: ibatis/trunk/java/ibatis-2-docs/ - copied from r684116, ibatis/trunk/java/docs-2/ Removed: ibatis/trunk/java/docs-2/
svn commit: r684121 - in /ibatis/trunk/java: ibatis-2-core/ ibatis-2/ibatis-2-core/
Author: cbegin Date: Fri Aug 8 14:59:42 2008 New Revision: 684121 URL: http://svn.apache.org/viewvc?rev=684121view=rev Log: Moved remotely Added: ibatis/trunk/java/ibatis-2/ibatis-2-core/ - copied from r684120, ibatis/trunk/java/ibatis-2-core/ Removed: ibatis/trunk/java/ibatis-2-core/
svn commit: r684118 - /ibatis/trunk/java/ibatis-2/
Author: cbegin Date: Fri Aug 8 14:59:20 2008 New Revision: 684118 URL: http://svn.apache.org/viewvc?rev=684118view=rev Log: Added: ibatis/trunk/java/ibatis-2/
svn commit: r684123 - /ibatis/trunk/java/jpetstore/
Author: cbegin Date: Fri Aug 8 15:00:42 2008 New Revision: 684123 URL: http://svn.apache.org/viewvc?rev=684123view=rev Log: Removed file/folder Removed: ibatis/trunk/java/jpetstore/
svn commit: r684125 - in /ibatis/trunk/java/ibatis-2: jpetstore-5/ jpetstore5/
Author: cbegin Date: Fri Aug 8 15:02:59 2008 New Revision: 684125 URL: http://svn.apache.org/viewvc?rev=684125view=rev Log: Added: ibatis/trunk/java/ibatis-2/jpetstore-5/ - copied from r684124, ibatis/trunk/java/ibatis-2/jpetstore5/ Removed: ibatis/trunk/java/ibatis-2/jpetstore5/
svn commit: r684410 [6/16] - in /ibatis/trunk/java/ibatis-3: ./ ibatis-3-core/src/main/java/org/apache/ibatis/ognl/ ibatis-3-core/src/test/java/org/apache/ibatis/ognl/ ibatis-3-core/src/test/java/org/
Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/ognl/OgnlOps.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/ognl/OgnlOps.java?rev=684410view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/ognl/OgnlOps.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/main/java/org/apache/ibatis/ognl/OgnlOps.java Sat Aug 9 23:00:18 2008 @@ -0,0 +1,730 @@ +//-- +// Copyright (c) 1998-2004, Drew Davidson and Luke Blanshard +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// Neither the name of the Drew Davidson nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +// DAMAGE. +//-- +package org.apache.ibatis.ognl; + +import java.lang.reflect.Array; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.util.Enumeration; + +/** + * This is an abstract class with static methods that define the operations of OGNL. + * @author Luke Blanshard ([EMAIL PROTECTED]) + * @author Drew Davidson ([EMAIL PROTECTED]) + */ +public abstract class OgnlOps implements NumericTypes +{ +/** + * Compares two objects for equality, even if it has to convert + * one of them to the other type. If both objects are numeric + * they are converted to the widest type and compared. If + * one is non-numeric and one is numeric the non-numeric is + * converted to double and compared to the double numeric + * value. If both are non-numeric and Comparable and the + * types are compatible (i.e. v1 is of the same or superclass + * of v2's type) they are compared with Comparable.compareTo(). + * If both values are non-numeric and not Comparable or of + * incompatible classes this will throw and IllegalArgumentException. + * + * @param v1First value to compare + * @param v2second value to compare + * + * @return integer describing the comparison between the two objects. + * A negative number indicates that v1 v2. Positive indicates + * that v1 v2. Zero indicates v1 == v2. + * + * @throws IllegalArgumentException if the objects are both non-numeric + * yet of incompatible types or do not implement Comparable. + */ +public static int compareWithConversion( Object v1, Object v2 ) +{ +return compareWithConversion(v1, v2, false); +} + +/** + * Compares two objects for equality, even if it has to convert + * one of them to the other type. If both objects are numeric + * they are converted to the widest type and compared. If + * one is non-numeric and one is numeric the non-numeric is + * converted to double and compared to the double numeric + * value. If both are non-numeric and Comparable and the + * types are compatible (i.e. v1 is of the same or superclass + * of v2's type) they are compared with Comparable.compareTo(). + * If both values are non-numeric and not Comparable or of + * incompatible classes this will throw and IllegalArgumentException. + * + * @param v1First value to compare + * @param v2second value to compare + * + * @return integer describing the comparison between the two objects. + * A negative number indicates that v1 v2.
svn commit: r684410 [16/16] - in /ibatis/trunk/java/ibatis-3: ./ ibatis-3-core/src/main/java/org/apache/ibatis/ognl/ ibatis-3-core/src/test/java/org/apache/ibatis/ognl/ ibatis-3-core/src/test/java/org
Added: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/ognl/util/NameFactory.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/ognl/util/NameFactory.java?rev=684410view=auto == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/ognl/util/NameFactory.java (added) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/ognl/util/NameFactory.java Sat Aug 9 23:00:18 2008 @@ -0,0 +1,62 @@ +//-- +// Copyright (c) 2004, Drew Davidson and Luke Blanshard +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// Neither the name of the Drew Davidson nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +// DAMAGE. +//-- +package org.apache.ibatis.ognl.util; + +public class NameFactory extends Object +{ +private String classBaseName; +private int classNameCounter = 0; +private String variableBaseName; +private int variableNameCounter = 0; + + /*=== + Constructors + ===*/ +public NameFactory(String classBaseName, String variableBaseName) +{ +super(); +this.classBaseName = classBaseName; +this.variableBaseName = variableBaseName; +} + + /*=== + Public methods + ===*/ +public String getNewClassName() +{ +return classBaseName + classNameCounter++; +} + +public String getNewVariableName() +{ +return variableBaseName + variableNameCounter++; +} +}