ibatis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbe...@apache.org
Subject svn commit: r744759 - in /ibatis/trunk/java/ibatis-3: ./ ibatis-3-core/src/test/java/com/ ibatis-3-core/src/test/java/domain/blog/mappers/ ibatis-3-core/src/test/java/org/apache/ibatis/api/ ibatis-3-core/src/test/java/org/apache/ibatis/parser/
Date Sun, 15 Feb 2009 21:24:51 GMT
Author: cbegin
Date: Sun Feb 15 21:24:51 2009
New Revision: 744759

URL: http://svn.apache.org/viewvc?rev=744759&view=rev
Log:
Moved mappers to a better package

Added:
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/AuthorMapper.java
      - copied, changed from r744749, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/domain/AuthorMapper.java
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/BlogMapper.java
      - copied, changed from r744749, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/domain/BlogMapper.java
Removed:
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/
Modified:
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/api/SqlSessionTest.java
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/AuthorMapper.xml
    ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/BlogMapper.xml
    ibatis/trunk/java/ibatis-3/version.properties

Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/AuthorMapper.java
(from r744749, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/domain/AuthorMapper.java)
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/AuthorMapper.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/AuthorMapper.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/domain/AuthorMapper.java&r1=744749&r2=744759&rev=744759&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/domain/AuthorMapper.java (original)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/AuthorMapper.java
Sun Feb 15 21:24:51 2009
@@ -1,4 +1,4 @@
-package com.domain;
+package domain.blog.mappers;
 
 import domain.blog.Author;
 

Copied: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/BlogMapper.java
(from r744749, ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/domain/BlogMapper.java)
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/BlogMapper.java?p2=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/BlogMapper.java&p1=ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/domain/BlogMapper.java&r1=744749&r2=744759&rev=744759&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/com/domain/BlogMapper.java (original)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/domain/blog/mappers/BlogMapper.java
Sun Feb 15 21:24:51 2009
@@ -1,4 +1,4 @@
-package com.domain;
+package domain.blog.mappers;
 
 import java.util.Map;
 import java.util.List;

Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/api/SqlSessionTest.java
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/api/SqlSessionTest.java?rev=744759&r1=744758&r2=744759&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/api/SqlSessionTest.java
(original)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/api/SqlSessionTest.java
Sun Feb 15 21:24:51 2009
@@ -12,8 +12,8 @@
 import java.util.List;
 import java.util.Map;
 
