aspose file tools
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 Head First Android this week in the Android 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
 
It's not a secret anymore!