Author: jgbutler Date: Sun Mar 14 02:15:08 2010 New Revision: 922723 URL: http://svn.apache.org/viewvc?rev=922723&view=rev Log: [Ibator] more ducomentation and build updates
Modified: ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/exampleClassUsage.html ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/extendingExampleClass.html ibatis/java/ibator/trunk/core/ibator-core/doc/html/whatsNew.html ibatis/java/ibator/trunk/core/ibator-core/pom.xml ibatis/java/ibator/trunk/core/ibator-maven-plugin/pom.xml ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java2/pom.xml ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/pom.xml ibatis/java/ibator/trunk/core/ibator-systests-ibatis3/pom.xml ibatis/java/ibator/trunk/core/pom.xml ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.build/build.properties ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.eclipse.doc/html-src/eclipseui/buildingFromSVN.html Modified: ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/exampleClassUsage.html URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/exampleClassUsage.html?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/exampleClassUsage.html (original) +++ ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/exampleClassUsage.html Sun Mar 14 02:15:08 2010 @@ -99,6 +99,10 @@ example class (using JSE 5.0 parameteriz </pre> <p>Returned records will meet these criteria.</p> +<h2>Distinct Queries</h2> +<p>You can force queries to be DISTINCT by calling the <code>setDistinct(true)</code> +method on any example class.</p> + <h2>Criteria Classes</h2> <p>The <code>Criteria</code> inner class includes <code>andXXX</code> methods for each field, and each standard SQL predicate including:</p> Modified: ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/extendingExampleClass.html URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/extendingExampleClass.html?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/extendingExampleClass.html (original) +++ ibatis/java/ibator/trunk/core/ibator-core/doc/html/generatedobjects/extendingExampleClass.html Sun Mar 14 02:15:08 2010 @@ -32,43 +32,16 @@ specific needs of your application. Thi predicates, or for using database specific functions in your where clauses.</p> <p>The generated "example" class includes a nested inner class where the actual -functionality of the predicates exists. This inner class is always named <code>Criteria</code>. -If you wish to add predicates to dynamic where clauses, you must extend -both the "example" class and the <code>Criteria</code> class. For example, suppose there is a +functionality of the predicates exists. This inner class is always named <code>GeneratedCriteria</code>. +Ibator also generates an inner class named <code>Criteria</code> which extends +<code>GeneratedCriteria</code> and which you may +use for adding your own functions to the example classes. The <code>Criteria</code> +class will not be deleted by the Eclipse Java code merger, so you may add to it without +fear of losing your changes upon regeneration.</p> +<p>For example, suppose there is a table called CUSTOMER. Typically, Ibator would generate a class named -<code>CustomerExample</code>. To add functionality to the <code>CustomerExample</code> class, you must -follow these steps:</p> -<ul> - <li>Extend the <code>CustomerExample</code> class</li> - <li>Extend the nested <code>CustomerExample$Criteria</code> class</li> - <li>Override the <code>createCriteriaInternal()</code> method of the - <code>CustomerExample</code> class so that the extended Criteria - class is created</li> - <li>Add functionality to the extended Criteria class</li> -</ul> - -<p>The following code fragment shows the basic requirements of an extended -example class:</p> -<pre> -import ibatortest.generated.CustomerExample; - -public class ExtendedCustomerExample extends CustomerExample { - - @Override - protected Criteria createCriteriaInternal() { - return new ExtendedCriteria(); - } - - public static class ExtendedCriteria extends CustomerExample.Criteria { - - // add additional predicate support here... - - } -} -</pre> - -<p>Once the basic class is created, adding additional predicates is a matter -of adding additional methods to the extended <code>Criteria</code> class.</p> +<code>CustomerExample</code>. To add functionality to the <code>CustomerExample</code> class, you +should add additional methods to the <code>CustomerExample.Criteria</code> class.</p> <h2>Extending vs. Plugging In</h2> <p>If you find that you are extending the example classes frequently, it might be @@ -82,7 +55,8 @@ as demonstrated by the class <p>Ibator generates a dynamic SQL fragment that allows virtually unlimited where clauses to be created at run-time. To accomplish this, the generated SQL fragment supports four broad types of SQL predicates. For each type of -SQL predicate, there is a corresponding method in the generated <code>Criteria</code> class +SQL predicate, there is a corresponding method in the <code>GeneratedCriteria</code> +inner class that can be used to add a predicate to the dynamic where clause.</p> <h3>1. Simple String Substitution</h3> @@ -92,7 +66,7 @@ include:</p> <p><code>FIRST_NAME is null</code><br/> <code>LAST_NAME is not null</code></p> -<p>The generated <code>Criteria</code> class method for this predicate is:</p> +<p>The <code>GeneratedCriteria</code> class method for this predicate is:</p> <code>addCriterion(String anyString)</code> <p>Where "anyString" is the string to be substituted into the where clauses. @@ -103,9 +77,9 @@ name search. In MySQL, the predicate sh <code>SOUNDEX(FIRST_NAME) = SOUNDEX('frod')</code> <p>This predicate is too complex to use one of the other methods, so it must be inserted into the where clause by simple string substitution. Add the following -method to the <code>ExtendedCriteria</code> for this functionality:</p> +method to the <code>Criteria</code> inner class for this functionality:</p> <pre> -public ExtendedCriteria andFirstNameSoundsLike(String value) { +public Criteria andFirstNameSoundsLike(String value) { StringBuffer sb = new StringBuffer("SOUNDEX(FIRST_NAME) = SOUNDEX('"); sb.append(value); sb.append("')"); @@ -118,8 +92,8 @@ public ExtendedCriteria andFirstNameSoun <p>The following code shows the use of this new functionality with the <code>selectByExample</code> method:</p> <pre> -ExtendedExample example = new ExtendedExample(); -ExtendedCriteria criteria = (ExtendedCriteria) example.createCriteria(); +CustomerExample example = new CustomerExample(); +Criteria criteria = example.createCriteria(); criteria.andFirstNameSoundsLike("frod"); List results = selectByExample(example); </pre> Modified: ibatis/java/ibator/trunk/core/ibator-core/doc/html/whatsNew.html URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-core/doc/html/whatsNew.html?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/ibator-core/doc/html/whatsNew.html (original) +++ ibatis/java/ibator/trunk/core/ibator-core/doc/html/whatsNew.html Sun Mar 14 02:15:08 2010 @@ -127,6 +127,7 @@ to iBATIS 3.x only requires two changes <li>Addedd support for "distinct" on select by example methods</li> <li>Added new "or" method to example classes</li> <li>Added new "useCompoundPropertyNames" property on <table></li> + <li>Enabled a far simpler method for extending the example classes</li> </ul> Modified: ibatis/java/ibator/trunk/core/ibator-core/pom.xml URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-core/pom.xml?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/ibator-core/pom.xml (original) +++ ibatis/java/ibator/trunk/core/ibator-core/pom.xml Sun Mar 14 02:15:08 2010 @@ -90,19 +90,6 @@ </plugins> </reporting> - <licenses> - <license> - <name>Apache 2</name> - <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> - <distribution>repo</distribution> - </license> - </licenses> - - <organization> - <name>The Apache Software Foundation</name> - <url>http://www.apache.org</url> - </organization> - <dependencies> <dependency> <groupId>log4j</groupId> @@ -130,4 +117,10 @@ </dependency> </dependencies> + <scm> + <connection>scm:svn:http://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-core/</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-core/</developerConnection> + <tag>HEAD</tag> + <url>http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-core/</url> + </scm> </project> Modified: ibatis/java/ibator/trunk/core/ibator-maven-plugin/pom.xml URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-maven-plugin/pom.xml?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/ibator-maven-plugin/pom.xml (original) +++ ibatis/java/ibator/trunk/core/ibator-maven-plugin/pom.xml Sun Mar 14 02:15:08 2010 @@ -36,14 +36,6 @@ </execution> </executions> </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <version>2.5</version> - <configuration> - <updateReleaseInfo>true</updateReleaseInfo> - </configuration> - </plugin> </plugins> </build> <dependencies> @@ -69,4 +61,10 @@ <version>2.1.0</version> </dependency> </dependencies> + <scm> + <connection>scm:svn:http://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-maven-plugin/</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-maven-plugin/</developerConnection> + <tag>HEAD</tag> + <url>http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-maven-plugin/</url> + </scm> </project> Modified: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java2/pom.xml URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java2/pom.xml?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java2/pom.xml (original) +++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java2/pom.xml Sun Mar 14 02:15:08 2010 @@ -102,4 +102,10 @@ <scope>test</scope> </dependency> </dependencies> + <scm> + <connection>scm:svn:http://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java2/</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java2/</developerConnection> + <tag>HEAD</tag> + <url>http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java2/</url> + </scm> </project> Modified: ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/pom.xml URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/pom.xml?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/pom.xml (original) +++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/pom.xml Sun Mar 14 02:15:08 2010 @@ -102,4 +102,10 @@ <scope>test</scope> </dependency> </dependencies> + <scm> + <connection>scm:svn:http://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/</developerConnection> + <tag>HEAD</tag> + <url>http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis2-java5/</url> + </scm> </project> Modified: ibatis/java/ibator/trunk/core/ibator-systests-ibatis3/pom.xml URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis3/pom.xml?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/ibator-systests-ibatis3/pom.xml (original) +++ ibatis/java/ibator/trunk/core/ibator-systests-ibatis3/pom.xml Sun Mar 14 02:15:08 2010 @@ -74,13 +74,6 @@ <version>4.6</version> <scope>test</scope> </dependency> -<!-- - <dependency> - <groupId>org.apache.ibatis</groupId> - <artifactId>ibatis-3-core</artifactId> - <version>3.0-SNAPSHOT</version> - </dependency> ---> <dependency> <groupId>org.apache.ibatis</groupId> <artifactId>ibatis-sqlmap</artifactId> @@ -93,4 +86,10 @@ <scope>test</scope> </dependency> </dependencies> + <scm> + <connection>scm:svn:http://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-systests-ibatis3/</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/ibator-systests-ibatis3/</developerConnection> + <tag>HEAD</tag> + <url>http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/ibator-systests-ibatis3/</url> + </scm> </project> Modified: ibatis/java/ibator/trunk/core/pom.xml URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/pom.xml?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/core/pom.xml (original) +++ ibatis/java/ibator/trunk/core/pom.xml Sun Mar 14 02:15:08 2010 @@ -1,6 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <project> <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache</groupId> + <artifactId>apache</artifactId> + <version>7</version> + </parent> <groupId>org.apache.ibatis.ibator</groupId> <artifactId>ibator</artifactId> <name>ibator</name> @@ -14,28 +19,24 @@ <module>ibator-systests-ibatis3</module> </modules> -<!-- - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-deploy-plugin</artifactId> - <version>2.5</version> - <configuration> - <skip>true</skip> - </configuration> - </plugin> - </plugins> - </build> ---> + <licenses> + <license> + <name>Apache 2</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> - <distributionManagement> - <repository> - <uniqueVersion>false</uniqueVersion> - <id>local</id> - <name>Local Repository</name> - <url>file:/Temp/IbatorDeploy</url> - <layout>default</layout> - </repository> - </distributionManagement> + <organization> + <name>The Apache Software Foundation</name> + <url>http://www.apache.org</url> + </organization> + + <scm> + <connection>scm:svn:http://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/</connection> + <developerConnection>scm:svn:https://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/</developerConnection> + <tag>HEAD</tag> + <url>http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/core/</url> + </scm> + </project> \ No newline at end of file Modified: ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.build/build.properties URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.build/build.properties?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.build/build.properties (original) +++ ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.build/build.properties Sun Mar 14 02:15:08 2010 @@ -30,7 +30,7 @@ runPackager=true #archiveNamePrefix= # The prefix that will be used in the generated archive. -archivePrefix= +archivePrefix= eclipse # The location underwhich all of the build output will be collected. collectingFolder=${archivePrefix} Modified: ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.eclipse.doc/html-src/eclipseui/buildingFromSVN.html URL: http://svn.apache.org/viewvc/ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.eclipse.doc/html-src/eclipseui/buildingFromSVN.html?rev=922723&r1=922722&r2=922723&view=diff ============================================================================== --- ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.eclipse.doc/html-src/eclipseui/buildingFromSVN.html (original) +++ ibatis/java/ibator/trunk/eclipse/org.apache.ibatis.ibator.eclipse.doc/html-src/eclipseui/buildingFromSVN.html Sun Mar 14 02:15:08 2010 @@ -212,7 +212,9 @@ follow these steps:</p> <p>Once the build executes successfully, the new feature will be available on your local drive at <code>\Temp\ibator.build\I.TestBuild\org.apache.ibatis.ibator-TestBuild.zip</code> -unless you change the <code>buildDirectory</code> property above. +unless you change the <code>buildDirectory</code> property above. The easiest way +to install this new version of the feature is to unzip the feature archive into +the <code>dropins</code> directory of an Eclipse installation. </p> </body>