edu.sdsc.inca.depot.persistent
Class SeriesConfig

java.lang.Object
  extended by edu.sdsc.inca.depot.persistent.PersistentObject
      extended by edu.sdsc.inca.depot.persistent.SeriesConfig

public class SeriesConfig
extends PersistentObject

A SeriesConfig Represents the configuration of a Series as part of a Suite.


Field Summary
 
Fields inherited from class edu.sdsc.inca.depot.persistent.PersistentObject
DB_EMPTY_STRING, logger, MAX_DB_LONG_STRING_LENGTH, MAX_DB_STRING_LENGTH
 
Constructor Summary
SeriesConfig()
          Default constructor.
SeriesConfig(Suite suite, Series series)
          Full constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares another object to this SeriesConfig for logical equality.
 SeriesConfig fromBean(edu.sdsc.inca.dataModel.util.SeriesConfig sc)
          Copies information from an Inca schema XmlBean SeriesConfig object so that this object contains equivalent information.
 PersistentObject fromBean(org.apache.xmlbeans.XmlObject o)
          Copies information from an Inca schema XmlBean SeriesConfig object so that this object contains equivalent information.
static SeriesConfig generate(java.lang.String resource, java.lang.String context, int args)
          Returns a phony SeriesConfig with a given resource and context.
 AcceptedOutput getAcceptedOutput()
          Returns comparison and action information for this SeriesConfig.
 java.lang.String getAction()
          Gets the editing action associated with this SeriesConfig.
 int getActivated()
          Returns the version number of the Suite under which this SeriesConfig was most recently activated (i.e., its Series was running); -1 if none.
 int getDeactivated()
          Returns the version number of the Suite under which this SeriesConfig was most recently deactivated (i.e., its Series was suspended); -1 if none.
 java.lang.Long getId()
          Retrieve the id -- null if not yet connected to database.
 java.lang.Long getLatestComparisonId()
          Returns the DB id of the latest ComprisonResult associated with this SeriesConfig; -1 if none.
 java.lang.Long getLatestInstanceId()
          Returns the DB id of the latest InstanceInfo associated with this SeriesConfig; -1 if none.
 Limits getLimits()
          Returns the resource limits for this SeriesConfig.
 java.lang.String getNickname()
          Get the user-supplied SeriesConfig nickname.
 Schedule getSchedule()
          Returns the execution schedule for this SeriesConfig.
 Series getSeries()
          Returns the Series associated with this SeriesConfig.
 Suite getSuite()
          Returns the Suite associated with this SeriesConfig.
 void setAcceptedOutput(AcceptedOutput ao)
          Sets comparison and action information for this SeriesConfig.
 void setAction(java.lang.String action)
          Sets the editing action associated with this SeriesConfig.
 void setActivated(int version)
          Sets the version number of the Suite under which this SeriesConfig was most recently activated (i.e., its Series was running); -1 if none.
 void setDeactivated(int version)
          Sets the version number of the Suite under which this SeriesConfig was most recently deactivated (i.e., its Series was suspended); -1 if none.
protected  void setId(java.lang.Long id)
          Set the id.
 void setLatestComparisonId(java.lang.Long id)
          Sets the DB id of the latest ComparisonResult associated with this SeriesConfig; -1 if none.
 void setLatestInstanceId(java.lang.Long id)
          Sets the DB id of the latest InstanceInfo associated with this SeriesConfig; -1 if none.
 void setLimits(Limits l)
          Sets the resource limits for this SeriesConfig.
 void setNickname(java.lang.String nickname)
          Set the user-supplied SeriesConfig nickname.
 void setSchedule(Schedule s)
          Sets the execution schedule for this SeriesConfig.
 void setSeries(Series s)
          Sets the Series associated with this SeriesConfig.
 void setSuite(Suite s)
          Sets the Suite associated with this SeriesConfig.
 org.apache.xmlbeans.XmlObject toBean()
          Returns a Inca schema XmlBean SeriesConfig object that contains information equivalent to this object.
 java.lang.String toString()
          Returns a string representation of this SeriesConfig.
 
Methods inherited from class edu.sdsc.inca.depot.persistent.PersistentObject
toXml, truncate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SeriesConfig

public SeriesConfig()
Default constructor.


SeriesConfig

public SeriesConfig(Suite suite,
                    Series series)
Full constructor.

Method Detail

fromBean

public PersistentObject fromBean(org.apache.xmlbeans.XmlObject o)
Copies information from an Inca schema XmlBean SeriesConfig object so that this object contains equivalent information.

Specified by:
fromBean in class PersistentObject
Parameters:
o - the XmlBean SeriesConfig object to copy
Returns:
this, for convenience

fromBean

public SeriesConfig fromBean(edu.sdsc.inca.dataModel.util.SeriesConfig sc)
Copies information from an Inca schema XmlBean SeriesConfig object so that this object contains equivalent information.

Parameters:
sc - the XmlBean SeriesConfig object to copy
Returns:
this, for convenience

