package jp.sourceforge.shovel.form.impl;

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

import jp.sourceforge.shovel.SizeType;
import jp.sourceforge.shovel.form.IDownloadFileForm;

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

@StrutsActionForm(name = "downloadFileForm")
public class DownloadFileFormImpl implements IDownloadFileForm {
    boolean background_;
    String foreignKey_;
    SizeType sizeType_;
    long userId_;
    
    public boolean isBackground() {
        return background_;
    }
    public void setBackground(boolean background) {
        background_ = background;
    }
    public String getForeignKey() {
        return foreignKey_ == null ? "" : foreignKey_;
    }
    public void setForeignKey(String foreignKey) {
        foreignKey_ = foreignKey;
    }
    public String getSize() {
        return getSizeType().getId();
    }
    public void setSize(String size) {
        setSizeType(SizeType.find(size));
    }
    public SizeType getSizeType() {
        return sizeType_ == null ? LARGE : sizeType_;
    }
    public void setSizeType(SizeType sizeType) {
        sizeType_ = sizeType;
    }
    public long getUserId() {
        return userId_;
    }
    public void setUserId(long userId) {
        userId_ = userId;
    }
}
