Return list of propertyDto by component uuid, sorted from project to lowest module
489835
private Multimap<String, PropertyDto> loadComponentSettings(DbSession dbSession, Optional<String> key, ComponentDto component) {
    List<String> componentUuids = DOT_SPLITTER.splitToList(component.moduleUuidPath());
    List<ComponentDto> componentDtos = dbClient.componentDao().selectByUuids(dbSession, componentUuids);
    Set<Long> componentIds = componentDtos.stream().map(ComponentDto::getId).collect(Collectors.toSet());
    Map<Long, String> uuidsById = componentDtos.stream().collect(Collectors.toMap(ComponentDto::getId, ComponentDto::uuid));
    List<PropertyDto> properties = key.isPresent() ? dbClient.propertiesDao().selectPropertiesByKeysAndComponentIds(dbSession, Collections.singleton(key.get()), componentIds)
      : dbClient.propertiesDao().selectPropertiesByComponentIds(dbSession, componentIds);

    Multimap<String, PropertyDto> propertyDtosByUuid = TreeMultimap.create(Ordering.explicit(componentUuids), Ordering.arbitrary());
    for (PropertyDto propertyDto : properties) {
      Long componentId = propertyDto.getResourceId();
      String componentUuid = uuidsById.get(componentId);
      propertyDtosByUuid.put(componentUuid, propertyDto);
    }
    return propertyDtosByUuid;
  }
532315
def show(ctx, component):
    """"""

    col = ctx.obj['col']

    if col.count({'name': component}) > 1:
        log('More than one component configuration of this name! Try '
            'one of the uuids as argument. Get a list with "config '
            'list"')
        return

    if component is None:
        configurations = col.find()
        for configuration in configurations:
            log("%-15s : %s" % (configuration.name,
                                configuration.uuid),
                emitter='MANAGE')
    else:
        configuration = col.find_one({'name': component})

        if configuration is None:
            configuration = col.find_one({'uuid': component})

        if configuration is None:
            log('No component with that name or uuid found.')
            return

        print(json.dumps(configuration.serializablefields(), indent=4))
214175
def _get_property_dict(schema):
    
    pdict = {}
    for k, v in schema['properties'].items():
        pdict[k] = {}
        if 'items' in v and 'properties' in v['items']:
            pdict[k] = _get_property_dict(v['items'])
    pdict[settings.LEVEL_FIELD] = {}
    return pdict
664744
def get_uids(self, project=None):
        
        self._update()

        if not project or project.endswith('all_projects'):
            return [self._gen_uid(task['uuid']) for project in self._tasks for task in self._tasks[project].values()]

        if basename(project) not in self._tasks:
            return []

        return [self._gen_uid(uuid) for uuid in self._tasks[basename(project)]]
122171
function(props) {
    return function (obj1, obj2) {
      var i = 0, result = 0, numberOfProperties = props.length;
      while(result === 0 && i < numberOfProperties) {
        result = dynamicSort(props[i])(obj1, obj2);
        i++;
      }
      return result;
    }
  }
1018152
def get_raw_import_values(self):  # pragma: no cover, deprecation
        
        properties = ['timeperiod_name', 'alias', 'use', 'register']
        res = {}
        for prop in properties:
            if hasattr(self, prop):
                val = getattr(self, prop)
                res[prop] = val
        # Now the unresolved one. The only way to get ride of same key things is to put
        # directly the full value as the key
        for other in self.unresolved:
            res[other] = ''
        return res
567706
def get_dot_properties(prefix, props, remove_prefix):
    # type: (str, Dict[str, Any], bool) -> Dict[str, Any]
    
    result_props = {}
    if props:
        dot_keys = [x for x in props.keys() if x.startswith(prefix + ".")]
        for dot_key in dot_keys:
            if remove_prefix:
                new_key = dot_key[len(prefix) + 1 :]
            else:
                new_key = dot_key
            result_props[new_key] = props.get(dot_key)
    return result_props
