doc.walkthru
Class AlbumImpl
java.lang.Object
org.benow.security.SecureObject
org.benow.repository.util.PersistentObjectImpl
org.benow.repository.mapping.JSQLObject
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 classes/interfaces inherited from class org.benow.repository.mapping.JSQLObject |
org.benow.repository.mapping.JSQLObject.XSQLVersionDesc, org.benow.repository.mapping.JSQLObject.XSQLVersioned |
| 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)
|
| 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 |
AlbumImpl
protected AlbumImpl()
- A zero parameter constructor is required by the repository.
AlbumImpl
public AlbumImpl(java.lang.String title,
Performer artist)
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 addpos - 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()