I have a helper class like this:
public class FtHelper {
Session session = null;
public FtHelper() {
this.session = HibernateUtil.getSessionFactory().getCurrentSession();
}
public FinancialTransactions getByBeginDate(String beginDate) {
List<FinancialTransactions> FtList = null;
try {
org.hibernate.Transaction tx = session.beginTransaction();
Query q = session.createQuery(
"from FinancialTransactions where DATE=:date")
.setParameter("date", beginDate);
FtList = (List<FinancialTransactions>) q.list();
} catch (Exception e) {
e.printStackTrace();
}
return FtList.get(0);
}
}
I add a System.out.println(beginDate);
just above return, but it doesn't appear to print anything. I also used System.out.println("anytext")
, but it didn't work either. Where can I see that output message in Netbeans? By the way, I get the value beginDate
from my JSF.