Package org.rest.sec.model.dto

Examples of org.rest.sec.model.dto.PrincipalToUserFunction


    @Override
    @Transactional(readOnly = true)
    public List<User> searchAll(final Triple<String, ClientOperation, String>... constraints) {
        final List<Principal> principalsResultedFromSearch = principalService.searchAll(constraints);
        final List<User> usersResultedFromSearch = Lists.transform(principalsResultedFromSearch, new PrincipalToUserFunction());

        return usersResultedFromSearch;
    }
View Full Code Here


    @Override
    @Transactional(readOnly = true)
    public User searchOne(final Triple<String, ClientOperation, String>... constraints) {
        final Principal principalResultedFromSearch = principalService.searchOne(constraints);
        final User userResultedFromSearch = new PrincipalToUserFunction().apply(principalResultedFromSearch);

        return userResultedFromSearch;
    }
View Full Code Here

    @Override
    @Transactional(readOnly = true)
    public Page<User> searchPaginated(final int page, final int size, final Triple<String, ClientOperation, String>... constraints) {
        final Page<Principal> principalsPaginated = principalService.searchPaginated(page, size, constraints);

        final List<User> usersPaginated = Lists.transform(principalsPaginated.getContent(), new PrincipalToUserFunction());

        return new PageImpl<User>(usersPaginated, new PageRequest(page, size, null), principalsPaginated.getTotalElements());
    }
View Full Code Here

    @Override
    @Transactional(readOnly = true)
    public List<User> searchAll(final String queryString) {
        final List<Principal> principals = principalService.searchAll(queryString);
        final List<User> users = Lists.transform(principals, new PrincipalToUserFunction());
        return users;
    }
View Full Code Here

    @Override
    @Transactional(readOnly = true)
    public List<User> searchPaginated(final String queryString, final int page, final int size) {
        final List<Principal> principals = principalService.searchPaginated(queryString, page, size);
        final List<User> users = Lists.transform(principals, new PrincipalToUserFunction());
        return users;
    }
View Full Code Here

    @Override
    @Transactional(readOnly = true)
    public List<User> findAll() {
        final List<Principal> allPrincipalEntities = principalService.findAll();
        final List<User> allUsers = Lists.transform(allPrincipalEntities, new PrincipalToUserFunction());

        return Lists.newArrayList(allUsers);
    }
View Full Code Here

    @Override
    @Transactional(readOnly = true)
    public List<User> findAllSorted(final String sortBy, final String sortOrder) {
        final List<Principal> allPrincipalEntitiesSortedAndOrdered = principalService.findAllSorted(sortBy, sortOrder);
        final List<User> allUsers = Lists.transform(allPrincipalEntitiesSortedAndOrdered, new PrincipalToUserFunction());

        return allUsers;
    }
View Full Code Here

    @Override
    @Transactional(readOnly = true)
    public List<User> findAllPaginated(final int page, final int size) {
        final List<Principal> principalsPaginated = principalService.findAllPaginated(page, size);
        return Lists.transform(principalsPaginated, new PrincipalToUserFunction());
    }
View Full Code Here

    @Override
    @Transactional(readOnly = true)
    public Page<User> findAllPaginatedAndSortedRaw(final int page, final int size, final String sortBy, final String sortOrder) {
        final Page<Principal> principalsPaginatedAndSorted = principalService.findAllPaginatedAndSortedRaw(page, size, sortBy, sortOrder);

        final List<User> usersPaginatedAndSorted = Lists.transform(principalsPaginatedAndSorted.getContent(), new PrincipalToUserFunction());

        return new PageImpl<User>(usersPaginatedAndSorted, new PageRequest(page, size, constructSort(sortBy, sortOrder)), principalsPaginatedAndSorted.getTotalElements());
    }
View Full Code Here

TOP

Related Classes of org.rest.sec.model.dto.PrincipalToUserFunction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.