doc.walkthru
Class AlbumImpl

java.lang.Object
  extended by org.benow.security.SecureObject
      extended by org.benow.repository.util.PersistentObjectImpl
          extended by org.benow.repository.mapping.JSQLObject
              extended by doc.walkthru.AlbumImpl
All Implemented Interfaces:
Album, java.io.Serializable, java.lang.Comparable, org.benow.repository.util.PersistentObject

public class AlbumImpl
extends org.benow.repository.mapping.JSQLObject
implements Album

An album that is persisted in the repository. JSQLObject adds repository support, including key management and field fetching.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.benow.repository.mapping.JSQLObject
org.benow.repository.mapping.JSQLObject.XSQLVersionDesc, org.benow.repository.mapping.JSQLObject.XSQLVersioned
 
Nested classes/interfaces inherited from interface doc.walkthru.Album
Album.Format
 
Field Summary
 
Fields inherited from class org.benow.repository.util.PersistentObjectImpl
conn, recycled
 
Fields inherited from class org.benow.security.SecureObject
admin
 
Fields inherited from interface org.benow.repository.util.PersistentObject
FIELD_NAME_KEY
 
Constructor Summary
protected AlbumImpl()
          A zero parameter constructor is required by the repository.
  AlbumImpl(java.lang.String title, Performer artist)
           
 
Method Summary
 AlbumTrack addTrack(Track track)
          Add a track to the end of the tracks
 AlbumTrack addTrack(Track track, int pos)
          Add track at a given position
 Performer getArtist()
           
 Album.Format getFormat()
           
 java.util.Date getReleaseDate()
           
 java.lang.String getTitle()
           
 java.util.List<Track> getTracks()
           
 boolean isCompilation()
           
 void setTracks(Track[] tracks)
           
 java.lang.String toFullString()
           
 java.lang.String toString()
           
 
Methods inherited from class org.benow.repository.mapping.JSQLObject
fetchExpectedField, fetchField, fetchFieldQuiet, forgetField, isFetched, isLocked, lock, refetchFieldQuiet, setFetched
 
Methods inherited from class org.benow.repository.util.PersistentObjectImpl
compareTo, doIsTransient, equals, getKey, isTransient, recycle, remove, remove, repositoryAfterLoad, repositoryAfterPersist, repositoryAfterTransient, repositoryBeforePersist, repositoryBeforeTransient, setKey, update, update
 
Methods inherited from class org.benow.security.SecureObject
assertOnePermission, assertPermission, assertPermission, declarePermission, declareViewPermission, declareViewPermission
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlbumImpl

protected AlbumImpl()
A zero parameter constructor is required by the repository.


AlbumImpl

public AlbumImpl(java.lang.String title,
                 Performer artist)
Method Detail

getArtist

public Performer getArtist()
Specified by:
getArtist in interface Album
Returns:
the artist who has made this album, if null, the album is a compilation

getFormat

public Album.Format getFormat()
Specified by:
getFormat in interface Album
Returns:
the format of this album

getTitle

public java.lang.String getTitle()
Specified by:
getTitle in interface Album
Returns:
the title of the album

getReleaseDate

public java.util.Date getReleaseDate()
Specified by:
getReleaseDate in interface Album
Returns:
the release date for the album

getTracks

public java.util.List<Track> getTracks()
Specified by:
getTracks in interface Album
Returns:
the tracks on this album

addTrack

public AlbumTrack addTrack(Track track)
Add a track to the end of the tracks

Parameters:
track - track to add
Returns:
added track for this album

addTrack

public AlbumTrack addTrack(Track track,
                           int pos)
Add track at a given position

Parameters:
track - track to add
pos - position to add at
Returns:
added track for this album

isCompilation

public boolean isCompilation()
Specified by:
isCompilation in interface Album
Returns:
true if this album is a compilation

setTracks

public void setTracks(Track[] tracks)

toString

public java.lang.String toString()
Overrides:
toString in class org.benow.repository.util.PersistentObjectImpl

toFullString

public java.lang.String toFullString()