File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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;
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Give Me the Explanantion of below code