480494
def Compare(fromMo, toMo, diff):
	
	from UcsBase import UcsUtils

	if (fromMo.classId != toMo.classId):
		return CompareStatus.TypesDifferent

	for prop in UcsUtils.GetUcsPropertyMetaAttributeList(str(fromMo.classId)):
		propMeta = UcsUtils.IsPropertyInMetaIgnoreCase(fromMo.classId, prop)
		if propMeta != None:
			if ((propMeta.access == UcsPropertyMeta.Internal) or (propMeta.access == UcsPropertyMeta.ReadOnly) or (
						prop in toMo._excludePropList)):
				continue
			if ((toMo.__dict__.has_key(prop)) and (fromMo.getattr(prop) != toMo.getattr(prop))):
				diff.append(prop)

	if (len(diff) > 0):
		return CompareStatus.PropsDifferent

	return CompareStatus.Equal
1193321
def _get_properties(self, fldstr):
        """"""
        prop2val = {}
        props = self._rd_fld_vals("Properties", fldstr, False)  # Get set
        go_evidence = None
        for prop in props:
            # There can be more properties than 'go_evidence',
            # but currently we see only 'go_evidence'.
            # Upon encountering updates, evaluate and update code to support ...
            if prop[:12] == 'go_evidence=':
                assert go_evidence is None, "MORE THAN ONE EVIDENCE CODE FOUND"
                go_evidence = prop[12:]
            else:
                assert False, "UNPROGRAMMED PROPERTY({P})".format(P=prop)
        ## TBD: Is 'go_evidence' still used? Replaced by ECO? And eco2group
        ## assert go_evidence is not None, "go_evidence == None"
        ## prop2val['go_evidence'] = go_evidence
        if go_evidence is not None:
            prop2val['go_evidence'] = go_evidence
        return prop2val
875880
def _property_search(self, fobj):
        """"""
        # Get class object
        scontext = fobj.f_locals.get("self", None)
        class_obj = scontext.__class__ if scontext is not None else None
        if not class_obj:
            del fobj, scontext, class_obj
            return None
        # Get class properties objects
        class_props = [
            (member_name, member_obj)
            for member_name, member_obj in inspect.getmembers(class_obj)
            if isinstance(member_obj, property)
        ]
        if not class_props:
            del fobj, scontext, class_obj
            return None
        class_file = inspect.getfile(class_obj).replace(".pyc", ".py")
        class_name = self._callables_obj.get_callable_from_line(
            class_file, inspect.getsourcelines(class_obj)[1]
        )
        # Get properties actions
        prop_actions_dicts = {}
        for prop_name, prop_obj in class_props:
            prop_dict = {"fdel": None, "fget": None, "fset": None}
            for action in prop_dict:
                action_obj = getattr(prop_obj, action)
                if action_obj:
                    # Unwrap action object. Contracts match the wrapped
                    # code object while exceptions registered in the
                    # body of the function/method which has decorators
                    # match the unwrapped object
                    prev_func_obj, next_func_obj = (
                        action_obj,
                        getattr(action_obj, "__wrapped__", None),
                    )
                    while next_func_obj:
                        prev_func_obj, next_func_obj = (
                            next_func_obj,
                            getattr(next_func_obj, "__wrapped__", None),
                        )
                    prop_dict[action] = [
                        id(_get_func_code(action_obj)),
                        id(_get_func_code(prev_func_obj)),
                    ]
            prop_actions_dicts[prop_name] = prop_dict
        # Create properties directory
        func_id = id(fobj.f_code)
        desc_dict = {"fget": "getter", "fset": "setter", "fdel": "deleter"}
        for prop_name, prop_actions_dict in prop_actions_dicts.items():
            for action_name, action_id_list in prop_actions_dict.items():
                if action_id_list and (func_id in action_id_list):
                    prop_name = ".".join([class_name, prop_name])
                    del fobj, scontext, class_obj, class_props
                    return "{prop_name}({prop_action})".format(
                        prop_name=prop_name, prop_action=desc_dict[action_name]
                    )
        return None
302796
function(property, sorted) {
            var setters = this.__collectAllPropertyValues.apply(this, ['__setters', 1].concat(property || []));

            if (!property) {
                return setters;
            }

            setters = setters[property];

            if (!sorted) {
                return setters[property];
            }

            var sortedSetters = [];

            for (var name in setters) {
                sortedSetters.push(setters[name]);
            }

            sortedSetters = sortedSetters.sort(function(s1, s2) { return s2[0] - s1[0]; });

            for (var i = 0, ii = sortedSetters.length; i < ii; ++i) {
                sortedSetters[i] = sortedSetters[i][1];
            }

            return sortedSetters;
        }
