Package com.mossle.api.userrepo

Examples of com.mossle.api.userrepo.UserRepoDTO


        }

        List<Map<String, Object>> list = jdbcTemplate.queryForList(sql);

        for (Map<String, Object> map : list) {
            UserRepoDTO userRepoDto = new UserRepoDTO();
            userRepoDto.setId(map.get("id").toString());
            userRepoDto.setCode(map.get("code").toString());
            userRepoDto.setName(map.get("name").toString());

            userRepoCache.updateUserRepo(userRepoDto);
        }
    }
View Full Code Here


public class UserRepoConnectorWrapper implements UserRepoConnector {
    private UserRepoConnector userRepoConnector;
    private UserRepoCache userRepoCache;

    public UserRepoDTO findById(String id) {
        UserRepoDTO userRepoDto = userRepoCache.findById(id);

        if (userRepoDto == null) {
            synchronized (userRepoCache) {
                userRepoDto = userRepoCache.findById(id);
View Full Code Here

        return userRepoDto;
    }

    public UserRepoDTO findByCode(String code) {
        UserRepoDTO userRepoDto = userRepoCache.findByCode(code);

        if (userRepoDto == null) {
            synchronized (userRepoCache) {
                userRepoDto = userRepoCache.findByCode(code);
View Full Code Here

    private UserRepoCache userRepoCache;
    private String destinationName = "topic.userrepo.update";

    public void handleMessage(String message) {
        try {
            UserRepoDTO userRepoDto = jsonMapper.fromJson(message,
                    UserRepoDTO.class);

            if (userRepoDto.getName() == null) {
                userRepoCache.removeUserRepo(userRepoDto);
                logger.info("remove userRepoDto : {}", message);
            } else {
                userRepoCache.updateUserRepo(userRepoDto);
                logger.info("update userRepoDto : {}", message);
View Full Code Here

            logger.info("user repo[{}] is null.", map);

            return null;
        }

        UserRepoDTO userRepoDto = new UserRepoDTO();
        userRepoDto.setId((map.get("id") == null) ? null : map.get("id")
                .toString());
        userRepoDto.setCode((map.get("code") == null) ? null : map.get("code")
                .toString());
        userRepoDto.setName((map.get("name") == null) ? null : map.get("name")
                .toString());

        return userRepoDto;
    }
View Full Code Here

        for (ScopeInfo scopeInfo : scopeInfos) {
            ScopeInfoDTO scopeInfoDto = new ScopeInfoDTO();
            beanMapper.copy(scopeInfo, scopeInfoDto);

            String userRepoRef = scopeInfoDto.getUserRepoRef();
            UserRepoDTO userRepoDto = userRepoConnector.findById(userRepoRef);

            if (userRepoDto != null) {
                scopeInfoDto.setUserRepoCode(userRepoDto.getCode());
            }

            scopeInfoDtos.add(scopeInfoDto);
        }
View Full Code Here

TOP

Related Classes of com.mossle.api.userrepo.UserRepoDTO

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.