Class EntityResultTask

  • All Implemented Interfaces:
    java.io.Serializable, IResultTask

    @Entity(name="ResultTask")
    public class EntityResultTask
    extends java.lang.Object
    implements IResultTask, java.io.Serializable
    IResultTask object for base storage implementation
    See Also:
    Serialized Form
    • Method Detail

      • addContainingBlock

        public void addContainingBlock​(ICodeBlockGroup blockGroup)
        Description copied from interface: IResultTask
        Adds a code block group found using the tasks detector which contains the file
        Specified by:
        addContainingBlock in interface IResultTask
        Parameters:
        blockGroup - code block group
      • addContainingBlock

        public void addContainingBlock​(java.util.Collection<ICodeBlockGroup> blockGroups)
        Description copied from interface: IResultTask
        Adds a collection of code block groups found using the tasks detector which all contain the file
        Specified by:
        addContainingBlock in interface IResultTask
        Parameters:
        blockGroups - collection of code block groups
      • addFileScore

        public void addFileScore​(ISourceFile file,
                                 float score)
        Description copied from interface: IResultTask
        Adds a score from the task of the instance file against another file
        Specified by:
        addFileScore in interface IResultTask
        Parameters:
        file - file score is against
        score - score value
      • getContainingBlocks

        public java.util.List<ICodeBlockGroup> getContainingBlocks()
        Description copied from interface: IResultTask
        Fetches the list of code block groups from the detector which feature the instance file
        Specified by:
        getContainingBlocks in interface IResultTask
        Returns:
        list of groups
      • getFileScores

        public java.util.Map<ISourceFile,​java.lang.Float> getFileScores()
        Description copied from interface: IResultTask
        Returns the full map of stored file vs instance file score for the task
        Specified by:
        getFileScores in interface IResultTask
        Returns:
        map of scores
      • getTask

        public ITask getTask()
        Description copied from interface: IResultTask
        Get the task this objects stores results for
        Specified by:
        getTask in interface IResultTask
        Returns:
        Task instance
      • getTaskScore

        public float getTaskScore()
        Description copied from interface: IResultTask
        Fetches the overall aggregate score for the instance file for the task
        Specified by:
        getTaskScore in interface IResultTask
        Returns:
        score
      • setTaskScore

        public void setTaskScore​(float score)
        Description copied from interface: IResultTask
        Sets the overall aggregate score for the instance file for the task
        Specified by:
        setTaskScore in interface IResultTask
        Parameters:
        score - score to set