extracting value from database with hibernateTemplate with where clause

List<Customer> customerList = (List<Customer>) hibernateTemplate.find("FROM Customer c where c.accountNo = ?0 and c.password = ?1",
accountNo, password);
if(customerList.size() != 0) return customerList.get(0);
return null;

Comments

Popular posts from this blog