com.melloware.jukes.db.orm
Class Disc

java.lang.Object
  extended by com.jgoodies.binding.beans.Model
      extended by com.melloware.jukes.db.orm.AbstractJukesObject
          extended by com.melloware.jukes.db.orm.Disc
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, Auditable, java.io.Serializable, java.lang.Comparable

public final class Disc
extends AbstractJukesObject
implements Auditable, java.lang.Comparable

Business POJO representing an ALBUM.

Implements Auditable so that the user and date information is updated when this object is updated using a Hibernate Interceptor.

Copyright (c) 1999-2007 Melloware, Inc.

Version:
4.0
Author:
Emil A. Lefkof III
See Also:
Serialized Form

Field Summary
static java.lang.String PROPERTYNAME_ARTIST
           
static java.lang.String PROPERTYNAME_BITRATE
           
static java.lang.String PROPERTYNAME_COVER_SIZE
           
static java.lang.String PROPERTYNAME_COVER_URL
           
static java.lang.String PROPERTYNAME_CREATED_DATE
           
static java.lang.String PROPERTYNAME_CREATED_USER
           
static java.lang.String PROPERTYNAME_DURATION
           
static java.lang.String PROPERTYNAME_DURATION_TIME
           
static java.lang.String PROPERTYNAME_GENRE
           
static java.lang.String PROPERTYNAME_ID
           
static java.lang.String PROPERTYNAME_LOCATION
           
static java.lang.String PROPERTYNAME_MODIFIED_DATE
           
static java.lang.String PROPERTYNAME_MODIFIED_USER
           
static java.lang.String PROPERTYNAME_NAME
           
static java.lang.String PROPERTYNAME_NOTES
           
static java.lang.String PROPERTYNAME_YEAR
           
 
Fields inherited from class com.melloware.jukes.db.orm.AbstractJukesObject
childCount, newFile, NO_CHILDREN, valid
 
Constructor Summary
Disc()
          default constructor
Disc(java.lang.Long id)
          constructor with id
 
Method Summary
 void addTrack(Track track)
           
 int compareTo(java.lang.Object object)
           
 boolean equals(java.lang.Object obj)
           
 Artist getArtist()
           
 java.util.Date getAuditDate()
          This date determines how the NEW flag is checked in the isNew() function.
 java.lang.Long getBitrate()
           
 int getChildCount()
          This is used to fool the tree for lazy loading of tree nodes.
 long getCoverSize()
          Gets the coverSize.
 java.lang.String getCoverUrl()
           
 java.util.Date getCreatedDate()
          Method implemented in each ORM class.
 java.lang.String getCreatedUser()
           
 java.lang.String getDisplayText(java.lang.String aFormat)
          Gets the display format based on a format from prefs.
 long getDuration()
          Gets the duration.
 java.lang.String getDurationTime()
          Gets the durationTime.
 java.lang.String getGenre()
           
 java.lang.Long getId()
          All objects must implement a unique identifier.
 java.lang.String getLocation()
          Gets the location.
 java.util.Date getModifiedDate()
          Method implemented in each ORM class.
 java.lang.String getModifiedUser()
           
 java.lang.String getName()
          All objects must implement a name function to describe this object.
 java.lang.String getNotes()
          Gets the notes.
 java.util.Set getTracks()
           
 java.lang.String getYear()
          Returns the release year.
 int hashCode()
           
 boolean isValid()
          Gets the valid flag.
 void setArtist(Artist artist)
           
 void setBitrate(java.lang.Long aBitrate)
           
 void setCoverSize(long aCoverSize)
          Sets the coverSize.
 void setCoverUrl(java.lang.String coverUrl)
           
 void setCreatedDate(java.util.Date createdDate)
           
 void setCreatedUser(java.lang.String createdUser)
           
 void setDuration(long aDuration)
          Sets the duration.
 void setDurationTime(java.lang.String aDurationTime)
          Sets the durationTime.
 void setGenre(java.lang.String genre)
           
 void setId(java.lang.Long id)
           
 void setLocation(java.lang.String aLocation)
          Sets the location.
 void setModifiedDate(java.util.Date modifiedDate)
           
 void setModifiedUser(java.lang.String modifiedUser)
           
 void setName(java.lang.String name)
           
 void setNotes(java.lang.String aNotes)
          Sets the notes.
 void setTracks(java.util.Set tracks)
           
 void setYear(java.lang.String year)
          Sets the release year.
 java.lang.String toString()
           
 
