@SuppressWarnings("unchecked")
public <T extends AbstractMappingItem> List<T> getUidToMappingItems(
final ExternalResource resource, final MappingPurpose purpose, final AttributableType type) {
final List<T> items = getMappingItems(resource, MappingPurpose.SYNCHRONIZATION);
final AbstractMappingItem uidItem = type == AttributableType.USER ? new UMappingItem() : new RMappingItem();
BeanUtils.copyProperties(getAccountIdItem(resource), uidItem);
uidItem.setExtAttrName(Uid.NAME);
uidItem.setAccountid(false);
items.add((T) uidItem);
return items;