if(profileauthproxy.getEndEntityProfileAuthorization(admin,data.getEndEntityProfileId(),EndEntityProfileAuthorizationProxy.VIEW_RIGHTS))
if(profileauthproxy.getEndEntityProfileAuthorization(admin,data.getEndEntityProfileId(),EndEntityProfileAuthorizationProxy.VIEW_RIGHTS, LogEntry.MODULE_RA))
    public Collection query(Admin admin, Query query) throws IllegalQueryException, RemoteException{        debug(">query()");        Connection con = null;        PreparedStatement ps = null;        ResultSet rs = null;        ArrayList returnval = new ArrayList();        // Check if query is legal.        if(!query.isLegalQuery())          throw new IllegalQueryException();        try{           // Construct SQL query.            con = getConnection();                    ps = con.prepareStatement("select " + USERDATA_COL + " from UserData where " + query.getQueryString());            // Execute query.            rs = ps.executeQuery();            // Assemble result.            while(rs.next() && returnval.size() <= IUserAdminSessionRemote.MAXIMUM_QUERY_ROWCOUNT){              UserAdminData data = new UserAdminData(rs.getString(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getInt(5), rs.getInt(6)                                               , rs.getInt(10), rs.getInt(11)                                               , new java.util.Date(rs.getLong(8)), new java.util.Date(rs.getLong(9))                                               ,  rs.getInt(12), rs.getInt(13));                          data.setPassword(rs.getString(7));              if(globalconfiguration.getEnableEndEntityProfileLimitations()){                // Check if administrator is authorized to edit user.                if(profileauthproxy.getEndEntityProfileAuthorization(admin,data.getEndEntityProfileId(),EndEntityProfileAuthorizationProxy.VIEW_RIGHTS))                  returnval.add(data);              }              else                returnval.add(data);            }            debug("<query()");            return returnval;        }catch(Exception e){          throw new EJBException(e);        }finally{           try{             if(rs != null) rs.close();             if(ps != null) ps.close();             if(con!= null) con.close();           }catch(SQLException se){              se.printStackTrace();           }        }    } // query