svn commit: r683968 - in /ibatis/trunk/java/tools/ibator/core: build/ testJava2/ibatortest/java2/ testJava2/ibatortest/java2/execute/conditional/java2/ testJava5/ibatortest/
Author: jgbutler Date: Fri Aug 8 07:05:10 2008 New Revision: 683968 URL: http://svn.apache.org/viewvc?rev=683968&view=rev Log: Ibator: Add tests for BIT datatype Modified: ibatis/trunk/java/tools/ibator/core/build/version.properties ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/CreateDB.sql ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/execute/conditional/java2/InsertTests.java ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/ibatorConfig.xml ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/CreateDB.sql ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/ibatorConfig.xml Modified: ibatis/trunk/java/tools/ibator/core/build/version.properties URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/build/version.properties?rev=683968&r1=683967&r2=683968&view=diff == --- ibatis/trunk/java/tools/ibator/core/build/version.properties (original) +++ ibatis/trunk/java/tools/ibator/core/build/version.properties Fri Aug 8 07:05:10 2008 @@ -1,4 +1,4 @@ #ibator build version info -#Wed Jul 23 17:01:53 CDT 2008 +#Tue Jul 29 16:30:16 CDT 2008 version=1.2.0 -buildNum=577 +buildNum=581 Modified: ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/CreateDB.sql URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/CreateDB.sql?rev=683968&r1=683967&r2=683968&view=diff == --- ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/CreateDB.sql (original) +++ ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/CreateDB.sql Fri Aug 8 07:05:10 2008 @@ -74,6 +74,7 @@ id7$$ int not null, EmailAddress varchar(30), "from" varchar(30), + active bit not null, primary key("CuStOmEr iD") ); Modified: ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/execute/conditional/java2/InsertTests.java URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/execute/conditional/java2/InsertTests.java?rev=683968&r1=683967&r2=683968&view=diff == --- ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/execute/conditional/java2/InsertTests.java (original) +++ ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/execute/conditional/java2/InsertTests.java Fri Aug 8 07:05:10 2008 @@ -224,6 +224,7 @@ record.setSecondCustomerId(new Integer(567)); record.setSecondFirstName("fred2"); record.setThirdFirstName("fred3"); +record.setActive(true); Integer generatedCustomerId = dao.insert(record); assertEquals(57, generatedCustomerId.intValue()); @@ -251,6 +252,8 @@ .getSecondFirstName()); assertEquals(record.getThirdFirstName(), returnedRecord .getThirdFirstName()); +assertEquals(record.isActive(), returnedRecord +.isActive()); } catch (Exception e) { fail(e.getMessage()); } Modified: ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/ibatorConfig.xml URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/ibatorConfig.xml?rev=683968&r1=683967&r2=683968&view=diff == --- ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/ibatorConfig.xml (original) +++ ibatis/trunk/java/tools/ibator/core/testJava2/ibatortest/java2/ibatorConfig.xml Fri Aug 8 07:05:10 2008 @@ -45,6 +45,7 @@ + @@ -84,6 +85,7 @@ + @@ -123,6 +125,7 @@ + Modified: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/CreateDB.sql URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/CreateDB.sql?rev=683968&r1=683967&r2=683968&view=diff == --- ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/CreateDB.sql (original) +++ ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/CreateDB.sql Fri Aug 8 07:05:10 2008 @@ -74,6 +74,7 @@ id7$$ int not null, EmailAddress varchar(30), "from" varchar(30), + active bit not null, primary key("CuStOmEr iD") ); Modified: ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/ibatorConfig.xml URL: http://svn.apache.org/viewvc/ibatis/trunk/java/tools/ibator/core/testJava5/ibatortest/ibatorConfig.xml?rev=683968&r1=683967&r2=683968&view=diff == --- ibatis/trunk/java/tools/ibator/cor
svn commit: r683996 - in /ibatis/trunk/java/ibatis-3: ibatis-3-compat/pom.xml ibatis-3-core/pom.xml
Author: bgoodin Date: Fri Aug 8 08:16:11 2008 New Revision: 683996 URL: http://svn.apache.org/viewvc?rev=683996&view=rev Log: - set exclude on *.java in resource definitions for core and compat - added java.net repository definition and set jta to 1.0.1B. Not the latest but it compiles and passes all tests - added sources plugin to core and compat so that they now produce sources jars during the verify phase. Mibatis-3-core/pom.xml Mibatis-3-compat/pom.xml Modified: ibatis/trunk/java/ibatis-3/ibatis-3-compat/pom.xml ibatis/trunk/java/ibatis-3/ibatis-3-core/pom.xml Modified: ibatis/trunk/java/ibatis-3/ibatis-3-compat/pom.xml URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-compat/pom.xml?rev=683996&r1=683995&r2=683996&view=diff == --- ibatis/trunk/java/ibatis-3/ibatis-3-compat/pom.xml (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-compat/pom.xml Fri Aug 8 08:16:11 2008 @@ -21,15 +21,34 @@ 1.5 + +org.apache.maven.plugins +maven-source-plugin + + +attach-sources +verify + + jar + + + + src/main/java + + *.java + src/test/java + + *.java + @@ -47,9 +66,9 @@ compile - jta + javax.transaction jta - 1.1.1 + 1.0.1B compile @@ -71,6 +90,13 @@ 10.3.2.1 test - + + + maven2-repository.dev.java.net + Java.net Repository for Maven + http://download.java.net/maven/2/ + default + + Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/pom.xml URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/pom.xml?rev=683996&r1=683995&r2=683996&view=diff == --- ibatis/trunk/java/ibatis-3/ibatis-3-core/pom.xml (original) +++ ibatis/trunk/java/ibatis-3/ibatis-3-core/pom.xml Fri Aug 8 08:16:11 2008 @@ -21,15 +21,34 @@ 1.5 + +org.apache.maven.plugins +maven-source-plugin + + +attach-sources +verify + + jar + + + + src/main/java + + *.java + src/test/java + + *.java +
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=684014&view=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=684014&r1=684013&r2=684014&view=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=684014&r1=684013&r2=684014&view=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=684014&view=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=684074&view=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=684074&view=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=684074&view=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=684074&view=auto =
svn commit: r684111 - /ibatis/trunk/java/mapper/
Author: cbegin Date: Fri Aug 8 14:55:28 2008 New Revision: 684111 URL: http://svn.apache.org/viewvc?rev=684111&view=rev Log: Removed file/folder Removed: ibatis/trunk/java/mapper/
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=684110&view=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=684112&view=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=684113&view=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=684115&view=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=684114&view=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=684116&view=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: r684119 - in /ibatis/trunk/java: ibatis-2-docs/ ibatis-2/ibatis-2-docs/
Author: cbegin Date: Fri Aug 8 14:59:29 2008 New Revision: 684119 URL: http://svn.apache.org/viewvc?rev=684119&view=rev Log: Moved remotely Added: ibatis/trunk/java/ibatis-2/ibatis-2-docs/ - copied from r684118, ibatis/trunk/java/ibatis-2-docs/ Removed: ibatis/trunk/java/ibatis-2-docs/
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=684117&view=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=684121&view=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=684118&view=rev Log: Added: ibatis/trunk/java/ibatis-2/
svn commit: r684122 - in /ibatis/trunk/java: ibatis-2/jpetstore5/ jpetstore/jpetstore5/
Author: cbegin Date: Fri Aug 8 15:00:05 2008 New Revision: 684122 URL: http://svn.apache.org/viewvc?rev=684122&view=rev Log: Moved remotely Added: ibatis/trunk/java/ibatis-2/jpetstore5/ - copied from r684121, ibatis/trunk/java/jpetstore/jpetstore5/ Removed: ibatis/trunk/java/jpetstore/jpetstore5/
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=684123&view=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=684125&view=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/