Per AbstractQueryPersonAttributeDao, this method returns "unmapped
attributes" which are transformed using the resultAttributeMapping
collection.  Use Attribute.name (rather than Attribute.friendlyName) in
these mapping definitions.
776799
@Override
    protected List<IPersonAttributes> getPeopleForQuery(QueryBuilder queryBuilder, String queryUserName) {

        final String currentUserName = currentUserProvider.getCurrentUserName();
        ;
        if (currentUserName == null) {
            this.logger.warn("A null name was returned by the currentUserProvider, returning null.");
            return Collections.emptyList();
        }

        if (currentUserName.equals(queryUserName)) {
            if (this.logger.isDebugEnabled()) {
                this.logger.debug("Adding attributes from the SAMLCredential for user " + currentUserName);
            }

            Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
            if (authentication != null) {
                SAMLCredential credential = (SAMLCredential) authentication.getCredentials();

                if (credential != null) {

                    // Provide some optional, TRACE-level logging for what we found
                    if (logger.isTraceEnabled()) {
                        StringBuilder msg = new StringBuilder();
                        msg.append("Credential obtained!");
                        for (Attribute a : credential.getAttributes()) {
                            msg.append("\n    a.getName()=").append(a.getName())
                                    .append("\n    a.getFriendlyName()=").append(a.getFriendlyName());
                            for (XMLObject xmlo : a.getAttributeValues()) {
                                    String str = extractStringValue(xmlo);
                                    msg.append("\n        value="+str);
                            }
                        }
                        logger.trace(msg.toString());
                    }

                    // Marshall what we found into an (unmapped) IPersonAttributes object
                    final Map<String, List<Object>> attributes = new HashMap<>();
                    for (Attribute a : credential.getAttributes()) {
                        List<Object> list = new ArrayList<Object>();
                        for (XMLObject xmlo : a.getAttributeValues()) {
                            String str = extractStringValue(xmlo);
                            if (str != null) {
                                list.add(str);
                            }
                        }
                        attributes.put(a.getName(), list);
                    }
                    final IPersonAttributes personAttributes = new CaseInsensitiveNamedPersonImpl(currentUserName, attributes);
                    return Collections.singletonList(personAttributes);
                }

            }
        } else {
            // Optionally log the fact that we _didn't_ add attributes
            if (logger.isTraceEnabled()) {
                logger.trace("Skipping this DAO because "
                        + "!currentUserName.equals(queryUserName);  currentUserName="
                        + currentUserName + ", queryUserName=" + queryUserName);
            }
        }

        return Collections.emptyList();

    }
170352
public static ImmutableSet<ResultAttribute> forNames(@Nonnull Collection<String> attributeNames) {
		ImmutableSet.Builder<ResultAttribute> builder = ImmutableSet.<ResultAttribute>builder();
		for (String attributeName : attributeNames) {
			builder.add(forName(attributeName));
		}
		return builder.build();
	}
730110
String getAttributeName(Method getter) {
        synchronized (attributeNameCache) {
            if ( !attributeNameCache.containsKey(getter) ) {

                // First check for a hash key annotation
                DynamoDBHashKey hashKeyAnnotation = getter.getAnnotation(DynamoDBHashKey.class);
                if ( hashKeyAnnotation != null && hashKeyAnnotation.attributeName() != null
                        && hashKeyAnnotation.attributeName().length() > 0 )
                    return hashKeyAnnotation.attributeName();

                // Then a range key
                DynamoDBRangeKey rangeKey = getter.getAnnotation(DynamoDBRangeKey.class);
                if ( rangeKey != null && rangeKey.attributeName() != null && rangeKey.attributeName().length() > 0 )
                    return rangeKey.attributeName();

                // Then an attribute
                DynamoDBAttribute attribute = getter.getAnnotation(DynamoDBAttribute.class);
                if ( attribute != null && attribute.attributeName() != null && attribute.attributeName().length() > 0 )
                    return attribute.attributeName();

                // Finally a version attribute
                DynamoDBVersionAttribute version = getter.getAnnotation(DynamoDBVersionAttribute.class);
                if ( version != null && version.attributeName() != null && version.attributeName().length() > 0 )
                    return version.attributeName();

                // Default to method name
                String attributeName = null;
                if ( getter.getName().startsWith("get") ) {
                    attributeName = getter.getName().substring("get".length());
                } else if ( getter.getName().startsWith("is") ) {
                    attributeName = getter.getName().substring("is".length());
                } else {
                    throw new DynamoDBMappingException("Getter must begin with 'get' or 'is'");
                }

                // Lowercase the first letter of the name
                attributeName = attributeName.substring(0, 1).toLowerCase() + attributeName.substring(1);
                attributeNameCache.put(getter, attributeName);
            }
        }
        
        return attributeNameCache.get(getter);
    }
