Class Clip


  • @Entity
    public class Clip
    extends java.lang.Object

    The Clip entity holds the data for each clip of music shared in the TuneFull server.

    Since:
    1.0
    Version:
    1.0
    Author:
    Robert Dominguez, Roderick Frechette, Laura Steiner
    • Constructor Summary

      Constructors 
      Constructor Description
      Clip()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlbum()
      Returns the name of the clip's album
      java.lang.String getArtist()
      Returns the name of the clip's artist
      long getBeginTimestamp()
      Returns the timestamp for the beginning of the clip
      java.util.Date getDateTimePosted()
      Returns the date and time that the clip was posted
      long getEndTimestamp()
      Returns the timestamp for the end of the clip
      java.lang.Long getId()
      Returns the clip's id.
      java.lang.String getSongTitle()
      Returns the title for the song the clip is from .
      java.lang.String getTrackKey()
      Returns the track key associated with the song on Spotify.
      User getUser()
      Returns the User who created the clip
      void setAlbum​(java.lang.String album)
      Sets the name of the clip's album
      void setArtist​(java.lang.String artist)
      Sets the name of the clip's artist
      void setBeginTimestamp​(long beginTimestamp)
      Sets the timestamp for the beginning of the clip
      void setEndTimestamp​(long endTimestamp)
      Sets the timestamp for the beginning of the clip
      void setSongTitle​(java.lang.String songTitle)
      Sets the title for the song the clip is from
      void setTrackKey​(java.lang.String trackKey)
      Sets the track key associated with the song on Spotify.
      void setUser​(User user)
      Sets the User who posted the clip
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Clip

        public Clip()
    • Method Detail

      • getId

        public java.lang.Long getId()
        Returns the clip's id.
        Returns:
      • getSongTitle

        @NonNull
        public java.lang.String getSongTitle()
        Returns the title for the song the clip is from .
        Returns:
      • setSongTitle

        public void setSongTitle​(@NonNull
                                 java.lang.String songTitle)
        Sets the title for the song the clip is from
        Parameters:
        songTitle - String
      • getArtist

        @NonNull
        public java.lang.String getArtist()
        Returns the name of the clip's artist
        Returns:
      • setArtist

        public void setArtist​(@NonNull
                              java.lang.String artist)
        Sets the name of the clip's artist
        Parameters:
        artist - String
      • getAlbum

        public java.lang.String getAlbum()
        Returns the name of the clip's album
        Returns:
      • setAlbum

        public void setAlbum​(java.lang.String album)
        Sets the name of the clip's album
        Parameters:
        album - String
      • getTrackKey

        @NonNull
        public java.lang.String getTrackKey()
        Returns the track key associated with the song on Spotify.
        Returns:
      • setTrackKey

        public void setTrackKey​(@NonNull
                                java.lang.String trackKey)
        Sets the track key associated with the song on Spotify.
        Parameters:
        trackKey - String
      • getBeginTimestamp

        public long getBeginTimestamp()
        Returns the timestamp for the beginning of the clip
        Returns:
      • setBeginTimestamp

        public void setBeginTimestamp​(long beginTimestamp)
        Sets the timestamp for the beginning of the clip
        Parameters:
        beginTimestamp - int
      • getEndTimestamp

        public long getEndTimestamp()
        Returns the timestamp for the end of the clip
        Returns:
      • setEndTimestamp

        public void setEndTimestamp​(long endTimestamp)
        Sets the timestamp for the beginning of the clip
        Parameters:
        endTimestamp - int
      • getDateTimePosted

        @NonNull
        public java.util.Date getDateTimePosted()
        Returns the date and time that the clip was posted
        Returns:
      • getUser

        @NonNull
        public User getUser()
        Returns the User who created the clip
        Returns:
      • setUser

        public void setUser​(@NonNull
                            User user)
        Sets the User who posted the clip
        Parameters:
        user - User