package kuzumeji.action.home.idm;
import kuzumeji.action.home.BaseEntityHome;
import kuzumeji.entity.idm.User;
import org.jboss.seam.annotations.Name;
/**
 * UserHome
 * @author nilcy
 */
@Name("userHome")
public class UserHome extends BaseEntityHome<User> {
    /** S/N */
    private static final long serialVersionUID = 4512509266600367887L;
    /**
     * get UserId
     * @return UserId
     */
    public Long getUserId() {
        return (Long) getId();
    }
    /**
     * set UserId
     * @param aUserId UserId
     */
    public void setUserId(Long aUserId) {
        setId(aUserId);
    }
    @Override
    protected User createInstance() {
        User user = new User();
        return user;
    }
    /**
     * load
     */
    public void load() {
        if (isIdDefined()) {
            wire();
        }
    }
    /**
     * wire
     */
    public void wire() {
        getInstance();
    }
    /**
     * isWired
     * @return isWired
     */
    public boolean isWired() {
        return true;
    }
    /**
     * get DefinedInstance
     * @return DefinedInstance
     */
    public User getDefinedInstance() {
        return isIdDefined() ? getInstance() : null;
    }
}
