org.aspsimon.termcomp.entity
Class Competition

java.lang.Object
  extended by org.aspsimon.termcomp.entity.Competition
All Implemented Interfaces:
java.io.Serializable

public class Competition
extends java.lang.Object
implements java.io.Serializable

This class represents an instance of a competition which is to be run by the batch processing component. Inaptly named, as this is now also a container object for tests and will also be the container for personalised experiments.

Version:
$Revision: 111 $
Author:
binabik
See Also:
Serialized Form

Constructor Summary
Competition()
           
 
Method Summary
 java.lang.Long getCompetitionId()
          Get the unique identifier for this Competition.
 java.lang.Boolean getPublished()
          Determines whether this competition is shown in the list of public competitions.
 java.sql.Date getStartDate()
          Get the date this competition will start/started on.
 java.util.List<TerminationProblem> getTermprobs()
          Deprecated. since Revision 81, as this is not used.
 ToolImplementation getTestedImplementation()
          If this is an automated test-run, this field contains the ToolImplementation that was tested.
 java.lang.Boolean getTestRun()
          Determines whether this is an automated test-run.
 java.util.List<ToolImplementation> getTools()
          Get the list of Tools entered into this competition.
 void setCompetitionId(java.lang.Long competitionId)
          Set the unique identifier for this Competition.
 void setPublished(java.lang.Boolean published)
          Set whether to display this competition in the list of public competitions.
 void setStartDate(java.sql.Date startDate)
          Set the date the execution of this competition started on.
 void setTermprobs(java.util.List<TerminationProblem> termprobs)
          Deprecated. Since Revision 81, as this is not actually used.
 void setTestedImplementation(ToolImplementation testedImplementation)
          Set the ToolImplementation this test-run was executed for.
 void setTestRun(java.lang.Boolean testRun)
          Set whether this competition is actually an automated test-run.
 void setTools(java.util.List<ToolImplementation> tools)
          Set the list of Tools participating in this competition.
 java.lang.String toString()
          An almost human-readable representation of this competition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Competition

public Competition()
Method Detail

getCompetitionId

public java.lang.Long getCompetitionId()
Get the unique identifier for this Competition.

Returns:
A DB-generated identifier for internally referencing this Competition. Globally unique.

getStartDate

public java.sql.Date getStartDate()
Get the date this competition will start/started on.

Returns:
The date this competition will start/started on.

getTools

public java.util.List<ToolImplementation> getTools()
Get the list of Tools entered into this competition. As only a single implementation of any given Tool can take part in the competition, this is a List of ToolImplementations rather than Tools.

Returns:
The list of ToolImplementations entered in this competition.

getTermprobs

public java.util.List<TerminationProblem> getTermprobs()
Deprecated. since Revision 81, as this is not used.

Return the list of problems selected for this competition. This list is created by the competition manager in advance. It may make sense to split this list into categories of problems; this will be seen during implementation. THIS FIELD WILL PROBABLY BE REMOVED IN THE NEAR FUTURE

Returns:
The list of termination problems for the competition.

getPublished

public java.lang.Boolean getPublished()
Determines whether this competition is shown in the list of public competitions. This allows the host to run full test runs without the results being publicised. This also allows a competition to function as a test-run and in future as a container for personalised experiments.

Returns:
The published state.

getTestRun

public java.lang.Boolean getTestRun()
Determines whether this is an automated test-run. Could be used in combination with getPublished() to publicise teams' automated test results.

Returns:
Whether this Competition object is an automated test-run.

getTestedImplementation

public ToolImplementation getTestedImplementation()
If this is an automated test-run, this field contains the ToolImplementation that was tested.

Returns:
The tested ToolImplementation

setCompetitionId

public void setCompetitionId(java.lang.Long competitionId)
Set the unique identifier for this Competition. Must be globally unique, otherwise the database will complain heavily. There is normally no need to actually use this call in normal programming.

Parameters:
competitionId - The globally unique identifier for this Competition.

setStartDate

public void setStartDate(java.sql.Date startDate)
Set the date the execution of this competition started on. Should be extended to also include the time.

Parameters:
startDate - The date execution of the competition started.

setTools

public void setTools(java.util.List<ToolImplementation> tools)
Set the list of Tools participating in this competition.

Parameters:
tools - The list of ToolImplementations competing.

setTermprobs

public void setTermprobs(java.util.List<TerminationProblem> termprobs)
Deprecated. Since Revision 81, as this is not actually used.

Set the list of termination problems this competition will run on. This field will probably be removed in the near future.

Parameters:
termprobs - The list of termination problems.
See Also:
getTermprobs()

setPublished

public void setPublished(java.lang.Boolean published)
Set whether to display this competition in the list of public competitions.

Parameters:
published - A boolean value.

setTestRun

public void setTestRun(java.lang.Boolean testRun)
Set whether this competition is actually an automated test-run.

Parameters:
testRun - A boolean value.

setTestedImplementation

public void setTestedImplementation(ToolImplementation testedImplementation)
Set the ToolImplementation this test-run was executed for.

Parameters:
testedImplementation - The ToolImplementation which will be tested.

toString

public java.lang.String toString()
An almost human-readable representation of this competition.

Overrides:
toString in class java.lang.Object
Returns:
A string denoting whether this competition is a test-run or a competition as well as the date started and the internal id.