here is a snippet of something i did
Code:
Object[] values = new Object[3];
values[0] = "published";
values[1] = new java.util.Date();
values[2] = new java.util.Date();
net.sf.hibernate.type.Type[] types = new net.sf.hibernate.type.Type[3];
types[0] = Hibernate.STRING;
types[1] = Hibernate.DATE;
types[2] = Hibernate.DATE;
java.util.List playlists = (java.util.List)sess.filter(frame.getList(),
"where this.status.name = ? and (this.showEdate is null or this.showEdate > ?) and (this.showSdate is null or this.showSdate <= ?) order by sort_order",
values,
types);