<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-38002802</id><updated>2012-01-15T03:36:43.292+09:00</updated><category term='ibator'/><category term='ibatis'/><category term='applescript'/><category term='java'/><category term='plugin'/><category term='stripes'/><category term='spring'/><title type='text'>@deprecated</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.harawata.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://blog.harawata.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Iwao AVE</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-SYcHkyHdxWY/AAAAAAAAAAI/AAAAAAAAAGA/lteh2NQ6T2Y/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-38002802.post-4340916021620902014</id><published>2011-12-09T03:24:00.001+09:00</published><updated>2011-12-09T04:40:24.238+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='stripes'/><title type='text'>Stripes : store action bean field value in session</title><summary type='text'>When storing a complex object in session, it becomes a little bit tricky to control binding and validation.
For simple objects, the wizard fields is sufficient, but I sometimes have to deal with an object which is too complex to keep it around using wizard fields.

If the object is stored in database, the common approach for editing POJO is to pre-polulate the object before binding as explained </summary><link rel='replies' type='application/atom+xml' href='http://blog.harawata.net/feeds/4340916021620902014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.harawata.net/2011/12/stripes-store-action-bean-field-value.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/4340916021620902014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/4340916021620902014'/><link rel='alternate' type='text/html' href='http://blog.harawata.net/2011/12/stripes-store-action-bean-field-value.html' title='Stripes : store action bean field value in session'/><author><name>Iwao AVE</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-SYcHkyHdxWY/AAAAAAAAAAI/AAAAAAAAAGA/lteh2NQ6T2Y/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38002802.post-2733457178455872227</id><published>2011-06-28T21:58:00.001+09:00</published><updated>2011-06-30T10:02:26.549+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='applescript'/><title type='text'>Convert HTML files to PDF using webkit rendering engine</title><summary type='text'>An AppleScript to convert HTML files to PDFs.
It uses wkhtmltopdf for the actual conversion task.
Using the AppleScript Editor application, save the code below as an AppleScript application (AppName.app for example).
You need to download wkhtmltopdf separately and copy the executable to Contents/MacOS/ directory inside the application package.

on run
 set htmls to choose file with prompt "PDFに変換</summary><link rel='replies' type='application/atom+xml' href='http://blog.harawata.net/feeds/2733457178455872227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.harawata.net/2011/06/convert-html-files-to-pdf-using-web-kit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/2733457178455872227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/2733457178455872227'/><link rel='alternate' type='text/html' href='http://blog.harawata.net/2011/06/convert-html-files-to-pdf-using-web-kit.html' title='Convert HTML files to PDF using webkit rendering engine'/><author><name>Iwao AVE</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-SYcHkyHdxWY/AAAAAAAAAAI/AAAAAAAAAGA/lteh2NQ6T2Y/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38002802.post-1247571525853246791</id><published>2009-04-23T22:33:00.006+09:00</published><updated>2010-12-03T00:06:02.262+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ibatis'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='ibator'/><title type='text'>Ibator's deleteByExample() and MySQL.</title><summary type='text'>If you use 'alias' when generating Ibator artifacts and your database is MySQL, you cannot use deleteByExample() because of MySQL bug #12811.
To workaround the issue, you can use the following plugin.  import java.util.List;

import org.apache.ibatis.ibator.api.FullyQualifiedTable;
import org.apache.ibatis.ibator.api.IbatorPluginAdapter;
import org.apache.ibatis.ibator.api.IntrospectedTable;
</summary><link rel='replies' type='application/atom+xml' href='http://blog.harawata.net/feeds/1247571525853246791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.harawata.net/2009/04/ibators-deletebyexample-and-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/1247571525853246791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/1247571525853246791'/><link rel='alternate' type='text/html' href='http://blog.harawata.net/2009/04/ibators-deletebyexample-and-mysql.html' title='Ibator&apos;s deleteByExample() and MySQL.'/><author><name>Iwao AVE</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-SYcHkyHdxWY/AAAAAAAAAAI/AAAAAAAAAGA/lteh2NQ6T2Y/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38002802.post-5523228880806788309</id><published>2009-04-23T22:25:00.004+09:00</published><updated>2010-12-03T00:05:46.061+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ibatis'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='ibator'/><title type='text'>Adds equals() and hashCode() to Ibator's example classes.</title><summary type='text'>Ibator includes EqualsHashCodePlugin by default.
It adds equals() and hashCode() methods to the domain classes.
As I want to add these methods to example classes, I wrote another plugin.
import java.util.Iterator;
import java.util.List;

