public List<wholeapt> listAllPostings(String type) throws IOException{
		String resource = "orm/configuration.xml";
		Reader reader = Resources.getResourceAsReader(resource);
		SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(reader);
		SqlSession session = sessionFactory.openSession();
		try{
			if(type.equals("whole")){
				wholeaptlist=new ArrayList<wholeapt>();
				wholeaptlist=session.selectList("selectallwholeaptpost");
			}
			if(type.equals("share")){
				wholeaptlist=new ArrayList<wholeapt>();
				wholeaptlist=session.selectList("selectallsharedaptpost");
			}
			if(type.equals("sublease")){
				wholeaptlist=new ArrayList<wholeapt>();
				wholeaptlist=session.selectList("selectallsubleaseaptpost");
			}
		
			System.out.print(wholeaptlist.size());
			return wholeaptlist;

		}finally{
			session.close();
		}
	}