package jp.sourceforge.shovel.form.impl;

import static jp.sourceforge.shovel.AccountConfigType.*;

import org.seasar.struts.annotation.tiger.StrutsActionForm;

import jp.sourceforge.shovel.AccountConfigType;
import jp.sourceforge.shovel.form.IAccountForm;

@StrutsActionForm(name = "accountForm")
public class AccountFormImpl implements IAccountForm {
    String foreignKey_;
    String email_;
    String token_;
    String password_;
    boolean partial_;
    AccountConfigType configType_;
    
    public String getEmail() {
        return email_ == null ? "" : email_;
    }
    public void setEmail(String email) {
        email_ = email;
    }
    public String getForeignKey() {
        return foreignKey_ == null ? "" : foreignKey_;
    }
    public void setForeignKey(String foreignKey) {
        foreignKey_ = foreignKey;
    }
    public String getPassword() {
        return password_ == null ? "" : password_;
    }
    public void setPassword(String password) {
        password_ = password;
    }
    public String getToken() {
        return token_ == null ? "" : token_;
    }
    public void setToken(String token) {
        token_ = token;
    }
    public boolean isPartial() {
        return partial_;
    }
    public void setPartial(boolean partial) {
        partial_ = partial;
    }
    public void setConfig(String config) {
        setConfigType(AccountConfigType.find(config));
    }
    public AccountConfigType getConfigType() {
        return configType_ == null ? SETTINGS : configType_;
    }
    void setConfigType(AccountConfigType configType) {
        configType_ = configType;
    }
}