getId

public java.lang.Long getId()
Retrieve the id -- null if not yet connected to database.

Returns:
The Long representation of the DB ID

setId

protected void setId(java.lang.Long id)
Set the id. Hibernate use only.

Parameters:
id - The DB ID.

getActivated

public int getActivated()
Returns the version number of the Suite under which this SeriesConfig was most recently activated (i.e., its Series was running); -1 if none.

Returns:
the activating Suite version number

setActivated

public void setActivated(int version)
Sets the version number of the Suite under which this SeriesConfig was most recently activated (i.e., its Series was running); -1 if none.

Parameters:
version - the activating Suite version number

getDeactivated

public int getDeactivated()
Returns the version number of the Suite under which this SeriesConfig was most recently deactivated (i.e., its Series was suspended); -1 if none.

Returns:
the deactivating Suite version number

setDeactivated

public void setDeactivated(int version)
Sets the version number of the Suite under which this SeriesConfig was most recently deactivated (i.e., its Series was suspended); -1 if none.

Parameters:
version - the deactivating Suite version number

getNickname

public java.lang.String getNickname()
Get the user-supplied SeriesConfig nickname.

Returns:
the SeriesConfig nickname

setNickname

public void setNickname(java.lang.String nickname)
Set the user-supplied SeriesConfig nickname.

Parameters:
nickname - the SeriesConfig nickname

getLimits

public Limits getLimits()
Returns the resource limits for this SeriesConfig.

Returns:
the resource limits

setLimits

public void setLimits(Limits l)
Sets the resource limits for this SeriesConfig.

Parameters:
l - the resource limits

getAcceptedOutput

public AcceptedOutput getAcceptedOutput()
Returns comparison and action information for this SeriesConfig.

Returns:
the comparison and action information

setAcceptedOutput

public void setAcceptedOutput(AcceptedOutput ao)
Sets comparison and action information for this SeriesConfig.

Parameters:
ao - the comparison and action information

getSchedule

public Schedule getSchedule()
Returns the execution schedule for this SeriesConfig.

Returns:
the execution schedule

setSchedule

public void setSchedule(Schedule s)
Sets the execution schedule for this SeriesConfig.

Parameters:
s - the execution schedule

getSuite

public Suite getSuite()
Returns the Suite associated with this SeriesConfig.

Returns:
the associated Suite

setSuite

public void setSuite(Suite s)
Sets the Suite associated with this SeriesConfig. Used by Suite.addSeriesConfig to take ownership of the SeriesConfig.

Parameters:
s - the associated Suite

getSeries

public Series getSeries()
Returns the Series associated with this SeriesConfig.

Returns:
the associated Series

setSeries

public void setSeries(Series s)
Sets the Series associated with this SeriesConfig.

Parameters:
s - the associated Series

getLatestInstanceId

public java.lang.Long getLatestInstanceId()
Returns the DB id of the latest InstanceInfo associated with this SeriesConfig; -1 if none.

Returns:
the latest instance DB id

setLatestInstanceId

public void setLatestInstanceId(java.lang.Long id)
Sets the DB id of the latest InstanceInfo associated with this SeriesConfig; -1 if none.

Parameters:
id - the latest instance DB id

getLatestComparisonId

public java.lang.Long getLatestComparisonId()
Returns the DB id of the latest ComprisonResult associated with this SeriesConfig; -1 if none.

Returns:
the latest comparison DB id

setLatestComparisonId

public void setLatestComparisonId(java.lang.Long id)
Sets the DB id of the latest ComparisonResult associated with this SeriesConfig; -1 if none.

Parameters:
id - the latest comparison DB id

getAction

public java.lang.String getAction()
Gets the editing action associated with this SeriesConfig. This is used by Inca commands in computing suite deltas; it is not stored in the DB.

Returns:
the associated editing action

setAction

public void setAction(java.lang.String action)
Sets the editing action associated with this SeriesConfig. This is used by Inca commands in computing suite deltas; it is not stored in the DB.

Parameters:
action - the associated editing action

toBean

public org.apache.xmlbeans.XmlObject toBean()
Returns a Inca schema XmlBean SeriesConfig object that contains information equivalent to this object.

Specified by:
toBean in class PersistentObject
Returns:
an XmlBean SeriesConfig object that contains equivalent information

toString

public java.lang.String toString()
Returns a string representation of this SeriesConfig.

Overrides:
toString in class java.lang.Object
Returns:
a string representation

equals

public boolean equals(java.lang.Object o)
Compares another object to this SeriesConfig for logical equality.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to compare
Returns:
true iff the comparison object represents the same SeriesConfig

generate

public static SeriesConfig generate(java.lang.String resource,
                                    java.lang.String context,
                                    int args)
Returns a phony SeriesConfig with a given resource and context. Useful for testing.

Parameters:
resource - the series resource
context - the series context
args - the number of phony arguments to generate
Returns:
a new Series