2/13/2011

AmaterasERD 1.0.8 is now available!

Project Amateras released AmaterasERD 1.0.8 at 12 February 2011.

New features in this release:

  • Sybase support
  • In importing and exporting, table and column comments are mapped to logical name (Oracle and Sybase only)
  • Copy As Image from the context menu
  • Quick Outline ([CTRL]+[O])
  • Diagram font configuration
  • HTML generation tool from *.erd file which could be used in command-line

See details about AmaterasERD at:
http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=AmaterasERD

See details about new features in AmaterasERD 1.0.8 at:
http://sourceforge.jp/projects/amateras/wiki/AmaterasERD_1_0_8

You can download AmaterasERD 1.0.8 from:
http://sourceforge.jp/projects/amateras/downloads/50912/net.java.amateras.db_1.0.8.jar/

Enjoy your development!

1/15/2011

Unit Testting in Mirage

In the unit-testing for database access code, some testing frameworks such as DbUnit are available. However, as you know, to maintain test data is very painful.

Mirage proposes lightweight unit-testing without database for database access code. It's based on string matching of executed SQL and expected SQL. Executed SQLs don't reach to the database actually, they are intercepted and recorded to MirageTestContext by using MockSqlManager.

You can verify executed SQLs and these parameters through MirageTestContext as below:

@Test
public void testGetBookById(){
  // set MockSqlManager to the test target
  BookService bookService = new BookService();
  bookService.setSqlManager(new MockSqlManager());

  // configure results which would be 
  // returned by MockSqlManager.
  Book book = new Book();
  book.setBookName("Mirage in Action");

  MirageTestContext.addResult(book);

  // execute
  Book result = bookService.getBookById(new Long(100));

  // assert returned object
  assertEquals("Mirage in Action", book.getName);

  // verify the number of executed SQL
  MirageTestContext.verifySqlCount(1);

  // verify the executed SQL
  MirageTestContext.verifySqlByRegExp(0,
    "SELECT .* FROM BOOK " + 
    "WHERE ID = ? ORDER BY ID ASC", // verify SQL
    new Long(100)); // verify Parameters
}

As you see, you can also configure return values of MockSqlManager using MirageTestContext if it's necessary. You can write your test case more simple by static importing of MirageTestContext members.

Please note, the purpose of this way is not to verify whether executed SQLs are correct. It helps to find influence which is not anticipated by modification of database access code. So it requires to current database access code and SQLs are correct.

If your purpose of unit-testing for database access code is matches this concept, Mirage will decrease a cost of unit-testing and maintaining them very much.

Mirage 1.1.0 is now available!

Mirage is a simple SQL centric database access library. See the following URL to know about Mirage:

New features in Mirage 1.1.0:

Primary key generation support

  • @PrimaryKey annotation has new attributes generationType and generator. The generationType attribute supports GenerationType.APPLICATION, GenerationType.IDENTIY and GenerationType.SEQAUENCE.
  • The persistent attribute of @PrimaryKey annotation has been removed.

Improvement of unit testing support

New ConnectionProvider and Dialect

I wish that Mirage helps your development. Enjoy!

1/02/2011

Mirage 1.0.6 is now available!

Mirage is a simple SQL centric database access library. See the following URL to know about Mirage:

Here is the list of changes in Mirage 1.0.6:

  • Unit Testing support
    • Added MockSqlManager which is used in unit testing instead of SqlManager. See details about Unit Testing support at the UnitTest section.
  • Ant Task

In addition, Apache Click example is updated which contains examples of TestCase using MockSqlManager. You can get it from the download page.

I wish that Mirage helps your development. Enjoy!

12/19/2010

rdiff-backup browser

Project Amateras released rdiff-backup browser at Nov. 18, 2010.

rdiff-backup browser is a web application to browse backup histories of rdiff-backup. It is written in Java and works on the Java application server such as Apache Tomcat.

10/05/2010

Mirage 1.0.5 is now available!

Mirage is a simple SQL centric database access library. See the following URL to know about Mirage:

Here is the list of changes in Mirage 1.0.5:

  • Add new methods to SqlManager for batch insert/update/delete entities:
    • SqlManager#insertBatch()
    • SqlManager#updateBatch()
    • SqlManager#deleteBatch()
  • BugFix: NullPointerException which is caused in conversion from NULL column value to java.util.Date.
  • Possible to specify @In, @Out, @InOut, @ResultSet for setter / getter method.
  • Add new annotations @Table, @Column. These annotation are used to specify table and column name.
  • Entity Generation Tool (Experimental). See the EntityGen Javadoc to know how to use it.

In addition, Apache Click example is updated to use Apache Click 2.2.0 and Mirage 1.0.5. You can get it from the download page.

I wish that Mirage helps your development. Enjoy!

10/01/2010

Java Standard EL Functions 1.1.1 is available!

We released Java Standard EL Functions (JSEL) ver 1.1.1.

JSEL provides standard JSP-EL functions for web application development such as escaping HTML tags, URL encoding and formatting Date or Number. You can use it with many web frameworks which use JSP as view technologies.

Here is the list of new features in this release:

  • New functions to print message to JSP by log level
  • New functions to test whether log level is enabled

You can print message if the log log level is enabled using functions such as log:printDebug().

${log:printDebug('DEBUG level is enabled.')}

And also you can test whether log level is enabled using log:isDebugEnabled().

<c:if test="${log:isDebugEnabled()}">
  DEBUG level is enabled.
</c:if>

Please see the TLDDoc to know details of available functions.