• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

type casting

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all
please tell me how do i type cast a Object to a List;
please give me some exameple codes;

my Since i'm devoleping a hibernate app it may be confusing for a begginers any how here is
/////////////////////////////////////////////////////////
class EmployeeDAO {
public List findAll(EmployeeVO employeeVO)throws DataAccessLayerException{
List obj= null;
try{
startOperation();
Query qry=session.createQuery("from com.tt.notification.vo.EmployeeVO");
obj=qry.list();

}
catch(HibernateException e){
handleException(e);
}
finally {
HibernateFactory.close(session);
}
return obj;
}
}
////////////////////////

class empTest
{
/***
main method

*/

public void testFindAll()throws NotificationException{
EmployeeDAO empDao = new EmployeeDAO();
EmployeeVO employeeVO = new EmployeeVO();
List li= empDao.findAll(employeeVO);

}
//////////////
please help me thanks in advance
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
reply
    Bookmark Topic Watch Topic
  • New Topic