@Test void testAddMappingProject() { String projectName = "test_project"; MappingProject mappingProject = mappingService.addMappingProject(projectName, hopMetaData.getId(), 3); Mockito.verify(mappingProjectRepo, Mockito.times(1)).add(mappingProject); assertEquals(projectName, mappingProject.getName()); List<MappingTarget> mappingTargets = mappingProject.getMappingTargets(); assertEquals(1, mappingTargets.size()); assertEquals(3, mappingProject.getDepth()); assertEquals(hopMetaData, mappingTargets.get(0).getTarget()); }
@Override @Transactional public MappingProject addMappingProject(String projectName, String target, int depth) { MappingProject mappingProject = new MappingProject(projectName, depth); mappingProject.addTarget(dataService.getEntityType(target)); mappingProjectRepository.add(mappingProject); return mappingProject; }
MappingServiceImpl implements MappingService { @Override @Transactional public MappingProject addMappingProject(String projectName, String target, int depth) { MappingProject mappingProject = new MappingProject(projectName, depth); mappingProject.addTarget(dataService.getEntityType(target)); mappingProjectRepository.add(mappingProject); return mappingProject; } }
MappingServiceImpl implements MappingService { @Override @Transactional public MappingProject addMappingProject(String projectName, String target, int depth) { MappingProject mappingProject = new MappingProject(projectName, depth); mappingProject.addTarget(dataService.getEntityType(target)); mappingProjectRepository.add(mappingProject); return mappingProject; } MappingServiceImpl(
      DataService dataService,
      AlgorithmService algorithmService,
      MappingProjectRepository mappingProjectRepository,
      PermissionSystemService permissionSystemService,
      AttributeFactory attrMetaFactory,
      EntityManager entityManager); }
MappingServiceImpl implements MappingService { @Override @Transactional public MappingProject addMappingProject(String projectName, String target, int depth) { MappingProject mappingProject = new MappingProject(projectName, depth); mappingProject.addTarget(dataService.getEntityType(target)); mappingProjectRepository.add(mappingProject); return mappingProject; } MappingServiceImpl(
      DataService dataService,
      AlgorithmService algorithmService,
      MappingProjectRepository mappingProjectRepository,
      PermissionSystemService permissionSystemService,
      AttributeFactory attrMetaFactory,
      EntityManager entityManager); @Override @Transactional MappingProject addMappingProject(String projectName, String target, int depth); @Override @Transactional void deleteMappingProject(String mappingProjectId); @Override @Transactional MappingProject cloneMappingProject(String mappingProjectId); @Override @Transactional MappingProject cloneMappingProject(
      String mappingProjectId, String clonedMappingProjectName); @Override List<MappingProject> getAllMappingProjects(); @Override @Transactional void updateMappingProject(MappingProject mappingProject); @Override MappingProject getMappingProject(String identifier); @Override @Transactional long applyMappings(
      String mappingProjectId,
      String entityTypeId,
      Boolean addSourceAttribute,
      String packageId,
      String label,
      Progress progress); Stream<EntityType> getCompatibleEntityTypes(EntityType target); }
MappingServiceImpl implements MappingService { @Override @Transactional public MappingProject addMappingProject(String projectName, String target, int depth) { MappingProject mappingProject = new MappingProject(projectName, depth); mappingProject.addTarget(dataService.getEntityType(target)); mappingProjectRepository.add(mappingProject); return mappingProject; } MappingServiceImpl(
      DataService dataService,
      AlgorithmService algorithmService,
      MappingProjectRepository mappingProjectRepository,
      PermissionSystemService permissionSystemService,
      AttributeFactory attrMetaFactory,
      EntityManager entityManager); @Override @Transactional MappingProject addMappingProject(String projectName, String target, int depth); @Override @Transactional void deleteMappingProject(String mappingProjectId); @Override @Transactional MappingProject cloneMappingProject(String mappingProjectId); @Override @Transactional MappingProject cloneMappingProject(
      String mappingProjectId, String clonedMappingProjectName); @Override List<MappingProject> getAllMappingProjects(); @Override @Transactional void updateMappingProject(MappingProject mappingProject); @Override MappingProject getMappingProject(String identifier); @Override @Transactional long applyMappings(
      String mappingProjectId,
      String entityTypeId,
      Boolean addSourceAttribute,
      String packageId,
      String label,
      Progress progress); Stream<EntityType> getCompatibleEntityTypes(EntityType target); static final int MAPPING_BATCH_SIZE; }