void (String moduleName) { String moduleNameBefore = getModuleName(); this.update( () -> myModuleName = moduleName, (builder, entity) -> { if (Objects.equals(moduleNameBefore, moduleName)) return; builder.modifyEntity(LibraryFilesPackagingElementEntity.Builder.class, entity, ent -> { LibraryId libraryId = ent.getLibrary(); if (libraryId != null) { LibraryTableId newTableId = new LibraryTableId.ModuleLibraryTableId(new ModuleId(moduleName)); ent.setLibrary(libraryId.copy(libraryId.getName(), newTableId)); } return Unit.INSTANCE; }); } ); }