From ed25d23dadf82ded62b5ca92aa04ec26a9cf742b Mon Sep 17 00:00:00 2001
From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Mon, 25 Jan 2010 21:08:05 +0000
Subject: [PATCH] open-ils.search.biblio.isbn_list [ isbn1, isbn2, ... ].  This
 is making multiple calls to storage; we may want to implement it with one SQL
 query.  May also want to rename the method from .isbn_list to .isbn.batch

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15384 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 .../src/perlmods/OpenILS/Application/Search/Biblio.pm     | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
index ab4e2db326..3c59a4ee56 100644
--- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
+++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
@@ -1530,6 +1530,21 @@ sub biblio_search_isbn {
 	return { ids => $recs, count => scalar(@$recs) };
 }
 
+__PACKAGE__->register_method(
+	method	=> "biblio_search_isbn_batch",
+	api_name	=> "open-ils.search.biblio.isbn_list",
+);
+
+sub biblio_search_isbn_batch { 
+	my( $self, $client, $isbn_list ) = @_;
+	$logger->debug("Searching ISBNs @$isbn_list");
+	my $e = new_editor();
+    my @recs = ();
+	@recs = ( @recs, @{ $U->storagereq(
+		'open-ils.storage.id_list.biblio.record_entry.search.isbn.atomic', $_ )
+    } ) for @$isbn_list;
+	return { ids => \@recs, count => scalar(@recs) };
+}
 
 __PACKAGE__->register_method(
 	method	=> "biblio_search_issn",
-- 
2.11.0