Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Give Me the Explanantion of below code

 
kumar nandha
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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;
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic