FileDocCategorySizeDatePackage
SkillAction.javaAPI DocApache Struts 2.0.9 Apps2678Mon Jul 23 13:43:26 BST 2007org.apache.struts2.showcase.action

SkillAction

public class SkillAction extends AbstractCRUDAction implements com.opensymphony.xwork2.Preparable
SkillAction.

Fields Summary
private static final Logger
log
private String
skillName
protected org.apache.struts2.showcase.dao.SkillDao
skillDao
private org.apache.struts2.showcase.model.Skill
currentSkill
Constructors Summary
Methods Summary
public org.apache.struts2.showcase.model.SkillgetCurrentSkill()

        return currentSkill;
    
protected org.apache.struts2.showcase.dao.DaogetDao()

        return skillDao;
    
public java.lang.StringgetSkillName()


       
        return skillName;
    
public voidprepare()
This method is called to allow the action to prepare itself.

throws
Exception thrown if a system level exception occurs.

        Skill preFetched = (Skill) fetch(getSkillName(), getCurrentSkill());
        if (preFetched != null) {
            setCurrentSkill(preFetched);
        }
    
public java.lang.Stringsave()

        if (getCurrentSkill() != null) {
            setSkillName((String) skillDao.merge(getCurrentSkill()));
        }
        return SUCCESS;
    
public voidsetCurrentSkill(org.apache.struts2.showcase.model.Skill currentSkill)

        this.currentSkill = currentSkill;
    
public voidsetSkillDao(org.apache.struts2.showcase.dao.SkillDao skillDao)

        if (log.isDebugEnabled()) {
            log.debug("SkillAction - [setSkillDao]: skillDao injected.");
        }
        this.skillDao = skillDao;
    
public voidsetSkillName(java.lang.String skillName)

        this.skillName = skillName;