Methods inherited from class com.melloware.jukes.db.orm.AbstractJukesObject
isNewFile, isNotValid, setChildCount, setNewFile, setValid
 
Methods inherited from class com.jgoodies.binding.beans.Model
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, equals, fireMulticastPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PROPERTYNAME_CREATED_DATE

public static final java.lang.String PROPERTYNAME_CREATED_DATE
See Also:
Constant Field Values

PROPERTYNAME_MODIFIED_DATE

public static final java.lang.String PROPERTYNAME_MODIFIED_DATE
See Also:
Constant Field Values

PROPERTYNAME_ID

public static final java.lang.String PROPERTYNAME_ID
See Also:
Constant Field Values

PROPERTYNAME_LOCATION

public static final java.lang.String PROPERTYNAME_LOCATION
See Also:
Constant Field Values

PROPERTYNAME_BITRATE

public static final java.lang.String PROPERTYNAME_BITRATE
See Also:
Constant Field Values

PROPERTYNAME_COVER_URL

public static final java.lang.String PROPERTYNAME_COVER_URL
See Also:
Constant Field Values

PROPERTYNAME_COVER_SIZE

public static final java.lang.String PROPERTYNAME_COVER_SIZE
See Also:
Constant Field Values

PROPERTYNAME_CREATED_USER

public static final java.lang.String PROPERTYNAME_CREATED_USER
See Also:
Constant Field Values

PROPERTYNAME_GENRE

public static final java.lang.String PROPERTYNAME_GENRE
See Also:
Constant Field Values

PROPERTYNAME_MODIFIED_USER

public static final java.lang.String PROPERTYNAME_MODIFIED_USER
See Also:
Constant Field Values

PROPERTYNAME_NAME

public static final java.lang.String PROPERTYNAME_NAME
See Also:
Constant Field Values

PROPERTYNAME_YEAR

public static final java.lang.String PROPERTYNAME_YEAR
See Also:
Constant Field Values

PROPERTYNAME_DURATION

public static final java.lang.String PROPERTYNAME_DURATION
See Also:
Constant Field Values

PROPERTYNAME_DURATION_TIME

public static final java.lang.String PROPERTYNAME_DURATION_TIME
See Also:
Constant Field Values

PROPERTYNAME_ARTIST

public static final java.lang.String PROPERTYNAME_ARTIST
See Also:
Constant Field Values

PROPERTYNAME_NOTES

public static final java.lang.String PROPERTYNAME_NOTES
See Also:
Constant Field Values
Constructor Detail

Disc

public Disc()
default constructor


Disc

public Disc(java.lang.Long id)
constructor with id

Method Detail

getArtist

public Artist getArtist()

getAuditDate

public java.util.Date getAuditDate()
This date determines how the NEW flag is checked in the isNew() function.

Specified by:
getAuditDate in class AbstractJukesObject
Returns:
the created date is used to check in the isNew() function

getBitrate

public java.lang.Long getBitrate()
Returns:
Returns the bitrate.

getChildCount

public int getChildCount()
This is used to fool the tree for lazy loading of tree nodes.

Specified by:
getChildCount in class AbstractJukesObject
Returns:
the number of children this object has

getCoverSize

public long getCoverSize()
Gets the coverSize.

Returns:
Returns the coverSize.

getCoverUrl

public java.lang.String getCoverUrl()

getCreatedDate

public java.util.Date getCreatedDate()
Description copied from class: AbstractJukesObject
Method implemented in each ORM class. This returns the audit created date.

Specified by:
getCreatedDate in interface Auditable
Specified by:
getCreatedDate in class AbstractJukesObject
Returns:
the created date

