KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > song > SongCollection


1 package song;
2
3 // $Id: song.SongCollection.java,v 1.2 2002/07/18 09:08:03 per_nyfelt Exp $
4

5
6
7 import org.ozoneDB.OzoneRemote;
8
9 import java.util.AbstractMap JavaDoc;
10
11 /**
12  * The external interface of the database object song.SongCollection
13  * A song.SongCollection is the catalog of songs an artist plays.
14  *
15  * NOTE: Maybe this should be based on an Ozone collection...
16  *
17  * @version $Revision: 1.2 $ $Date: 2002/07/18 09:08:03 $
18  * @author James Stiefel
19  */

20 public interface SongCollection extends OzoneRemote {
21     /**
22      * Retrieves the object's unique (database) Handle
23      *
24      * @return the object handle
25      */

26     public String JavaDoc handle();
27
28     /**
29      * Adds a song.Song to the song.SongCollection
30      * You can add a song.Song with whatever title you choose.
31      * We suggest using it's own title.
32      * "Nicknames" (multiple entries for the same song) may work,
33      * but they may cause problems too (especially in MasterCollection).
34      *
35      */

36     public void addSong(String JavaDoc title, Song song) throws Exception JavaDoc ; /*update*/
37
38
39     /**
40      * Deletes a song.Song from the song.SongCollection
41      *
42      */

43     public Song deleteSong(String JavaDoc title); /*update*/
44
45     /**
46      * Finds a song in song.SongCollection
47      *
48      */

49     public Song findSong(String JavaDoc song_title);
50
51     /**
52      * Returns the collection of songs in the song.SongCollection.
53      * Modifications to that collection ought to be reflected
54      * in this song.SongCollection, but one should make changes to the
55      * song.SongCollection to ensure they persist.
56      */

57     public AbstractMap JavaDoc getAllSongs();
58 }
59
Popular Tags