com.virtuosotechnologies.asaph.model
Interface SongIDResultSet

All Superinterfaces:
Collection, Set

public interface SongIDResultSet
extends Set

A result set of SongIDs


Nested Class Summary
static interface SongIDResultSet.Entry
          Interface representing an entry in the set.
 
Method Summary
 void clearSongCache()
          Clear the song caches for all entries in the set.
 SongIDResultSet createLinkedCopy()
          Create a copy of this result set that is linked to this one.
 SongDatabase getDatabase()
          Get the SongDatabase that created this result set.
 Collection getEntryCollection()
          Get an immutable collection view of the entries in the set.
 SongIDResultSet.Entry getEntryFor(SongID songID)
          Get the data associated with the given SongID.
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

createLinkedCopy

public SongIDResultSet createLinkedCopy()
Create a copy of this result set that is linked to this one. A linked copy shares the song cache of the original. In addition, its initial data values are the same as the data for the original; however, the data can later be changed independent of the original.

Returns:
copy of this result set

getDatabase

public SongDatabase getDatabase()
Get the SongDatabase that created this result set.

Returns:
SongDatabase

getEntryFor

public SongIDResultSet.Entry getEntryFor(SongID songID)
Get the data associated with the given SongID.

Parameters:
songID - SongID to query
Returns:
the entry for this songID, or null if there isn't one.

getEntryCollection

public Collection getEntryCollection()
Get an immutable collection view of the entries in the set. Each item in the collection is an Entry object.

Returns:
Collection of Entry objects

clearSongCache

public void clearSongCache()
Clear the song caches for all entries in the set. Note that if this result set is linked to any others, all the song caches will be cleared.