Search in sources :

Example 1 with SortSpec

use of com.github.chipolaris.bootforum.dao.SortSpec in project BootForum by chipolaris.

the class TagService method getActiveTags.

@Transactional(readOnly = true)
@Cacheable(value = CachingConfig.ACTIVE_TAGS, key = "'tagService.getActiveTags'")
public ServiceResponse<List<Tag>> getActiveTags() {
    ServiceResponse<List<Tag>> response = new ServiceResponse<>();
    List<Tag> tags = genericDAO.getEntities(Tag.class, Collections.singletonMap("disabled", Boolean.FALSE), new SortSpec("sortOrder", SortSpec.Direction.DESC));
    response.setDataObject(tags);
    return response;
}
Also used : List(java.util.List) Tag(com.github.chipolaris.bootforum.domain.Tag) SortSpec(com.github.chipolaris.bootforum.dao.SortSpec) Cacheable(org.springframework.cache.annotation.Cacheable) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

SortSpec (com.github.chipolaris.bootforum.dao.SortSpec)1 Tag (com.github.chipolaris.bootforum.domain.Tag)1 List (java.util.List)1 Cacheable (org.springframework.cache.annotation.Cacheable)1 Transactional (org.springframework.transaction.annotation.Transactional)1