public Activity[] list () {
		
		Connection con = null;
		PreparedStatement statement = null;
		ResultSet rs = null;
		List<Activity> activities = new ArrayList<Activity>();
		
		try {
			
			con = ConnectionManager.getConnection();
			
			String searchQuery = "SELECT * FROM activities";
			
			statement = con.prepareStatement(searchQuery);
			
			rs = statement.executeQuery();
			
			while (rs.next()) {
				
				Activity activity = new Activity();
				activity.setId( rs.getInt("id") );
				activity.setName( rs.getString("name") );
				activity.setInstallationScriptLocation( rs.getString("installationScriptLocation") );
				activity.setStatus( rs.getString("status") );
				
				activities.add(activity);
			}
			
		} catch (SQLException e) {
			error = e.toString();
			e.printStackTrace();
		}
		
		finally {
			if (rs != null)	{
			    try {
			     	rs.close();
			    } catch (Exception e) { System.err.println(e); }
			        rs = null;
			    }
		     
		     if (statement != null) {
		        try {
		        	statement.close();
		        } catch (Exception e) { System.err.println(e); }
		        	statement = null;
		        }
		
		     if (con != null) {
		        try {
		        	con.close();
		        } catch (Exception e) { System.err.println(e); }
		
		        con = null;
		     }
		}
		return activities.toArray( new Activity [activities.size()] );
	}