public List<StudentCatBean> fetchStudentCatMapping(String userid){
		List<StudentCatBean> catMap = new ArrayList<StudentCatBean>();
		
		ResultSet rs=null;
		Connection con=null;
		PreparedStatement ps=null;
		try{
			String sql="SELECT cat.CATEGORY_NAME,map.s_cat_id,map.c_id,map.s_id,p.userId "
					+ "FROM CATEGORY cat,STUDENT_CATEGORY_MAPPING map, PERSON p"
					+ "WHERE cat.categoryId=map.c_id"
					+ "AND map.s_id=p.id"
					+ "AND p.userId=?)";
			con=ConnectionPool.getConnectionFromPool();
			ps=con.prepareStatement(sql);
			ps.setString(1, userid);
			rs=ps.executeQuery();
			while(rs.next())
			{
				StudentCatBean bean = new StudentCatBean();
				bean.setCategoryId(rs.getInt("C_ID"));
				bean.setCategoryName(rs.getString("CATEGORY_NAME"));
				bean.setStudentCategoryId(rs.getInt("S_CAT_ID"));
				bean.setStudentId(rs.getInt("S_ID"));
				bean.setUserId(rs.getString("USERID"));
				catMap.add(bean);
			}
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
		finally{
			if(rs!=null)
			{
				try {
					rs.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
			if(ps!=null)
			{
				try {
					ps.close();
				} catch (SQLException e) {
					e.printStackTrace();
				}
			}
			if(con!=null)
			{
				try {
					ConnectionPool.addConnectionBackToPool(con);;
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		}
		
		return catMap;
	}