permaculture playing cards*
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 Android Security Essentials Live Lessons 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;
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Give Me the Explanantion of below code
 
Similar Threads
Quering on multiple tables using criteria api
Iteration of List in JSP
Iteration of List in JSP
AND/OR in Hibernate - Criteria object
Caseinsensitive Search Hibernate API