Example usage for java.util Map values

List of usage examples for java.util Map values

Introduction

In this page you can find the example usage for java.util Map values.

Prototype

Collection<V> values();

Source Link

Document

Returns a Collection view of the values contained in this map.

Usage

From source file:com.oakhole.sms.service.SmsTaskService.java

public Page<SmsTask> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize,
        String sortDirection, String sortBy) {
    Map<String, SearchFilter> filters = SearchFilter.parse(searchParams);
    Specification<SmsTask> spec = DynamicSpecifications.bySearchFilter(filters.values(), SmsTask.class);
    Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy);
    PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort);
    Page<SmsTask> smsTaskList = smsTaskDao.findAll(spec, pageRequest);
    return smsTaskList;
}

From source file:com.aliyun.openservices.odps.console.pub.StatusOfInstanceCommand.java

@Override
public void run() throws OdpsException, ODPSConsoleException {

    Odps odps = getCurrentOdps();/*from w  w w . j a v a 2  s.  com*/

    if (extended == false) {
        Instance inst = odps.instances().get(instanceId);
        Map<String, TaskStatus> taskStatus = inst.getTaskStatus();
        for (TaskStatus task : taskStatus.values()) {
            String status = task.getStatus().toString();
            status = WordUtils.capitalizeFully(status);
            // ?status, task?
            getWriter().writeResult(status);
        }
    } else {
        JobDetailInfo jobDetailInfo = new JobDetailInfo(instanceContext);
        jobDetailInfo.printJobDetails();
    }
}

From source file:com.ejisto.modules.repository.WebApplicationRepository.java

private void changeWebApplicationsStatus(String containerId, WebApplication.Status status) {
    Map<String, WebApplication<?>> map = webApplications.get(containerId);
    if (map == null) {
        return;//from   w ww  .ja  v a  2  s .  co m
    }
    map.values().stream().forEach(w -> w.setStatus(status));
}

From source file:net.sf.jasperreports.engine.component.ComponentsEnvironment.java

/**
 * Returns the set of all component bundles present in the registry. 
 * //from  ww w. ja v a2 s  .  com
 * @return the set of component bundles
 */
public Collection<ComponentsBundle> getBundles() {
    Map<String, ComponentsBundle> components = getCachedBundles();
    return components.values();
}

From source file:com.db2eshop.gui.dialog.ShowDialog.java

private void buildEditor() {
    this.getContentPane().removeAll();
    Container container = this.getContentPane();
    container.setLayout(new MigLayout("filly"));
    Map<String, LabeledForm<?>> components = uiBinder.create(model);
    for (LabeledForm<?> labeledInput : components.values()) {
        labeledInput.setEditable(false);
        container.add(labeledInput, "wrap");
    }//from   w w w.  ja va 2 s  . co m

    this.repaint();
}

From source file:com.oakhole.syslog.service.SignLogService.java

public Page<SignLog> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize,
        String sortDirection, String sortBy) {
    Map<String, SearchFilter> filters = SearchFilter.parse(searchParams);
    Specification<SignLog> spec = DynamicSpecifications.bySearchFilter(filters.values(), SignLog.class);
    Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy);
    PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort);
    Page<SignLog> signLogList = signLogDao.findAll(spec, pageRequest);
    return signLogList;
}

From source file:io.pivotal.tzolov.gemfire.GemfireHawqAdapterService.java

@SuppressWarnings("rawtypes")
@Override/*from w w  w.  j a v  a 2s.c om*/
public void run(String... args) throws Exception {

    List rows = new RestTemplate().getForObject(
            "http://{hostname}:{port}/gemfire-api/v1/queries/adhoc?q={query}", List.class, hostName, port,
            oqlQuery);

    for (Object row : rows) {

        String outputRow = "";

        if (row instanceof String) {
            outputRow = (String) row;
        } else if (row instanceof Map) {

            Map mapItem = ((Map) row);

            int i = 0;
            for (Object value : mapItem.values()) {
                i++;
                String columnValue = toColumnValue(value);
                outputRow = (i == 1) ? columnValue : outputRow + columnDelimiter + columnValue;
            }
        } else {
            throw new IllegalStateException("Unsupported return class type: " + row.getClass());
        }

        System.out.println(outputRow);
    }
}

From source file:com.oakhole.auth.service.OperationService.java

public Page<Operation> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize,
        String sortDirection, String sortBy) {
    Map<String, SearchFilter> filters = SearchFilter.parse(searchParams);
    Specification<Operation> spec = DynamicSpecifications.bySearchFilter(filters.values(), Operation.class);
    Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy);
    PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort);
    Page<Operation> operationList = operationDao.findAll(spec, pageRequest);
    return operationList;
}

From source file:com.oakhole.financial.service.FinancialService.java

public Page<Financial> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize,
        String sortDirection, String sortBy) {
    Map<String, SearchFilter> filters = SearchFilter.parse(searchParams);
    Specification<Financial> spec = DynamicSpecifications.bySearchFilter(filters.values(), Financial.class);
    Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy);
    PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort);
    Page<Financial> financialList = financialDao.findAll(spec, pageRequest);
    return financialList;
}

From source file:org.suren.autotest.web.framework.data.CallbackDynamicData.java

@Override
public String getValue(String orginData) {
    String type = dataPrepare();/*  w w w.j  a  v  a2 s  .  c om*/

    Map<String, DynamicData> dynamicDataMap = context.getBeansOfType(DynamicData.class);
    for (DynamicData dynamicData : dynamicDataMap.values()) {
        if (dynamicData == this) {
            continue;
        }

        if (dynamicData.getType().equals(type)) {
            dynamicData.setData(data);
            return dynamicData.getValue(orginData);
        }
    }

    return orginData;
}