LacertaLibraryの実装を流用して取得できるように

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

View File

@ -2,18 +2,30 @@ package one.nem.lacerta.data.impl;
import java.util.ArrayList;
import javax.inject.Inject;
import one.nem.lacerta.data.LacertaSearch;
import one.nem.lacerta.model.ListItem;
import one.nem.lacerta.data.LacertaLibrary;
public class LacertaSearchStubImpl implements LacertaSearch {
private LacertaLibrary library;
@Inject
public LacertaSearchStubImpl(LacertaLibrary library) {
this.library = library;
}
@Override
public ArrayList<ListItem> autoSearch(String query, int limit) {
return null;
return library.getLibraryPage(limit).getListItems();
}
@Override
public ArrayList<ListItem> autoSearch(String query, int limit, int offset) {
return null;
return library.getLibraryPage(limit, offset).getListItems();
}
}