getCreatedUser

public java.lang.String getCreatedUser()
Specified by:
getCreatedUser in interface Auditable

getDisplayText

public java.lang.String getDisplayText(java.lang.String aFormat)
Gets the display format based on a format from prefs. The format is in aFormat and can have values %b forbitrate, %y for year, %r for running time, and %d for disc. Examples: %y -%d = 2005 - Guero

Parameters:
aFormat - the string format like %y -%d to rename 2005 - Guero
Returns:
the value of the display text

getDuration

public long getDuration()
Gets the duration.

Returns:
Returns the duration.

getDurationTime

public java.lang.String getDurationTime()
Gets the durationTime.

Returns:
Returns the durationTime.

getGenre

public java.lang.String getGenre()

getId

public java.lang.Long getId()
Description copied from class: AbstractJukesObject
All objects must implement a unique identifier.

Specified by:
getId in interface Auditable
Specified by:
getId in class AbstractJukesObject
Returns:
the id of the object

getLocation

public java.lang.String getLocation()
Gets the location.

Returns:
Returns the location.

getModifiedDate

public java.util.Date getModifiedDate()
Description copied from class: AbstractJukesObject
Method implemented in each ORM class. This returns the audit modified date.

Specified by:
getModifiedDate in interface Auditable
Specified by:
getModifiedDate in class AbstractJukesObject
Returns:
the modification date

getModifiedUser

public java.lang.String getModifiedUser()
Specified by:
getModifiedUser in interface Auditable

getName

public java.lang.String getName()
Description copied from class: AbstractJukesObject
All objects must implement a name function to describe this object.

Specified by:
getName in class AbstractJukesObject
Returns:
the name of the object

getNotes

public java.lang.String getNotes()
Gets the notes.

Returns:
Returns the notes.

getTracks

public java.util.Set getTracks()

getYear

public java.lang.String getYear()
Returns the release year.

Returns:
the release year

setArtist

public void setArtist(Artist artist)

setBitrate

public void setBitrate(java.lang.Long aBitrate)
Parameters:
aBitrate - The bitrate to set.

setCoverSize

public void setCoverSize(long aCoverSize)
Sets the coverSize.

Parameters:
aCoverSize - The coverSize to set.

setCoverUrl

public void setCoverUrl(java.lang.String coverUrl)

setCreatedDate

public void setCreatedDate(java.util.Date createdDate)
Specified by:
setCreatedDate in interface Auditable

setCreatedUser

public void setCreatedUser(java.lang.String createdUser)
Specified by:
setCreatedUser in interface Auditable

setDuration

public void setDuration(long aDuration)
Sets the duration.

Parameters:
aDuration - The duration to set.

setDurationTime

public void setDurationTime(java.lang.String aDurationTime)
Sets the durationTime.

Parameters:
aDurationTime - The durationTime to set.

setGenre

public void setGenre(java.lang.String genre)

setId

public void setId(java.lang.Long id)

setLocation

public void setLocation(java.lang.String aLocation)
Sets the location.

Parameters:
aLocation - The location to set.

setModifiedDate

public void setModifiedDate(java.util.Date modifiedDate)
Specified by:
setModifiedDate in interface Auditable

setModifiedUser

public void setModifiedUser(java.lang.String modifiedUser)
Specified by:
setModifiedUser in interface Auditable

setName

public void setName(java.lang.String name)

setNotes

public void setNotes(java.lang.String aNotes)
Sets the notes.

Parameters:
aNotes - The notes to set.

setTracks

public void setTracks(java.util.Set tracks)

setYear

public void setYear(java.lang.String year)
Sets the release year.

Parameters:
year - the year of this release

isValid

public boolean isValid()
Description copied from class: AbstractJukesObject
Gets the valid flag.

Specified by:
isValid in class AbstractJukesObject
Returns:
Returns the valid flag.

addTrack

public void addTrack(Track track)

compareTo

public int compareTo(java.lang.Object object)
Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1999-2008 Melloware Inc. All Rights Reserved.