private static String listIndices(Library library) { return library.getIndices().stream().map(Index::getSequence).collect(Collectors.joining(", ")); }
private static String listIndices(LibraryDilution dilution) { return dilution.getLibrary().getIndices().stream().map(Index::getSequence).collect(Collectors.joining(", ")); }
@Override public void update(Library library) throws IOException { Library managed = get(library.getId()); managed.setChangeDetails(authorizationManager.getCurrentUser()); List<Index> originalIndices = new ArrayList<>(managed.getIndices()); authorizationManager.throwIfNotWritable(managed); maybeRemoveFromBox(library); boxService.throwIfBoxPositionIsFilled(library); boolean validateAliasUniqueness = !managed.getAlias().equals(library.getAlias()); validateChange(library, managed); applyChanges(managed, library); loadChildEntities(managed); makeChangeLogForIndices(originalIndices, managed.getIndices(), managed); save(managed, validateAliasUniqueness); boxService.updateBoxableLocation(library); }
dto.setKitDescriptorId(from.getKitDescriptor().getId()); if (!from.getIndices().isEmpty()) { dto.setIndexFamilyName(from.getIndices().get(0).getFamily().getName()); for (Index index : from.getIndices()) { switch (index.getPosition()) { case 1:
for (Index index : library.getIndices()) { if (index != null && index.getId() != Index.UNSAVED_ID) { Index managedIndex = indexService.getIndexById(index.getId());
v.setIndices(lib.getIndices()); v.setLibraryAlias(lib.getAlias()); v.setLibraryBarcode(lib.getIdentificationBarcode());
target.setQcPassed(source.getQcPassed()); target.setIndices(source.getIndices()); if (source.getKitDescriptor() != null) { target.setKitDescriptor(source.getKitDescriptor());