Example #1
0
 public static void createSkill(String name) {
   if (!name.equals("null")) {
     List<Skill> skills = Skill.find("byName", name).asList();
     if (skills.size() == 0) {
       Skill newSkill = new Skill(name).save();
       Skill skill = Skill.find("byName", newSkill.name).first();
       renderJSON(skill);
     }
   }
 }
Example #2
0
  private void setSkillTextField() {
    String personCode = person.getPersonCode();
    try {
      this.list = skillQueries.getSkillsOfPerson(personCode);
    } catch (SQLException e) {
      e.printStackTrace();
    }

    StringBuilder sb = new StringBuilder();
    for (Skill skill : list) {
      sb.append(skill.getSkillName() + ", ");
    }
    taSkills.setText(sb.toString());
  }