Class ListTrack

  • All Implemented Interfaces:
    Track

    public class ListTrack
    extends TrackAbstract
    Class to represent the track for the lists objects. The track contains the type, the count of the items, the way used to build the list.
    Author:
    dbutano
    • Constructor Detail

      • ListTrack

        public ListTrack​(java.lang.String type,
                         int count,
                         ListBuildMode buildMode,
                         ListTrackerEvent event,
                         java.lang.String username,
                         java.lang.String sessionIdentifier,
                         java.sql.Timestamp timestamp)
        Parameters:
        type - the class type of items contained into the list
        count - number of items contained into the list
        buildMode - the way the list is built
        event - type of event to track (creation or list execution )
        username - user who created list
        sessionIdentifier - session
        timestamp - time stamp
      • ListTrack

        public ListTrack​(java.lang.String type,
                         int count,
                         ListBuildMode buildMode,
                         ListTrackerEvent event)
        Parameters:
        type - the class type of items contained into the list
        count - number of items contained into the list
        buildMode - the way the list is built
        event - type of event to track (creation or list execution )
    • Method Detail

      • validate

        public boolean validate()
        Validate the track before saving into the database
        Returns:
        true if the track is valid
      • getFormattedTrack

        public java.lang.Object[] getFormattedTrack()
        Return the track formatted into an array of String to be saved in the database
        Returns:
        Object[] an array of Objects
      • getType

        public java.lang.String getType()
        Return the class type of items contained into the list
        Returns:
        String the class type
      • getCount

        public int getCount()
        Return the number of items contained into the list
        Returns:
        int the number of items
      • getBuildMode

        public ListBuildMode getBuildMode()
        Return the way the list is built
        Returns:
        ListBuildMode
      • getEvent

        public ListTrackerEvent getEvent()
        Return the type of event to track (creation or list execution )
        Returns:
        ListTrackerEvent the event
      • getTableName

        public java.lang.String getTableName()
        Return the table name where the track has to be saved
        Returns:
        String the table name