managed.setAlias(generatedAlias); if (isDetailedLibrary(managed)) {
@Override public Long create(Library library) throws IOException { if (library.getSample() != null && library.getSample().getId() == Sample.UNSAVED_ID) { Long sampleId = sampleService.create(library.getSample()); library.getSample().setId(sampleId); } loadChildEntities(library); boxService.throwIfBoxPositionIsFilled(library); library.setChangeDetails(authorizationManager.getCurrentUser()); if (library.getSecurityProfile() == null) { library.inheritPermissions(sampleService.get(library.getSample().getId())); } authorizationManager.throwIfNotWritable(library); validateParentOrThrow(library); // pre-save field generation library.setName(generateTemporaryName()); if (isStringEmptyOrNull(library.getAlias()) && namingScheme.hasLibraryAliasGenerator()) { library.setAlias(generateTemporaryName()); } if (library.getConcentration() == null) { library.setConcentrationUnits(null); } if (library.getVolume() == null) { library.setVolumeUnits(null); } validateChange(library, null); long savedId = save(library, true).getId(); boxService.updateBoxableLocation(library); return savedId; }
to.setAlias(from.getAlias()); to.setName(from.getName()); to.setDescription(from.getDescription());
target.setConcentrationUnits(target.getConcentration() == null ? null : source.getConcentrationUnits()); target.setPlatformType(source.getPlatformType()); target.setAlias(source.getAlias()); target.setPaired(source.getPaired()); target.setLowQuality(source.isLowQuality());