146803
private Multimap<String, Setting> loadComponentSettings(DbSession dbSession, Set<String> keys, ComponentDto component) {
    List<String> componentUuids = DOT_SPLITTER.splitToList(component.moduleUuidPath());
    List<ComponentDto> componentDtos = dbClient.componentDao().selectByUuids(dbSession, componentUuids);
    Set<Long> componentIds = componentDtos.stream().map(ComponentDto::getId).collect(Collectors.toSet());
    Map<Long, String> uuidsById = componentDtos.stream().collect(Collectors.toMap(ComponentDto::getId, ComponentDto::uuid));
    List<PropertyDto> properties = dbClient.propertiesDao().selectPropertiesByKeysAndComponentIds(dbSession, keys, componentIds);
    List<PropertyDto> propertySets = dbClient.propertiesDao().selectPropertiesByKeysAndComponentIds(dbSession, getPropertySetKeys(properties), componentIds);

    Multimap<String, Setting> settingsByUuid = TreeMultimap.create(Ordering.explicit(componentUuids), Ordering.arbitrary());
    for (PropertyDto propertyDto : properties) {
      Long componentId = propertyDto.getResourceId();
      String componentUuid = uuidsById.get(componentId);
      String propertyKey = propertyDto.getKey();
      settingsByUuid.put(componentUuid,
        Setting.createFromDto(propertyDto, getPropertySets(propertyKey, propertySets, componentId), propertyDefinitions.get(propertyKey)));
    }
    return settingsByUuid;
  }
993642
def _iter_config_props(cls):
        
        props = inspect.getmembers(cls, lambda a: isinstance(a, ConfigProperty))
        for attr_name, config_prop in props:
            yield attr_name, config_prop
394248
@SuppressWarnings("unchecked")
    private <T> List<T> getListValue(Class<T> type, String propertyName, EDBObject object) {
        List<T> temp = new ArrayList<>();
        for (int i = 0;; i++) {
            String property = getEntryNameForList(propertyName, i);
            Object obj = object.getObject(property);
            if (obj == null) {
                break;
            }
            if (OpenEngSBModel.class.isAssignableFrom(type)) {
                obj = convertEDBObjectToUncheckedModel(type, edbService.getObject(object.getString(property)));
            }
            temp.add((T) obj);
            object.remove(property);
        }
        return temp;
    }
855227
public List<ComponentDto> selectAncestors(DbSession dbSession, ComponentDto component) {
    if (component.isRoot()) {
      return Collections.emptyList();
    }
    List<String> ancestorUuids = component.getUuidPathAsList();
    List<ComponentDto> ancestors = selectByUuids(dbSession, ancestorUuids);
    return Ordering.explicit(ancestorUuids).onResultOf(ComponentDto::uuid).immutableSortedCopy(ancestors);
  }
853948
function buildExportNameListDeclaration(
  programPath: NodePath,
  metadata: ModuleMetadata,
) {
  const exportedVars = Object.create(null);
  for (const data of metadata.local.values()) {
    for (const name of data.names) {
      exportedVars[name] = true;
    }
  }

  let hasReexport = false;
  for (const data of metadata.source.values()) {
    for (const exportName of data.reexports.keys()) {
      exportedVars[exportName] = true;
    }
    for (const exportName of data.reexportNamespace) {
      exportedVars[exportName] = true;
    }

    hasReexport = hasReexport || data.reexportAll;
  }

  if (!hasReexport || Object.keys(exportedVars).length === 0) return null;

  const name = programPath.scope.generateUidIdentifier("exportNames");

  delete exportedVars.default;

  return {
    name: name.name,
    statement: t.variableDeclaration("var", [
      t.variableDeclarator(name, t.valueToNode(exportedVars)),
    ]),
  };
}
762146
function __getOwnPropertyValues(source) {
  var result = [];
  for (var name in source) {
    if (__hasOwnProperty(source, name)) {
      result.push(source[name]);
    }
  }
  return result;
}