-import com.domain.AuthorMapper;
-import com.domain.BlogMapper;
+import domain.blog.mappers.AuthorMapper;
+import domain.blog.mappers.BlogMapper;
 
 public class SqlSessionTest extends BaseDataTest {
   private static SqlSessionFactory sqlMapper;
@@ -30,7 +30,7 @@
   public void shouldSelectAllAuthors() throws Exception {
     SqlSession session = sqlMapper.openSession();
     try {
-      List<Author> authors = session.selectList("com.domain.AuthorMapper.selectAllAuthors");
+      List<Author> authors = session.selectList("domain.blog.mappers.AuthorMapper.selectAllAuthors");
       assertEquals(2, authors.size());
     } finally {
       session.close();
@@ -42,7 +42,7 @@
     SqlSession session = sqlMapper.openSession();
     try {
       Author author = (Author) session.selectOne(
-          "com.domain.AuthorMapper.selectAuthor", new Author(101));
+          "domain.blog.mappers.AuthorMapper.selectAuthor", new Author(101));
       assertEquals(101, author.getId());
       assertEquals(Section.NEWS, author.getFavouriteSection());
     } finally {
@@ -55,7 +55,7 @@
     SqlSession session = sqlMapper.openSession();
     try {
       List<Author> authors = session.selectList(
-          "com.domain.AuthorMapper.selectAuthor", new Author(101));
+          "domain.blog.mappers.AuthorMapper.selectAuthor", new Author(101));
       assertEquals(101, authors.get(0).getId());
       assertEquals(Section.NEWS, authors.get(0).getFavouriteSection());
     } finally {
@@ -68,7 +68,7 @@
     SqlSession session = sqlMapper.openSession();
     try {
       ImmutableAuthor author = (ImmutableAuthor) session.selectOne(
-          "com.domain.AuthorMapper.selectImmutableAuthor", new Author(101));
+          "domain.blog.mappers.AuthorMapper.selectImmutableAuthor", new Author(101));
       assertEquals(101, author.getId());
       assertEquals(Section.NEWS, author.getFavouriteSection());
     } finally {
@@ -81,7 +81,7 @@
     SqlSession session = sqlMapper.openSession();
     try {
       Author author = (Author) session.selectOne(
-          "com.domain.AuthorMapper.selectAuthorWithInlineParams", new Author(101));
+          "domain.blog.mappers.AuthorMapper.selectAuthorWithInlineParams", new Author(101));
       assertEquals(101, author.getId());
     } finally {
       session.close();
@@ -93,8 +93,8 @@
     SqlSession session = sqlMapper.openSession();
     try {
       Author expected = new Author(500, "cbegin", "******", "cbegin@somewhere.com", "Something...",
null);
-      session.insert("com.domain.AuthorMapper.insertAuthor", expected);
-      Author actual = (Author) session.selectOne("com.domain.AuthorMapper.selectAuthor",
new Author(500));
+      session.insert("domain.blog.mappers.AuthorMapper.insertAuthor", expected);
+      Author actual = (Author) session.selectOne("domain.blog.mappers.AuthorMapper.selectAuthor",
new Author(500));
       assertNotNull(actual);
       assertEquals(expected.getId(), actual.getId());
       assertEquals(expected.getUsername(), actual.getUsername());
@@ -112,18 +112,18 @@
     Author original;
     Author updated;
     try {
-      original = (Author) session.selectOne("com.domain.AuthorMapper.selectAuthor", 101);
+      original = (Author) session.selectOne("domain.blog.mappers.AuthorMapper.selectAuthor",
101);
       original.setEmail("new@email.com");
-      session.update("com.domain.AuthorMapper.updateAuthor", original);
+      session.update("domain.blog.mappers.AuthorMapper.updateAuthor", original);
 
-      updated = (Author) session.selectOne("com.domain.AuthorMapper.selectAuthor", 101);
+      updated = (Author) session.selectOne("domain.blog.mappers.AuthorMapper.selectAuthor",
101);
       assertEquals(original.getEmail(), updated.getEmail());
     } finally {
       session.close();
     }
     try {
       session = sqlMapper.openSession();
-      updated = (Author) session.selectOne("com.domain.AuthorMapper.selectAuthor", 101);
+      updated = (Author) session.selectOne("domain.blog.mappers.AuthorMapper.selectAuthor",
101);
       assertEquals("jim@ibatis.apache.org", updated.getEmail());
     } finally {
       session.close();
@@ -136,11 +136,11 @@
     Author original;
     Author updated;
     try {
-      original = (Author) session.selectOne("com.domain.AuthorMapper.selectAuthor", 101);
+      original = (Author) session.selectOne("domain.blog.mappers.AuthorMapper.selectAuthor",
101);
       original.setEmail("new@email.com");
-      session.update("com.domain.AuthorMapper.updateAuthor", original);
+      session.update("domain.blog.mappers.AuthorMapper.updateAuthor", original);
 
-      updated = (Author) session.selectOne("com.domain.AuthorMapper.selectAuthor", 101);
+      updated = (Author) session.selectOne("domain.blog.mappers.AuthorMapper.selectAuthor",
101);
       assertEquals(original.getEmail(), updated.getEmail());
       session.commit();
     } finally {
@@ -148,7 +148,7 @@
     }
     try {
       session = sqlMapper.openSession();
-      updated = (Author) session.selectOne("com.domain.AuthorMapper.selectAuthor", 101);
+      updated = (Author) session.selectOne("domain.blog.mappers.AuthorMapper.selectAuthor",
101);
       assertEquals(original.getEmail(), updated.getEmail());
     } finally {
       session.close();
@@ -161,15 +161,15 @@
     try {
       final int id = 102;
 
-      List<Author> authors = session.selectList("com.domain.AuthorMapper.selectAuthor",
id);
+      List<Author> authors = session.selectList("domain.blog.mappers.AuthorMapper.selectAuthor",
id);
       assertEquals(1, authors.size());
 
-      session.delete("com.domain.AuthorMapper.deleteAuthor", id);
-      authors = session.selectList("com.domain.AuthorMapper.selectAuthor", id);
+      session.delete("domain.blog.mappers.AuthorMapper.deleteAuthor", id);
+      authors = session.selectList("domain.blog.mappers.AuthorMapper.selectAuthor", id);
       assertEquals(0, authors.size());
 
       session.rollback();
-      authors = session.selectList("com.domain.AuthorMapper.selectAuthor", id);
+      authors = session.selectList("domain.blog.mappers.AuthorMapper.selectAuthor", id);
       assertEquals(1, authors.size());
 
     } finally {
@@ -181,7 +181,7 @@
   public void shouldSelectBlogWithPostsAndAuthorUsingSubSelects() throws Exception {
     SqlSession session = sqlMapper.openSession();
     try {
-      Blog blog = (Blog) session.selectOne("com.domain.BlogMapper.selectBlogWithPostsUsingSubSelect",
1);
+      Blog blog = (Blog) session.selectOne("domain.blog.mappers.BlogMapper.selectBlogWithPostsUsingSubSelect",
1);
       assertEquals("Jim Business", blog.getTitle());
       assertEquals(2, blog.getPosts().size());
       assertEquals("Corn nuts", blog.getPosts().get(0).getSubject());
@@ -196,7 +196,7 @@
   public void shouldSelectBlogWithPostsAndAuthorUsingJoin() throws Exception {
     SqlSession session = sqlMapper.openSession();
     try {
-      Blog blog = (Blog) session.selectOne("com.domain.BlogMapper.selectBlogJoinedWithPostsAndAuthor",
1);
+      Blog blog = (Blog) session.selectOne("domain.blog.mappers.BlogMapper.selectBlogJoinedWithPostsAndAuthor",
1);
       assertEquals("Jim Business", blog.getTitle());
 
       final Author author = blog.getAuthor();
@@ -241,10 +241,10 @@
   public void shouldThrowExceptionIfTryingToAddStatementWithSameName() throws Exception {
     Configuration config = sqlMapper.getConfiguration();
     try {
-      config.addMappedStatement(config.getMappedStatement("com.domain.BlogMapper.selectBlogWithPostsUsingSubSelect"));
+      config.addMappedStatement(config.getMappedStatement("domain.blog.mappers.BlogMapper.selectBlogWithPostsUsingSubSelect"));
       fail("Expected exception to be thrown due to statement that already exists.");
     } catch (Exception e) {
-      assertTrue(e.getMessage().contains("already contains value for com.domain.BlogMapper.selectBlogWithPostsUsingSubSelect"));
+      assertTrue(e.getMessage().contains("already contains value for domain.blog.mappers.BlogMapper.selectBlogWithPostsUsingSubSelect"));
     }
   }
 
@@ -276,14 +276,14 @@
     int second = -1;
     SqlSession session = sqlMapper.openSession();
     try {
-      List<Author> authors = session.selectList("com.domain.AuthorMapper.selectAllAuthors");
+      List<Author> authors = session.selectList("domain.blog.mappers.AuthorMapper.selectAllAuthors");
       first = System.identityHashCode(authors);
     } finally {
       session.close();
     }
     session = sqlMapper.openSession();
     try {
-      List<Author> authors = session.selectList("com.domain.AuthorMapper.selectAllAuthors");
+      List<Author> authors = session.selectList("domain.blog.mappers.AuthorMapper.selectAllAuthors");
       second = System.identityHashCode(authors);
     } finally {
       session.close();

Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/AuthorMapper.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/AuthorMapper.xml?rev=744759&r1=744758&r2=744759&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/AuthorMapper.xml
(original)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/AuthorMapper.xml
Sun Feb 15 21:24:51 2009
@@ -4,7 +4,7 @@
     PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
     "http://ibatis.apache.org/dtd/ibatis-mapper-3.dtd">
 
-<mapper namespace="com.domain.AuthorMapper">
+<mapper namespace="domain.blog.mappers.AuthorMapper">
 
   <parameterMap id="selectAuthor"
                 type="domain.blog.Author">

Modified: ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/BlogMapper.xml
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/BlogMapper.xml?rev=744759&r1=744758&r2=744759&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/BlogMapper.xml
(original)
+++ ibatis/trunk/java/ibatis-3/ibatis-3-core/src/test/java/org/apache/ibatis/parser/BlogMapper.xml
Sun Feb 15 21:24:51 2009
@@ -4,12 +4,12 @@
     PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
     "http://ibatis.apache.org/dtd/ibatis-mapper-3.dtd">
 
-<mapper namespace="com.domain.BlogMapper">
+<mapper namespace="domain.blog.mappers.BlogMapper">
 
   <resultMap id="blogWithPosts" type="Blog">
     <id property="id" column="id"/>
     <result property="title" column="title"/>
-    <association property="author" column="author_id" select="com.domain.AuthorMapper.selectAuthorWithInlineParams"/>
+    <association property="author" column="author_id" select="domain.blog.mappers.AuthorMapper.selectAuthorWithInlineParams"/>
     <collection property="posts" column="id" select="selectPostsForBlog"/>
   </resultMap>
 

Modified: ibatis/trunk/java/ibatis-3/version.properties
URL: http://svn.apache.org/viewvc/ibatis/trunk/java/ibatis-3/version.properties?rev=744759&r1=744758&r2=744759&view=diff
==============================================================================
--- ibatis/trunk/java/ibatis-3/version.properties (original)
+++ ibatis/trunk/java/ibatis-3/version.properties Sun Feb 15 21:24:51 2009
@@ -1,5 +1,5 @@
 #Build version info
-#Sat Feb 14 23:23:36 MST 2009
+#Sun Feb 15 14:12:50 MST 2009
 version=3.0.0
-buildDate=2009/02/14 23\:23
-buildNum=119
+buildDate=2009/02/15 14\:12
+buildNum=123



Mime
View raw message