⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 weekformbean.java

📁 A Java web application, based on Struts and Hibernate, that serves as an online running log. Users m
💻 JAVA
字号:
/* @LICENSE_COPYRIGHT@ */
package net.sf.irunninglog.servlet.formbean;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import net.sf.irunninglog.util.ConstantValues;

/**
 * Simple form bean used to represent a week.  This form bean uses 7 <code>
 * DayFormBean</code> instances to represent the days of the week, and each
 * day may be accessed or updated using the corresponding getter and setter
 * methods.  The <code>getDays</code> metehod returns all of the days for the
 * current week.
 *
 * @author <a href="mailto:allan_e_lewis@yahoo.com">Allan Lewis</a>
 * @version $Revision: 1.1.1.1 $ $Date: 2005/06/23 01:49:02 $
 * @since iRunningLog 1.0
 */
public final class WeekFormBean extends FormBean {

    /** Form bean representing Sunday. */
    private DayFormBean mSunday;
    /** Form bean representing Monday. */
    private DayFormBean mMonday;
    /** Form bean representing Tuesday. */
    private DayFormBean mTuesday;
    /** Form bean representing Wednesday. */
    private DayFormBean mWednesday;
    /** Form bean representing Thursday. */
    private DayFormBean mThursday;
    /** Form bean representing Friday. */
    private DayFormBean mFriday;
    /** Form bean representing Saturday. */
    private DayFormBean mSaturday;

    /**
     * Get the <code>DayFormBean</code> representing Sunday.
     *
     * @return The form bean representing Sunday for this week form bean
     */
    public DayFormBean getSunday() {
        return mSunday;
    }

    /**
     * Update the form bean representing Sunday for this week.
     *
     * @param value The new form bean
     */
    public void setSunday(DayFormBean value) {
        mSunday = value;
    }

    /**
     * Get the <code>DayFormBean</code> representing Monday.
     *
     * @return The form bean representing Monday for this week form bean
     */
    public DayFormBean getMonday() {
        return mMonday;
    }

    /**
     * Update the form bean representing Monday for this week.
     *
     * @param value The new form bean
     */
    public void setMonday(DayFormBean value) {
        mMonday = value;
    }

    /**
     * Get the <code>DayFormBean</code> representing Tuesday.
     *
     * @return The form bean representing Tuesday for this week form bean
     */
    public DayFormBean getTuesday() {
        return mTuesday;
    }

    /**
     * Update the form bean representing Tuesday for this week.
     *
     * @param value The new form bean
     */
    public void setTuesday(DayFormBean value) {
        mTuesday = value;
    }

    /**
     * Get the <code>DayFormBean</code> representing Wednesday.
     *
     * @return The form bean representing Wednesday for this week form bean
     */
    public DayFormBean getWednesday() {
        return mWednesday;
    }

    /**
     * Update the form bean representing Wednesday for this week.
     *
     * @param value The new form bean
     */
    public void setWednesday(DayFormBean value) {
        mWednesday = value;
    }

    /**
     * Get the <code>DayFormBean</code> representing Thursday.
     *
     * @return The form bean representing Thursday for this week form bean
     */
    public DayFormBean getThursday() {
        return mThursday;
    }

    /**
     * Update the form bean representing Thursday for this week.
     *
     * @param value The new form bean
     */
    public void setThursday(DayFormBean value) {
        mThursday = value;
    }

    /**
     * Get the <code>DayFormBean</code> representing Friday.
     *
     * @return The form bean representing Friday for this week form bean
     */
    public DayFormBean getFriday() {
        return mFriday;
    }

    /**
     * Update the form bean representing Friday for this week.
     *
     * @param value The new form bean
     */
    public void setFriday(DayFormBean value) {
        mFriday = value;
    }

    /**
     * Get the <code>DayFormBean</code> representing Saturday.
     *
     * @return The form bean representing Saturday for this week form bean
     */
    public DayFormBean getSaturday() {
        return mSaturday;
    }

    /**
     * Update the form bean representing Saturday for this week.
     *
     * @param value The new form bean
     */
    public void setSaturday(DayFormBean value) {
        mSaturday = value;
    }

    /**
     * Get all of the day form beans associated with this week.  This will
     * return an unmodifiable list of length 7, with Sunday in the first
     * position and Saturday in the last position.
     *
     * @return The list of <code>DayFormBean</code>s
     */
    public List getDays() {
        List days = new ArrayList(ConstantValues.INT_DAYS_IN_A_WEEK);

        days.add(mSunday);
        days.add(mMonday);
        days.add(mTuesday);
        days.add(mWednesday);
        days.add(mThursday);
        days.add(mFriday);
        days.add(mSaturday);

        return Collections.unmodifiableList(days);
    }

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -