List of usage examples for java.util Map values
Collection<V> values();
From source file:cn.aozhi.songify.service.music.MusicService.java
/** * ???./*from w w w. j av a 2 s . c om*/ */ private Specification<Music> buildSpecification(Map<String, Object> searchParams) { Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); Specification<Music> spec = DynamicSpecifications.bySearchFilter(filters.values(), Music.class); return spec; }
From source file:com.comcast.video.dawg.controller.house.mocks.MockParkService.java
@Override public Map<String, Object>[] findByKeys(String[] keys) { List<Map<String, Object>> filtered = new ArrayList<Map<String, Object>>(); stbloop: for (Map<String, Object> stb : allStbs) { for (Object obj : stb.values()) { if (obj != null) { for (String key : keys) { if (obj.toString().contains(key)) { filtered.add(stb); break stbloop; }/*from ww w.ja v a 2 s.com*/ } } } } return toArray(filtered); }
From source file:com.oakhole.channel.service.ChannelGroupService.java
public Page<ChannelGroup> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize, String sortDirection, String sortBy) { Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); Specification<ChannelGroup> spec = DynamicSpecifications.bySearchFilter(filters.values(), ChannelGroup.class); Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy); PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort); Page<ChannelGroup> channelGroupList = channelGroupDao.findAll(spec, pageRequest); return channelGroupList; }
From source file:io.pivotal.tzolov.gemfire.adapter.GemfireHawqAdapterService.java
private void processResponse(List rows, Writer writer) throws IOException { 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++;/*ww w . j a v a 2 s . com*/ String columnValue = toColumnValue(value); outputRow = (i == 1) ? columnValue : outputRow + columnDelimiter + columnValue; } } else { throw new IllegalStateException("Unsupported return class type: " + row.getClass()); } writer.write(outputRow); writer.write("\n"); } }
From source file:com.base2.kagura.core.report.parameterTypes.datasources.SQL.java
/** * Executes the report, selecting the first column OR the column designated to make up the parameters values. * {@inheritDoc}/* w w w . j a va 2 s . c o m*/ */ @JsonIgnore @Override public Collection<Object> getValues() { ReportConnector reportConnector = report.getReportConnector(); reportConnector.run(extra); if (reportConnector.getRows() == null) return new ArrayList<Object>(); return CollectionUtils.collect(reportConnector.getRows(), new Transformer() { @Override public Object transform(Object input) { Map<String, Object> map = (Map<String, Object>) input; if (map.size() == 1) return map.values().iterator().next(); else return map.get(selectedColumn); } }); }
From source file:net.sf.jasperreports.engine.part.PartComponentsEnvironment.java
/** * Returns the set of all component bundles present in the registry. * /*from www. j av a 2 s .c om*/ * @return the set of component bundles */ public Collection<PartComponentsBundle> getBundles() { Map<String, PartComponentsBundle> components = getCachedBundles(); return components.values(); }
From source file:com.bstek.bdf2.core.orm.transaction.JdbcTransactionManager.java
private void clean() { Map<String, Session> sessionMap = ContextHolder.getHibernateSessionMap(); if (sessionMap == null) { return;/*from w w w .j a va 2 s . com*/ } for (Session session : sessionMap.values()) { if (session != null && session.isOpen()) { session.flush(); session.close(); session = null; } } sessionMap.clear(); }
From source file:com.qpark.maven.plugin.relativeschemalocation.ToWebappSchemaLocationMojo.java
/** * @see org.apache.maven.plugin.Mojo#execute() *///from w w w . j a v a2 s.co m @Override public void execute() throws MojoExecutionException, MojoFailureException { StaticLoggerBinder.getSingleton().setLog(this.getLog()); this.getLog().debug("+execute"); Map<String, XsdContainer> map = XsdsUtil.getXsdContainers(this.baseDirectory); for (XsdContainer xc : map.values()) { try { String basePath = Util.getRelativePathTranslated(this.baseDirectory, xc.getFile()); this.getLog().debug(basePath); String xml = this.changeSchemaLocation(xc, map); File f = Util.getFile(this.outputDirectory, basePath); this.getLog().info(new StringBuffer().append("Write ").append(f.getAbsolutePath())); Util.writeToFile(f, xml); } catch (IOException e) { this.getLog().error(e.getMessage()); e.printStackTrace(); } } this.getLog().debug("-execute"); }
From source file:at.ac.univie.isc.asio.nest.NestContainer.java
/** * Retrieve all beans that implement {@link Engine}. *///from ww w .ja v a 2s .c o m @Override public final Set<Engine> engines() { final Map<String, Engine> found = context().getBeansOfType(Engine.class); return ImmutableSet.copyOf(found.values()); }