## org.apache.myfaces.custom.schedule.model
Interface ScheduleModel

All Known Implementing Classes:
  AbstractScheduleModel

public interface ScheduleModel

The underlying model of the UISchedule component. You should implement this interface when creating real implementations, which would typically be backed by a database.

Version:
  $Revision$
Author:
  Jurgen Lust (latest modification by $Author$)

Field Summary
`static int` `DAY`
`static int` `MONTH`
`static int` `WEEK`
`static int` `WORKWEEK`

Method Summary
`boolean` `containsDate(java.util.Date date)` Check if the schedule contains the specified date
`java.lang.Object` `get(int index)` Get the day at position index.
`int` `getMode()`
`java.util.Date` `getSelectedDate()`
`ScheduleEntry` `getSelectedEntry()`
`boolean` `isEmpty()`
`java.util.Iterator` `iterator()`
`void` `setMode(int mode)`
`void` `setSelectedDate(java.util.Date date)`
`void` `setSelectedEntry(ScheduleEntry selectedEntry)`
`int` `size()`

Field Detail

### DAY

    public static final int DAY

See Also:
  Constant Field Values

### WORKWEEK

    public static final int WORKWEEK

See Also:
  Constant Field Values

### WEEK

    public static final int WEEK

See Also:
  Constant Field Values

### MONTH

    public static final int MONTH

See Also:
  Constant Field Values

Method Detail

### isEmpty

    public boolean isEmpty()

  Returns:
    true if there are no entries

### setMode

    public void setMode(int mode)

  Parameters:
    `mode` - the mode: DAY, WORKWEEK, WEEK or MONTH

### getMode

    public int getMode()

  Returns:
    the mode: DAY, WORKWEEK, WEEK or MONTH

### setSelectedDate

    public void setSelectedDate(java.util.Date date)

  Parameters:
    `date` - the date to select

### getSelectedDate

    public java.util.Date getSelectedDate()

  Returns:
    the selected date

### setSelectedEntry

    public void setSelectedEntry(ScheduleEntry selectedEntry)

  Parameters:
    `selectedEntry` - the entry to select

### getSelectedEntry

    public ScheduleEntry getSelectedEntry()

  Returns:
    the selected entry

### containsDate

    public boolean containsDate(java.util.Date date)

  Check if the schedule contains the specified date

  Parameters:
    `date` - the date to check
  Returns:
    whether the schedule containts this date

### get

    public java.lang.Object get(int index)

  Get the day at position index.

  Parameters:
    `index` - the index
  Returns:
    the day

### iterator

    public java.util.Iterator iterator()

  Returns:
    an iterator for the days

### size

    public int size()

  Returns:
    the number of days in this model