488716
public static Map<String, Object> getAttributeMap(ServletRequest req) {

        if (req instanceof CmsFlexRequest) {
            return ((CmsFlexRequest)req).getAttributeMap();
        }
        Map<String, Object> attrs = new HashMap<String, Object>();
        Enumeration<String> atrrEnum = CmsCollectionsGenericWrapper.enumeration(req.getAttributeNames());
        while (atrrEnum.hasMoreElements()) {
            String key = atrrEnum.nextElement();
            Object value = req.getAttribute(key);
            attrs.put(key, value);
        }
        return attrs;
    }
504510
@Override
    public Attribute getAttributeByName(QName name)
    {
        if (mAttrs == null) {
            return null;
        }
        return mAttrs.get(name);
    }
648732
public Iterable<Attribute> getLookupAttributes() {
    Iterable<Attribute> lookupAttributes = getOwnLookupAttributes();
    EntityType extend = getExtends();
    if (extend != null) {
      lookupAttributes = concat(lookupAttributes, extend.getLookupAttributes());
    }
    return lookupAttributes;
  }
330351
public static Map<String, String> convertToAttributeMap(NamedNodeMap _nodeMap) {
        Map<String, String> map = new LinkedHashMap<>();
        for (int i = 0; i < _nodeMap.getLength(); i++) {
            Node node = _nodeMap.item(i);
            map.put(node.getNodeName(), node.getNodeValue());
        }
        return map;
    }
750733
@Deprecated
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map<String, PrimitiveAttribute<?>> getAttributes() {
		if (!isPrimitiveOnly()) {
			throw new UnsupportedOperationException("Primitive API not supported for nested association values");
		}
		return (Map) attributes;
	}
1303602
@Override
    public final Set<IPersonAttributes> getPeopleWithMultivaluedAttributes(
            Map<String, List<Object>> query) {
        Validate.notNull(query, "query may not be null.");

        // Generate the query to pass to the subclass
        final LocalAccountQuery queryBuilder = this.generateQuery(query);
        if (queryBuilder == null) {
            this.logger.debug(
                    "No queryBuilder was generated for query " + query + ", null will be returned");

            return null;
        }

        // Get the username from the query, if specified
        final IUsernameAttributeProvider usernameAttributeProvider =
                this.getUsernameAttributeProvider();

        // Execute the query in the subclass
        final List<ILocalAccountPerson> unmappedPeople = localAccountDao.getPeople(queryBuilder);
        if (unmappedPeople == null) {
            return null;
        }

        // Map the attributes of the found people according to resultAttributeMapping if it is set
        final Set<IPersonAttributes> mappedPeople = new LinkedHashSet<IPersonAttributes>();
        for (final ILocalAccountPerson unmappedPerson : unmappedPeople) {
            final IPersonAttributes mappedPerson = this.mapPersonAttributes(unmappedPerson);
            mappedPeople.add(mappedPerson);
        }

        return Collections.unmodifiableSet(mappedPeople);
    }
298633
@Override
    public Map<String, List<Object>> getAttributes() {
        for (final IAdditionalDescriptors additionalDescriptors : delegateDescriptors) {
            final Map<String, List<Object>> attributes = additionalDescriptors.getAttributes();
            if (attributes != null && !attributes.isEmpty()) {
                return attributes;
            }
        }

        return Collections.emptyMap();
    }
398802
@Override
    public ResultSet getAttributes(String catalog, String schemaPattern, String typeNamePattern, String attributeNamePattern) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
381612
public Map<String, Object> getAttributes() {
        if (attributes == null) {
            return null;
        }
        Lock lock = lockForRead();
        try {
            return cloneData(attributes);
        } finally {
            lock.unlock();
        }
    }
82545
@Override
    public List<Object> getAttributeValues(String name) {
        if (name == null) {
            throw new IllegalArgumentException("name cannot be null");
        }

        for (LocalAccountPersonAttributeImpl attribute : attributes) {
            if (name.equals(attribute.getName())) {
                return this.getObjectValues(attribute);
            }
        }

        return null;
    }
1298482
public Iterable<Attribute> getOwnLookupAttributes() {
    List<Attribute> ownLookupAttrs =
        stream(getOwnAllAttributes())
            .filter(attr -> attr.getLookupAttributeIndex() != null)
            .collect(toCollection(ArrayList::new));
    if (ownLookupAttrs.size() > 1) {
      ownLookupAttrs.sort(
          (o1, o2) -> o1.getLookupAttributeIndex() < o2.getLookupAttributeIndex() ? -1 : 1);
    }
    return ownLookupAttrs;
  }
240342
public void setUnmappedAttributes(java.util.Collection<UnmappedAttribute> unmappedAttributes) {
        if (unmappedAttributes == null) {
            this.unmappedAttributes = null;
            return;
        }

        this.unmappedAttributes = new java.util.ArrayList<UnmappedAttribute>(unmappedAttributes);
    }
461373
private boolean isMapAttribute(PluralAttribute<? super X, ?, ?> attribute)
    {
        return attribute != null && attribute.getCollectionType().equals(CollectionType.MAP);
    }
1228911
private int attributeMap(String name) {
        Integer num = map.get(name);
        if (num == null) {
            return 0;
        }
        return num.intValue();
    }