gov.nih.nci.caarray.domain.protocol
Class UserDefinedParameterValue

java.lang.Object
  extended by gov.nih.nci.caarray.domain.AbstractCaArrayObject
      extended by gov.nih.nci.caarray.domain.AbstractCaArrayEntity
          extended by gov.nih.nci.caarray.domain.AbstractUnitableValue
              extended by gov.nih.nci.caarray.domain.protocol.AbstractParameterValue
                  extended by gov.nih.nci.caarray.domain.protocol.UserDefinedParameterValue
All Implemented Interfaces:
com.fiveamsolutions.nci.commons.data.persistent.PersistentObject, UnitableValue, UserDefinedValue, java.io.Serializable

public class UserDefinedParameterValue
extends AbstractParameterValue
implements UserDefinedValue

a parameter value with a free text value.

Author:
dkokotov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayEntity
CAARRAY_LSID_AUTHORITY, CAARRAY_LSID_NAMESPACE
 
Fields inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayObject
DEFAULT_BATCH_SIZE, DEFAULT_STRING_COLUMN_SIZE, LARGE_TEXT_FIELD_LENGTH
 
Constructor Summary
UserDefinedParameterValue()
          Hibernate-only constructor.
UserDefinedParameterValue(java.lang.String value, Term unit)
          Create a new parameter value with given fields.
UserDefinedParameterValue(UserDefinedParameterValue other)
          Copy constructor.
 
Method Summary
 java.lang.String getDisplayValueWithoutUnit()
          
 java.lang.String getValue()
           
 boolean matches(AbstractParameterValue other)
          Checks if two ParameterValues are the same, ignoring ProtocolApplications.
 void setValue(java.lang.String value)
           
 
Methods inherited from class gov.nih.nci.caarray.domain.protocol.AbstractParameterValue
getParameter, getProtocolApplication, getUnit, setParameter, setProtocolApplication, setUnit
 
Methods inherited from class gov.nih.nci.caarray.domain.AbstractUnitableValue
getDisplayValue
 
Methods inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayEntity
getLsid, getLsidAuthority, getLsidNamespace, getLsidObjectId, setLsid, setLsid, setLsidForEntity
 
Methods inherited from class gov.nih.nci.caarray.domain.AbstractCaArrayObject
equals, getCaBigId, getId, getPostLoadSecurityPolicies, getRemoteApiSecurityPolicies, hashCode, setCaBigId, setId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nih.nci.caarray.domain.UnitableValue
getDisplayValue, getUnit, setUnit
 

Constructor Detail

UserDefinedParameterValue

public UserDefinedParameterValue()
Hibernate-only constructor.


UserDefinedParameterValue

public UserDefinedParameterValue(UserDefinedParameterValue other)
Copy constructor.

Parameters:
other - the value to copy from

UserDefinedParameterValue

public UserDefinedParameterValue(java.lang.String value,
                                 Term unit)
Create a new parameter value with given fields.

Parameters:
value - the value
unit - the unit for the value
Method Detail

getValue

public java.lang.String getValue()
Specified by:
getValue in interface UserDefinedValue
Returns:
the value

setValue

public void setValue(java.lang.String value)
Specified by:
setValue in interface UserDefinedValue
Parameters:
value - the value to set

getDisplayValueWithoutUnit

public java.lang.String getDisplayValueWithoutUnit()

Specified by:
getDisplayValueWithoutUnit in interface UnitableValue
Returns:
the value (without unit) as a string displayable in the ui

matches

public boolean matches(AbstractParameterValue other)
Checks if two ParameterValues are the same, ignoring ProtocolApplications. Subclasses should override to define additional checks (possibly calling super.matches).

Overrides:
matches in class AbstractParameterValue
Parameters:
other - other ParameterValue to compare to
Returns:
true if they match