@ -0,0 +1,15 @@ | |||||
package db; | |||||
import java.util.List; | |||||
public class AllRecipes extends SearchRecipe { | |||||
public List<String> obtainRecipeNames() { | |||||
Cookbook myCb = new Cookbook(); | |||||
List<String> names = myCb.obtainNames(); | |||||
myCb.closeConnection(); | |||||
return names; | |||||
} | |||||
} |
@ -0,0 +1,7 @@ | |||||
package db; | |||||
import java.util.List; | |||||
public abstract class SearchRecipe { | |||||
public abstract List<String> obtainRecipeNames(); | |||||
} |
@ -0,0 +1,17 @@ | |||||
package db; | |||||
import java.util.List; | |||||
import ksiazka.kucharska.FrmMain; | |||||
public class SearchRecipeNameTag extends SearchRecipe { | |||||
public List<String> obtainRecipeNames() { | |||||
Cookbook myCb = new Cookbook(); | |||||
List<String> names = myCb.obtainSearchedNames(FrmMain.txtSearch.getText(), FrmMain.txtSearch.getText()); | |||||
myCb.closeConnection(); | |||||
return names; | |||||
} | |||||
} |