org.aspsimon.termcomp.entity
Class TerminationProblem

java.lang.Object
  extended by org.aspsimon.termcomp.entity.TerminationProblem
All Implemented Interfaces:
java.io.Serializable, TPInterface
Direct Known Subclasses:
FPProgram, LPProgram, TRS

public abstract class TerminationProblem
extends java.lang.Object
implements java.io.Serializable, TPInterface

This class is the main parent class for the TerminationProblems.

Originally intended to be a generic TerminationProblem object. However, this proved almost impossible to combine all 4 classes of termination problems into one unified format, so this class was replaced with the TPInterface hierarchy.

This is the starting class for the "Single table per class hierarchy" representation documented here: reference/en/html/entity.html#d0e870 By having an abstract class implement the TPInterface interface, this remains backwards compatible with the database in termcomp 1.0, but should enable termcomp 2.0 to handle results and problem searches better.

Version:
$Revision: 116 $
Author:
Simon Bailey
See Also:
Serialized Form

Constructor Summary
TerminationProblem()
           
 
Method Summary
 User getApprovedBy()
          Get the User with database administrative rights who approved this termination problem.
 java.lang.String getOriginalFileName()
          Get the original filename of this Termination Problem where it is stored under /opt/competition/tpdb/.
 User getSubmittedBy()
          Get the User who submitted this termination problem.
 java.sql.Timestamp getSubmittedDate()
          Set the date and time this termination problem was originally submitted to the TPDB.
 java.lang.Long getTPId()
          Get the unique identifier for this Termination Problem.
 boolean isApproved()
          Determine whether this termination problem is approved for public consumption.
 boolean isRejected()
          Determines whether this termination problem passed the review process or not.
 boolean isSecret()
          Return the secret status of this problem.
 void prepersist()
          Hibernate lifecycle convenience method.
 void setApproved(boolean approved)
          Set the approval status of this problem.
 void setApprovedBy(User approvedBy)
          Set the User with administrative rights who approved this problem.
 void setOriginalFileName(java.lang.String originalFileName)
          Set the original filename of this Termination Problem
 void setRejected(boolean rejected)
          Set the rejected status of this problem.
 void setSecret(boolean secret)
          Set the secret status of this problem.
 void setSubmittedBy(User submittedBy)
          Set the User who submitted this problem.
 void setSubmittedDate(java.sql.Timestamp submittedDate)
          Set the date this problem was submitted to the TPDB.
 void setTPId(java.lang.Long tpId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.aspsimon.termcomp.entity.TPInterface
getType
 

Constructor Detail

TerminationProblem

public TerminationProblem()
Method Detail

getTPId

public java.lang.Long getTPId()
Description copied from interface: TPInterface
Get the unique identifier for this Termination Problem. As Hibernate maintains a single sequence for all managed database objects, this is guaranteed to be globally unique as long as the object was created through a hibernate session.

Specified by:
getTPId in interface TPInterface
Returns:
A DB-generated identifier for internally referencing this Termination Problem.

getOriginalFileName

public java.lang.String getOriginalFileName()
Get the original filename of this Termination Problem where it is stored under /opt/competition/tpdb/.

Specified by:
getOriginalFileName in interface TPInterface
Returns:
A path relative to /opt/competition/tpdb/.

isApproved

public boolean isApproved()
Determine whether this termination problem is approved for public consumption. Currently ignored.

Specified by:
isApproved in interface TPInterface
Returns:
A boolean value.

isRejected

public boolean isRejected()
Determines whether this termination problem passed the review process or not. Currently ignored.

Specified by:
isRejected in interface TPInterface
Returns:
A boolean value, default is false.

isSecret

public boolean isSecret()
Return the secret status of this problem.

Specified by:
isSecret in interface TPInterface
Returns:
Whether this problem is secret or not.

getSubmittedBy

public User getSubmittedBy()
Get the User who submitted this termination problem.

Specified by:
getSubmittedBy in interface TPInterface
Returns:
The User who submitted this problem.

getApprovedBy

public User getApprovedBy()
Get the User with database administrative rights who approved this termination problem. Currently unused.

Specified by:
getApprovedBy in interface TPInterface
Returns:
The User who approved this problem

getSubmittedDate

public java.sql.Timestamp getSubmittedDate()
Set the date and time this termination problem was originally submitted to the TPDB.

Specified by:
getSubmittedDate in interface TPInterface
Returns:
The date and time this problem was submitted.

setTPId

public void setTPId(java.lang.Long tpId)

setOriginalFileName

public void setOriginalFileName(java.lang.String originalFileName)
Set the original filename of this Termination Problem

Specified by:
setOriginalFileName in interface TPInterface
Parameters:
originalFileName - The file name relative to /opt/competition/tpdb/.

setApproved

public void setApproved(boolean approved)
Set the approval status of this problem. Currently unused.

Specified by:
setApproved in interface TPInterface
Parameters:
approved - A boolean value.

setRejected

public void setRejected(boolean rejected)
Set the rejected status of this problem. Currently unused.

Specified by:
setRejected in interface TPInterface
Parameters:
rejected - A boolean value.

setSecret

public void setSecret(boolean secret)
Set the secret status of this problem.

Specified by:
setSecret in interface TPInterface
Parameters:
secret - A boolean value representing whether this problem is secret or not.

setSubmittedBy

public void setSubmittedBy(User submittedBy)
Set the User who submitted this problem.

Specified by:
setSubmittedBy in interface TPInterface
Parameters:
submittedBy - The User who submitted the problem.

setApprovedBy

public void setApprovedBy(User approvedBy)
Set the User with administrative rights who approved this problem.

Specified by:
setApprovedBy in interface TPInterface
Parameters:
approvedBy - The User who approved this problem.

setSubmittedDate

public void setSubmittedDate(java.sql.Timestamp submittedDate)
Set the date this problem was submitted to the TPDB.

Specified by:
setSubmittedDate in interface TPInterface
Parameters:
submittedDate - The time and date this problem was originally submitted.

prepersist

public void prepersist()
Hibernate lifecycle convenience method.