want to list all availble books in library by publisher. it is listing not availables also.
Code:
public List<Book> findByPublisher(String publisher) { Book b = new Book(); Status status = new Status(); status.setId(Book.STATUS_AVAILABLE); b.setStatus(status);//this filter is not working b.setPublisher(publisher); return (List<Book>) this.hibernateTemplate.findByExample(b); }
Comment