dbuser/src/main/java/no/kantega/security/api/impl/dbuser/profile/DbUserProfileManager.java
/**
     * Search profiles by the given string in both name and surname
     * @param name - String to search by
     * @return SearchResult with all Profiles matching the given string.
     * @throws SystemException
     */
Search profiles by the given string in both name and surname
@param name - String to search by
@return SearchResult with all Profiles matching the given string.
Search profiles by the given string in both name and surname @param name - String to search by @return SearchResult with all Profiles matching the given string .
public SearchResult<Profile> searchProfiles(String name) throws SystemException {
        String query;
        WhereClause clause = querier.getQuery(name);
        query = clause.getWherePart();
        if(query.length() > 0) {
            query += " AND ";
        }
        query += " Domain = '" + domain + "'";
        String sql = "SELECT * from dbuserprofile WHERE " + query + " ORDER BY GivenName, Surname";
        List<Profile> results = getJdbcTemplate().query(sql, new UserProfileRowMapper(), clause.getParams().toArray());
        DefaultProfileSearchResult result = new DefaultProfileSearchResult();
        result.setResults(results);
        return result;
    }
public SearchResult < Profile > searchProfiles ( String name ) throws SystemException { String query ; WhereClause clause = querier . getQuery ( name ) ; query = clause . getWherePart ( ) ; if ( query . length ( ) > 0 ) { query += " AND " ; } query += " Domain = '" + domain + "'" ; String sql = "SELECT * from dbuserprofile WHERE " + query + " ORDER BY GivenName, Surname" ; List < Profile > results = getJdbcTemplate ( ) . query ( sql , new UserProfileRowMapper ( ) , clause . getParams ( ) . toArray ( ) ) ; DefaultProfileSearchResult result = new DefaultProfileSearchResult ( ) ; result . setResults ( results ) ; return result ; }
Search profiles by the given string in both name and surname
 @param name - String to search by
 @return SearchResult with all Profiles matching the given string.
Search profiles by the given string in both name and surname @param name - String to search by @return SearchResult with all Profiles matching the given string .