my dog learned polymorphism*
The moose likes Object Relational Mapping and the fly likes Give Me the Explanantion of below code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Give Me the Explanantion of below code" Watch "Give Me the Explanantion of below code" New topic
Author

Give Me the Explanantion of below code

kumar nandha
Greenhorn

Joined: May 14, 2013
Posts: 6
public Integer verifyUser(String username, String password)
{
Session session=HibernateSessionFactory.getSession();
Criteria criteria=session.createCriteria(Employees.class);
criteria.add(Expression.eq("username", username));
criteria.add(Expression.eq("password", password));
List list=criteria.list();
Employees employees=new Employees();
for(Iterator i=list.iterator();i.hasNext();)
{
employees=(Employees)i.next();
return employees.getType();
}
return -1;
}
 
 
subject: Give Me the Explanantion of below code
 
Similar Threads
Iteration of List in JSP
Quering on multiple tables using criteria api
AND/OR in Hibernate - Criteria object
Iteration of List in JSP
Caseinsensitive Search Hibernate API