受け取ったクエリをコンソールに吐き出すようにした

This commit is contained in:
r-ca 2024-01-13 14:35:25 +09:00
parent 82d0187a11
commit 3c66480f0f
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -8,24 +8,31 @@ import one.nem.lacerta.data.LacertaSearch;
import one.nem.lacerta.model.ListItem; import one.nem.lacerta.model.ListItem;
import one.nem.lacerta.data.LacertaLibrary; import one.nem.lacerta.data.LacertaLibrary;
import one.nem.lacerta.utils.LacertaLogger;
public class LacertaSearchStubImpl implements LacertaSearch { public class LacertaSearchStubImpl implements LacertaSearch {
private LacertaLibrary library; private LacertaLibrary library;
private LacertaLogger logger;
@Inject @Inject
public LacertaSearchStubImpl(LacertaLibrary library) { public LacertaSearchStubImpl(LacertaLibrary library, LacertaLogger logger) {
this.library = library; this.library = library;
this.logger = logger;
} }
@Override @Override
public ArrayList<ListItem> autoSearch(String query, int limit) { public ArrayList<ListItem> autoSearch(String query, int limit) {
logger.debug("SearchStub", "autoSearch");
logger.debug("SearchStub", "query: " + query);
return library.getLibraryPage(limit).getListItems(); return library.getLibraryPage(limit).getListItems();
} }
@Override @Override
public ArrayList<ListItem> autoSearch(String query, int limit, int offset) { public ArrayList<ListItem> autoSearch(String query, int limit, int offset) {
logger.debug("SearchStub", "autoSearch");
logger.debug("SearchStub", "query: " + query);
return library.getLibraryPage(limit, offset).getListItems(); return library.getLibraryPage(limit, offset).getListItems();
} }
} }