import org.apache.ibatis.ibator.api.IbatorPluginAdapter;
import org.apache.ibatis.ibator.api.IntrospectedTable;
import </summary><link rel='replies' type='application/atom+xml' href='http://blog.harawata.net/feeds/5523228880806788309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.harawata.net/2009/04/adds-equals-and-hashcode-to-ibators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/5523228880806788309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/5523228880806788309'/><link rel='alternate' type='text/html' href='http://blog.harawata.net/2009/04/adds-equals-and-hashcode-to-ibators.html' title='Adds equals() and hashCode() to Ibator&apos;s example classes.'/><author><name>Iwao AVE</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-SYcHkyHdxWY/AAAAAAAAAAI/AAAAAAAAAGA/lteh2NQ6T2Y/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38002802.post-7804332422242916100</id><published>2009-04-23T22:06:00.008+09:00</published><updated>2010-12-03T00:06:38.767+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ibatis'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='ibator'/><title type='text'>Avoid RuntimeException when null is passed to Ibator's example class.</title><summary type='text'>Ibator's example classes are useful, but it throws RuntimeException when the passed value is null.
This is inconvenient when building a dynamic query conditions.

Instead of writing... 
Criteria criteria = someExample.createCriteria();
if (condition1 != null)
  criteria.andCondition1EqualTo(condition1);
if (condition2 != null)
  criteria.andCondition2EqualTo(condition2);
if (condition3 != null)
</summary><link rel='replies' type='application/atom+xml' href='http://blog.harawata.net/feeds/7804332422242916100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.harawata.net/2009/04/ibators-example-classes-are-useful-but.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/7804332422242916100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/7804332422242916100'/><link rel='alternate' type='text/html' href='http://blog.harawata.net/2009/04/ibators-example-classes-are-useful-but.html' title='Avoid RuntimeException when null is passed to Ibator&apos;s example class.'/><author><name>Iwao AVE</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-SYcHkyHdxWY/AAAAAAAAAAI/AAAAAAAAAGA/lteh2NQ6T2Y/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38002802.post-2521595450743496457</id><published>2009-02-22T00:07:00.006+09:00</published><updated>2009-02-22T02:05:21.033+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ibatis'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='ibator'/><title type='text'>Ibator plugin to add LIMIT clause to the example class</title><summary type='text'>This Ibator plugin adds setLimitClause() method to example class.


import java.util.Iterator;
import java.util.List;

import org.apache.ibatis.ibator.api.IbatorPluginAdapter;
import org.apache.ibatis.ibator.api.IntrospectedTable;
import org.apache.ibatis.ibator.api.dom.java.Field;
import org.apache.ibatis.ibator.api.dom.java.FullyQualifiedJavaType;
import </summary><link rel='replies' type='application/atom+xml' href='http://blog.harawata.net/feeds/2521595450743496457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.harawata.net/2009/02/this-ibator-plugin-adds-setlimitclause.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/2521595450743496457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/2521595450743496457'/><link rel='alternate' type='text/html' href='http://blog.harawata.net/2009/02/this-ibator-plugin-adds-setlimitclause.html' title='Ibator plugin to add LIMIT clause to the example class'/><author><name>Iwao AVE</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-SYcHkyHdxWY/AAAAAAAAAAI/AAAAAAAAAGA/lteh2NQ6T2Y/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-38002802.post-5498355950716104570</id><published>2009-02-11T23:36:00.018+09:00</published><updated>2010-12-03T00:05:11.284+09:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ibatis'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='ibator'/><title type='text'>Ibator plugins for spring annotation users.</title><summary type='text'>Ibator 1.2.x provides plugin architecture.
I like the plugin system and write some custom ones for my daily use.
The first plugin adds Spring's @Repository annotation to the DAO implementation class.
import java.util.List;

import org.apache.ibatis.ibator.api.IbatorPluginAdapter;
import org.apache.ibatis.ibator.api.IntrospectedTable;
import </summary><link rel='replies' type='application/atom+xml' href='http://blog.harawata.net/feeds/5498355950716104570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.harawata.net/2009/02/ibator-plugins-for-spring-annotation.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/5498355950716104570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/38002802/posts/default/5498355950716104570'/><link rel='alternate' type='text/html' href='http://blog.harawata.net/2009/02/ibator-plugins-for-spring-annotation.html' title='Ibator plugins for spring annotation users.'/><author><name>Iwao AVE</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-SYcHkyHdxWY/AAAAAAAAAAI/AAAAAAAAAGA/lteh2NQ6T2Y/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry></feed>
