Examples of Skill


Examples of beans.serializable.Skill

            statement.setString(1, name);
           
            set = statement.executeQuery();
           
            if (set.next()) {
                final Skill skill = getFromRowSet(set);
                return skill;
            } else {
                return null;
            }
        } catch (final SQLException ex) {
View Full Code Here

Examples of com.l2client.model.l2j.Skill

  {
    log.fine("Read from Server "+this.getClass().getSimpleName());
    int skills = readD();//# of skills following
    ArrayList<Skill> sList = new ArrayList<Skill>();
    for(int i=0;i<skills;i++){
      Skill s = new Skill();
      s.setPassive(readD()!=0);
      s.setLevel(readD());
      s.setId(readD());
      s.setDisabled(readC()!=0);
      s.setEnchanted(readC()!=0);
      sList.add(s);
    }
  }
View Full Code Here

Examples of com.tcs.hrr.domain.Skill

  }

  public Skill findById(java.lang.Integer id) {
    log.debug("getting Skill instance with id: " + id);
    try {
      Skill instance = (Skill) getHibernateTemplate().get(
          "com.tcs.hrr.domain.Skill", id);
      return instance;
    } catch (RuntimeException re) {
      log.error("get failed", re);
      throw re;
View Full Code Here

Examples of com.tcs.hrr.domain.Skill

  }

  public Skill merge(Skill detachedInstance) {
    log.debug("merging Skill instance");
    try {
      Skill result = (Skill) getHibernateTemplate().merge(
          detachedInstance);
      log.debug("merge successful");
      return result;
    } catch (RuntimeException re) {
      log.error("merge failed", re);
View Full Code Here

Examples of cz.muni.fi.pa165.ddtroops.entities.Skill

   
    @Transactional
    @Secured("ROLE_SUPERVISOR")
    public SkillDTO createNewSkill(String name, String description, String profession, Long minXP)
    {
        Skill s = new EntityBuilder<Skill>(Skill.class)
                .withProperty("Name", name)
                .withProperty("Description", description)
                .withProperty("Profession", profession)
                .withProperty("minXP", minXP)
                .Build();
View Full Code Here

Examples of cz.muni.fi.pa165.ddtroops.entities.Skill

    @Transactional(readOnly=true)
    @Secured("IS_AUTHENTICATED_ANONYMOUSLY")
    public SkillDTO getById(Long id)
    {
        Skill s = dao.getById(id);
        return (s!=null)?DTOFactory.createSkillDTO(s):null;
    }
View Full Code Here

Examples of cz.muni.fi.pa165.ddtroops.entities.Skill

        return hero;
    }

    public static Skill createSkill(SkillDTO skillDTO){
        Skill skill = new Skill();

        skill.setDescription(skillDTO.description);
        skill.setId(skillDTO.id);
        skill.setMinXP(skillDTO.minXP);
        skill.setName(skillDTO.name);
        skill.setProfession(skillDTO.profession);

        return skill;
    }
View Full Code Here

Examples of cz.muni.fi.pa165.ddtroops.entities.Skill

     * Test checks whether skill after creation has received id
     */
     @Test
    public void testHasIdAfterCreation(){

        Skill newSkill = new Skill();
        newSkill.setDescription("Brand new skill");
        newSkill.setName("New skill");
        newSkill.setMinXP(1000L);
        newSkill.setProfession("Wizard");
        skillDAO.create(newSkill);

        assertNotNull(newSkill.getId());
    }
View Full Code Here

Examples of cz.muni.fi.pa165.ddtroops.entities.Skill

     * Test checks whether the skill was created in db and can be retreived.
     */
     @Test
    public void testCreate(){

        Skill newSkill = new Skill();
        newSkill.setDescription("Brand new skill");
        newSkill.setName("Created skill");
        newSkill.setMinXP(1000L);
        newSkill.setProfession("Wizard");
        newSkill.setDescription("abc");

        skillDAO.create(newSkill);

        Skill fromDB = skillDAO.getById(newSkill.getId());

        assertEquals(newSkill,fromDB);
    }
View Full Code Here

Examples of cz.muni.fi.pa165.ddtroops.entities.Skill

     * Test checks whether a skill can be retreived by id.
     */
      @Test
    public void testGetById(){

        Skill newSkill = new Skill();
        newSkill.setDescription("Brand new skill");
        newSkill.setName("New skill");
        newSkill.setMinXP(1000L);
        newSkill.setProfession("Wizard");
        skillDAO.create(newSkill);
        Skill skillFromDB = skillDAO.getById(newSkill.getId());

        assertEquals(newSkill, skillFromDB);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.