Ejemplo n.º 1
0
 public JSONObject getSummonerSpelByName(String name) {
   Long id =
       (Long)
           hib.getOneValueFromTheDatabase(
               "SELECT id FROM SummonerSpelNameId WHERE LOWER(name) = LOWER('" + name + "')");
   return getSummonerSpelByID(id);
 }
Ejemplo n.º 2
0
 @SuppressWarnings("rawtypes")
 public JSONObject getAllMasteriesNameId() {
   List list = hib.getDataFromDatabase("FROM MasteryNameId");
   JSONObject obj = new JSONObject();
   if (list != null && !list.isEmpty()) {
     HashMap<Long, String> hm = new HashMap<Long, String>();
     for (int i = 0; i < list.size(); i++) {
       MasteryNameId champ = (MasteryNameId) list.get(i);
       hm.put(champ.getId(), champ.getName());
     }
     obj.putAll(hm);
   }
   return obj;
 }
Ejemplo n.º 3
0
 @SuppressWarnings("rawtypes")
 public JSONObject getRuneByParselName(String name) {
   List list =
       hib.getDataFromDatabase("from RuneNameId where LOWER(name) LIKE LOWER('%" + name + "%')");
   JSONObject obj = new JSONObject();
   HashMap<Long, String> hm = new HashMap<Long, String>();
   if (list != null && !list.isEmpty()) {
     for (int i = 0; i < list.size(); i++) {
       RuneNameId champ = (RuneNameId) list.get(i);
       hm.put(champ.getId(), champ.getName());
     }
     obj.putAll(hm);
     return obj;
   }
   return null;
 }