|
@ -1,4 +1,5 @@ |
|
|
package com.cristobalbernal.loladvisor; |
|
|
package com.cristobalbernal.loladvisor; |
|
|
|
|
|
import com.cristobalbernal.loladvisor.dao.LolDaoImplMemory; |
|
|
import com.cristobalbernal.loladvisor.model.Lol; |
|
|
import com.cristobalbernal.loladvisor.model.Lol; |
|
|
import com.cristobalbernal.loladvisor.service.LolQueryService; |
|
|
import com.cristobalbernal.loladvisor.service.LolQueryService; |
|
|
import com.cristobalbernal.loladvisor.service.LolService; |
|
|
import com.cristobalbernal.loladvisor.service.LolService; |
|
@ -15,6 +16,7 @@ public class LolAdvisorRunApp { |
|
|
private LolService videogameService; |
|
|
private LolService videogameService; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private LolQueryService lolQueryService; |
|
|
private LolQueryService lolQueryService; |
|
|
|
|
|
private LolDaoImplMemory daoImplMemory; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private LolAdvisorHelp help; |
|
|
private LolAdvisorHelp help; |
|
|
|
|
|
|
|
@ -62,6 +64,20 @@ public class LolAdvisorRunApp { |
|
|
case "-t": |
|
|
case "-t": |
|
|
lolQueryService.titleContains(argumento[1]); |
|
|
lolQueryService.titleContains(argumento[1]); |
|
|
break; |
|
|
break; |
|
|
|
|
|
case "-l": |
|
|
|
|
|
daoImplMemory.findAll(); |
|
|
|
|
|
break; |
|
|
|
|
|
case "-c": |
|
|
|
|
|
daoImplMemory.mostrarCantidadPersonajes(); |
|
|
|
|
|
break; |
|
|
|
|
|
case "-p": |
|
|
|
|
|
daoImplMemory.buscarPorID(Integer.parseInt(argumento[1])); |
|
|
|
|
|
break; |
|
|
|
|
|
case "-df": |
|
|
|
|
|
lolQueryService.mostrarPorDificultada(argumento[1].split(",")); |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default: error = true; |
|
|
default: error = true; |
|
|
System.out.println("Error de sintaxis"); |
|
|
System.out.println("Error de sintaxis"); |
|
|
System.out.println(help.getHelp()); |
|
|
System.out.println(help.getHelp()); |
|
|