com.melloware.jukes.db.orm
Class Track

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.Track
All Implemented Interfaces:
com.jgoodies.binding.beans.Observable, Auditable, Serializable, Comparable

public final class Track
extends AbstractJukesObject
implements Auditable, Comparable

Business POJO representing an TRACK.

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 String PROPERTYNAME_BITRATE
           
static String PROPERTYNAME_COMMENT
           
static String PROPERTYNAME_CREATED_DATE
           
static String PROPERTYNAME_CREATED_USER
           
static String PROPERTYNAME_DURATION
           
static String PROPERTYNAME_DURATION_TIME
           
static String PROPERTYNAME_ID
           
static String PROPERTYNAME_MODIFIED_DATE
           
static String PROPERTYNAME_MODIFIED_USER
           
static String PROPERTYNAME_NAME
           
static String PROPERTYNAME_TRACK_NUMBER
           
static String PROPERTYNAME_TRACK_SIZE
           
static String PROPERTYNAME_TRACK_URL
           
 
Fields inherited from class com.melloware.jukes.db.orm.AbstractJukesObject
childCount, newFile, NO_CHILDREN, valid
 
Constructor Summary
Track()
          default constructor
Track(Long id)
          constructor with id
 
Method Summary
 int compareTo(Object object)
           
 boolean equals(Object obj)
           
 Date getAuditDate()
          This date determines how the NEW flag is checked in the isNew() function.
 Long getBitrate()
           
 int getChildCount()
          This is used to fool the tree for lazy loading of tree nodes.
 String getComment()
          Gets the comment.
 Date getCreatedDate()
          Method implemented in each ORM class.
 String getCreatedUser()
           
 Disc getDisc()
           
 String getDisplayText(String aFormat)
          Gets the display format based on a format from prefs.
 long getDuration()
           
 String getDurationTime()
           
 Long getId()
          All objects must implement a unique identifier.
 Date getModifiedDate()
          Method implemented in each ORM class.
 String getModifiedUser()
           
 String getName()
          All objects must implement a name function to describe this object.
 String getTrackNumber()
           
 long getTrackSize()
          Gets the trackSize.
 String getTrackUrl()
           
 int hashCode()
           
 boolean isValid()
          Gets the valid flag.
 void setBitrate(Long bitrate)
           
 void setComment(String aComment)
          Sets the comment.
 void setCreatedDate(Date createdDate)
           
 void setCreatedUser(String createdUser)
           
 void setDisc(Disc disc)
           
 void setDuration(long duration)
           
 void setDurationTime(String durationTime)
           
 void setId(Long id)
           
 void setModifiedDate(Date modifiedDate)
           
 void setModifiedUser(String modifiedUser)
           
 void setName(String name)
           
 void setTrackNumber(String trackNumber)
           
 void setTrackSize(long aTrackSize)
          Sets the trackSize.
 void setTrackUrl(String trackUrl)
           
 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, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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 String PROPERTYNAME_CREATED_DATE
See Also:
Constant Field Values

PROPERTYNAME_MODIFIED_DATE

public static final String PROPERTYNAME_MODIFIED_DATE
See Also:
Constant Field Values

PROPERTYNAME_DURATION

public static final String PROPERTYNAME_DURATION
See Also:
Constant Field Values

PROPERTYNAME_ID

public static final String PROPERTYNAME_ID
See Also:
Constant Field Values

PROPERTYNAME_BITRATE

public static final String PROPERTYNAME_BITRATE
See Also:
Constant Field Values

PROPERTYNAME_COMMENT

public static final String PROPERTYNAME_COMMENT
See Also:
Constant Field Values

PROPERTYNAME_CREATED_USER

public static final String PROPERTYNAME_CREATED_USER
See Also:
Constant Field Values

PROPERTYNAME_DURATION_TIME

public static final String PROPERTYNAME_DURATION_TIME
See Also:
Constant Field Values

PROPERTYNAME_MODIFIED_USER

public static final String PROPERTYNAME_MODIFIED_USER
See Also:
Constant Field Values

PROPERTYNAME_NAME

public static final String PROPERTYNAME_NAME
See Also:
Constant Field Values

PROPERTYNAME_TRACK_NUMBER

public static final String PROPERTYNAME_TRACK_NUMBER
See Also:
Constant Field Values

PROPERTYNAME_TRACK_URL

public static final String PROPERTYNAME_TRACK_URL
See Also:
Constant Field Values

PROPERTYNAME_TRACK_SIZE

public static final String PROPERTYNAME_TRACK_SIZE
See Also:
Constant Field Values
Constructor Detail

Track

public Track()
default constructor


Track

public Track(Long id)
constructor with id

Method Detail

getAuditDate

public 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 Long getBitrate()

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

getComment

public String getComment()
Gets the comment.

Returns:
Returns the comment.

getCreatedDate

public 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 String getCreatedUser()
Specified by:
getCreatedUser in interface Auditable

getDisc

public Disc getDisc()

getDisplayText

public String getDisplayText(String aFormat)
Gets the display format based on a format from prefs. The format is in aFormat and can have values %b for bitrate, %n for track number, %r for duration, and %t for title. Examples: %n -%t = 01 - Track.mp3

Parameters:
aFormat - the string format like %n -%t to display 01 - Track.mp3
Returns:
the value of the display text

getDuration

public long getDuration()

getDurationTime

public String getDurationTime()

getId

public 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

getModifiedDate

public 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 String getModifiedUser()
Specified by:
getModifiedUser in interface Auditable

getName

public 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

getTrackNumber

public String getTrackNumber()

getTrackSize

public long getTrackSize()
Gets the trackSize.

Returns:
Returns the trackSize.

getTrackUrl

public String getTrackUrl()

setBitrate

public void setBitrate(Long bitrate)

setComment

public void setComment(String aComment)
Sets the comment.

Parameters:
aComment - The comment to set.

setCreatedDate

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

setCreatedUser

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

setDisc

public void setDisc(Disc disc)

setDuration

public void setDuration(long duration)

setDurationTime

public void setDurationTime(String durationTime)

setId

public void setId(Long id)

setModifiedDate

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

setModifiedUser

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

setName

public void setName(String name)

setTrackNumber

public void setTrackNumber(String trackNumber)

setTrackSize

public void setTrackSize(long aTrackSize)
Sets the trackSize.

Parameters:
aTrackSize - The trackSize to set.

setTrackUrl

public void setTrackUrl(String trackUrl)

isValid

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

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

compareTo

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

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


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