I have a class named as Films
and it has id
, filmName
, actionStatus
and so on. I want to take the filmName
s where its actionStatus=4
. There are many filmName
s with actionStatus=4
.
I tried to do it this way:
Session ses = model.DBManager.getInstance().getSession();
List<Films> film_list;
Criteria criFilm = ses.createCriteria(Films.class);
criFilm.add(Restrictions.eq("actionStatus", 4));
film_list = criFilm.list();
for (Films films : film_list) {
System.out.println("film details " + films.getFilmName());
}
I'm not getting the required outputs by the above code.
Please help.