File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

type casting

 
sharaf navas
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic