class TypeTransformer {

    TypeWithSourceDTO toDtoWithSource(Type type) {
        TypeWithSourceDTO result = new TypeWithSourceDTO();
        if (null != type) {
            result.setCode(type.getCode());
            result.setName(type.getName());
            result.setBrowser(type.isBrowser());
            result.setMobile(type.isMobile());
            result.setSource(sourceTransformer.toDto(type.getSource()));
        }
        return result;
    }

}