edu.sdsc.inca.depot.persistent
Class Arg

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

public class Arg
extends PersistentObject

This class represents a command line input to a reporter. This class is a persistent object. It has unique constraints on the name value combination. This means that on save there will be an exception thrown if the combo already exists.


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
Arg()
          Default constructor.
Arg(java.lang.String name, java.lang.String value)
          Creates an Arg object with the associated name and value.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares another object to this Arg for logical equality.
 Arg fromBean(edu.sdsc.inca.dataModel.util.Args.Arg a)
          Copies information from an Inca schema XmlBean Arg object so that this object contains equivalent information.
 PersistentObject fromBean(org.apache.xmlbeans.XmlObject o)
          Copies information from an Inca schema XmlBean Arg object so that this object contains equivalent information.
 java.lang.Long getId()
          Retrieve the id -- null if not yet connected to database.
 java.lang.String getName()
          retrieve the input name.
 java.lang.String getValue()
          retrieve the input value.
 int hashCode()
          Calculate a hash code using the same fields that where used in equals.
 void setId(java.lang.Long id)
          Set the id.
 void setName(java.lang.String name)
          set the input name.
 void setValue(java.lang.String value)
          retrieve the input value.
 org.apache.xmlbeans.XmlObject toBean()
          Returns a Inca schema XmlBean Arg object that contains information equivalent to this object.
 java.lang.String toString()
          For debugging purposes.
 
Methods inherited from class edu.sdsc.inca.depot.persistent.PersistentObject
toXml, truncate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Arg

public Arg()
Default constructor.


Arg

public Arg(java.lang.String name,
           java.lang.String value)
Creates an Arg object with the associated name and value.

Parameters:
name - The name of the command line argument
value - The value of the command line argument
Method Detail

fromBean

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

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

fromBean

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

Parameters:
a - the XmlBean Arg 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

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

Parameters:
id - The DB ID.

getName

public java.lang.String getName()
retrieve the input name.

Returns:
The name of the command line argument.

setName

public void setName(java.lang.String name)
set the input name.

Parameters:
name - The name of the command line argument.

getValue

public java.lang.String getValue()
retrieve the input value.

Returns:
The value of the command line argument.

setValue

public void setValue(java.lang.String value)
retrieve the input value.

Parameters:
value - The value of the command line argument.

toBean

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

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

toString

public java.lang.String toString()
For debugging purposes.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this class.

equals

public boolean equals(java.lang.Object o)
Compares another object to this Arg 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 Arg

hashCode

public int hashCode()
Calculate a hash code using the same fields that where used in equals.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this object