public static List<AlertBean> fetchAlerts(StudentBean student) {

		List<AlertBean> catMap = new ArrayList<AlertBean>();
		
		ResultSet rs=null;
		Connection con=null;
		PreparedStatement ps=null;
		try{
			String sql="SELECT person_id, alert_description, viewed, alert_id "
					+ "FROM STUDENT_ALERTS "
					+ "WHERE person_id=?";
			con=ConnectionPool.getConnectionFromPool();
			ps=con.prepareStatement(sql);
			ps.setInt(1, student.getStudentId());
			rs=ps.executeQuery();
			while(rs.next())
			{
				AlertBean bean = new AlertBean();
				bean.setAlertDescription(rs.getString("ALERT_DESCRIPTION"));
				if(rs.getString("VIEWED").equalsIgnoreCase("N")){
					bean.setViewed(false);
				}else{
					bean.setViewed(true);
				}
				bean.setPersonid(rs.getInt("PERSON_ID"));
				bean.setAlertid(rs.getInt("ALERT_ID"));
				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;
	
		
	}