org.stanwood.media.store.memory
Class CacheSeason

java.lang.Object
  extended by org.stanwood.media.model.Season
      extended by org.stanwood.media.store.memory.CacheSeason
All Implemented Interfaces:
ISeason

public class CacheSeason
extends Season

A cached version of the season object for storing the details in memory


Constructor Summary
CacheSeason(CacheShow show, ISeason season)
          Used to cache season information
 
Method Summary
 void addEpisode(IEpisode episode)
          Adds a episode to the season
 void addSepcial(Episode episode)
          Add a special episode too the season
 IEpisode getEpisode(int episodeNum)
          Used to get a episode with a given episode number
 int getEpisodeCount()
          Gets the number of episode's in the season
 java.util.Collection<IEpisode> getEpisodes()
          Get all the episodes in the season
 int getSeasonNumber()
          Get the number of the season
 IShow getShow()
          Get the show the season belongs too
 IEpisode getSpecial(int specialNumber)
          Used to get a special episode with a given episode number
 java.util.List<IEpisode> getSpecials()
          Get all the special episodes in the season
 java.net.URL getURL()
          Used to get the episode listing URL for the season
 void setURL(java.net.URL url)
          Sets the episode listing URL for the season
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheSeason

public CacheSeason(CacheShow show,
                   ISeason season)
Used to cache season information

Parameters:
show - The cached version of the show
season - The season to cache
Method Detail

getEpisode

public IEpisode getEpisode(int episodeNum)
Used to get a episode with a given episode number

Parameters:
episodeNum - The episode number of the episode to fetch
Returns:
The episode

getSpecial

public IEpisode getSpecial(int specialNumber)
Used to get a special episode with a given episode number

Parameters:
specialNumber - The special episode number of the episode to fetch
Returns:
The special episode

getEpisodes

public java.util.Collection<IEpisode> getEpisodes()
Get all the episodes in the season

Returns:
The episodes in the season

addSepcial

public void addSepcial(Episode episode)
Add a special episode too the season

Parameters:
episode - The special episode too add

getSpecials

public java.util.List<IEpisode> getSpecials()
Get all the special episodes in the season

Returns:
The special episodes in the season

addEpisode

public void addEpisode(IEpisode episode)
Adds a episode to the season

Parameters:
episode - The episode to add to the season

getEpisodeCount

public int getEpisodeCount()
Gets the number of episode's in the season

Returns:
The number of episodes in the season

getURL

public java.net.URL getURL()
Used to get the episode listing URL for the season

Specified by:
getURL in interface ISeason
Overrides:
getURL in class Season
Returns:
The episode listing URL for the season

setURL

public void setURL(java.net.URL url)
Sets the episode listing URL for the season

Specified by:
setURL in interface ISeason
Overrides:
setURL in class Season
Parameters:
url - The episode listing URL for the season

getSeasonNumber

public int getSeasonNumber()
Get the number of the season

Specified by:
getSeasonNumber in interface ISeason
Overrides:
getSeasonNumber in class Season
Returns:
The season number

getShow

public IShow getShow()
Get the show the season belongs too

Specified by:
getShow in interface ISeason
Overrides:
getShow in class Season
Returns:
The show the season belongs too