List of usage examples for java.util Map values
Collection<V> values();
From source file:com.oakhole.auth.service.RoleService.java
public Page<Role> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize, String sortDirection, String sortBy) {/*w ww .j a v a2s .com*/ Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); Specification<Role> spec = DynamicSpecifications.bySearchFilter(filters.values(), Role.class); Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy); PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort); Page<Role> roleList = roleDao.findAll(spec, pageRequest); return roleList; }
From source file:de.randi2.core.integration.modelDatabase.hibernate.HibernateMappingTest.java
/** * Walking over all mapped entities and getting a list of them to see, * if loading works correct./*from ww w . ja v a 2 s . c o m*/ * * @throws Exception */ @Test public void testEverything() throws Exception { databaseUtil.setUpDatabaseEmpty(); Map metadata = ((Session) entityManager.getDelegate()).getSessionFactory().getAllClassMetadata(); for (Object persisterObject : metadata.values()) { EntityPersister persister = (EntityPersister) persisterObject; String className = persister.getClassMetadata().getEntityName(); String queryString = "from " + className + " c"; List result = entityManager.createQuery(queryString).getResultList(); logger.debug("QUERY: " + queryString); } }
From source file:io.gravitee.repository.redis.management.internal.impl.ApiRedisRepositoryImpl.java
@Override public Set<RedisApi> findAll() { Map<Object, Object> applications = redisTemplate.opsForHash().entries(REDIS_KEY); return applications.values().stream().map(object -> convert(object, RedisApi.class)) .collect(Collectors.toSet()); }
From source file:com.oakhole.auth.service.GroupService.java
public Page<Group> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize, String sortDirection, String sortBy) {//from w w w . j av a 2 s .c om Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); Specification<Group> spec = DynamicSpecifications.bySearchFilter(filters.values(), Group.class); Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy); PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort); Page<Group> groupList = groupDao.findAll(spec, pageRequest); return groupList; }
From source file:org.kee.ssf.service.module.ModuleService.java
/** * ???.//from w ww . j ava 2s . com */ private Specification<Module> buildSpecification(Map<String, Object> searchParams) { Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); Specification<Module> spec = DynamicSpecifications.bySearchFilter(filters.values(), Module.class); return spec; }
From source file:com.oakhole.advice.service.AdviceService.java
public Page<Advice> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize, String sortDirection, String sortBy) { Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); Specification<Advice> spec = DynamicSpecifications.bySearchFilter(filters.values(), Advice.class); Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy); PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort); Page<Advice> adviceList = adviceDao.findAll(spec, pageRequest); return adviceList; }
From source file:org.xaloon.wicket.component.inject.spring.SpringBeanLocatorAdapter.java
@Override public <T> List<T> getBeans(Class<T> clazz) { Map<String, T> beans = new SpringContextLocator().getSpringContext().getBeansOfType(clazz); List<T> result = new ArrayList<T>(); if (beans != null && !beans.values().isEmpty()) { result.addAll(beans.values());/*from ww w .j a v a 2 s . c om*/ } return result; }
From source file:sk.openhouse.web.filter.LocaleConfigurerFilter.java
@Override protected void initFilterBean() throws ServletException { WebApplicationContext context = WebApplicationContextUtils .getRequiredWebApplicationContext(getServletContext()); Map resolvers = context.getBeansOfType(LocaleResolver.class); if (resolvers.size() == 1) { localeResolver = (LocaleResolver) resolvers.values().iterator().next(); }//from ww w.ja va 2s. c o m }
From source file:com.oakhole.channel.service.ChannelService.java
public Page<Channel> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize, String sortDirection, String sortBy) { Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); Specification<Channel> spec = DynamicSpecifications.bySearchFilter(filters.values(), Channel.class); Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy); PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort); Page<Channel> channelList = channelDao.findAll(spec, pageRequest); return channelList; }
From source file:com.oakhole.setting.service.SettingService.java
public Page<Setting> findAll(Map<String, Object> searchParams, int pageNumber, int pageSize, String sortDirection, String sortBy) { Map<String, SearchFilter> filters = SearchFilter.parse(searchParams); Specification<Setting> spec = DynamicSpecifications.bySearchFilter(filters.values(), Setting.class); Sort sort = new Sort("ASC".equals(sortDirection) ? Sort.Direction.ASC : Sort.Direction.DESC, sortBy); PageRequest pageRequest = new PageRequest(pageNumber, pageSize, sort); Page<Setting> settingList = settingDao.findAll(spec, pageRequest); return settingList; }