gov.nih.nci.caarray.domain.data
Class StringColumn
java.lang.Object
gov.nih.nci.caarray.domain.AbstractCaArrayObject
gov.nih.nci.caarray.domain.data.AbstractDataColumn
gov.nih.nci.caarray.domain.data.StringColumn
- All Implemented Interfaces:
- com.fiveamsolutions.nci.commons.data.persistent.PersistentObject, java.io.Serializable
public class StringColumn
- extends AbstractDataColumn
Contains a column of String
values.
- See Also:
- Serialized Form
Method Summary |
java.lang.String[] |
getValues()
|
java.io.Serializable |
getValuesAsArray()
Serialized values, from the DataStorageFacade. |
java.lang.String |
getValuesAsString()
|
void |
initializeArray(int numberOfValues)
Initializes this column to hold the number of values given. |
boolean |
isLoaded()
Indicates whether this column is already loaded, meaning its populated with an array of values. |
void |
setValues(java.lang.String[] values)
|
void |
setValuesAsString(java.lang.String s)
Sets the values of this column from a string, which must contain a comma-separated list of strings. |
void |
setValuesFromArray(java.io.Serializable array)
Set the values of this column from a value array. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
StringColumn
public StringColumn()
getValues
public java.lang.String[] getValues()
- Returns:
- the values
setValues
public void setValues(java.lang.String[] values)
- Parameters:
values
- the values to set
getValuesAsString
public java.lang.String getValuesAsString()
- Specified by:
getValuesAsString
in class AbstractDataColumn
- Returns:
- the values of this column as a comma-separated string. Each value will be encoded in this string by
escaping any commas in the value with a backslash.
setValuesAsString
public void setValuesAsString(java.lang.String s)
- Sets the values of this column from a string, which must contain a comma-separated list of strings. Each such
string will be unescaped by converting any backslash-comma combinations back to commas.
- Specified by:
setValuesAsString
in class AbstractDataColumn
- Parameters:
s
- string containing a comma-separated list of strings.
setValuesFromArray
public void setValuesFromArray(java.io.Serializable array)
- Set the values of this column from a value array. The incoming values should be coming
from either a parsed file, or the DataStorageFacade.
- Specified by:
setValuesFromArray
in class AbstractDataColumn
- Parameters:
array
- the values for this column. Should be an array of the appropriate primitive or String type.
getValuesAsArray
public java.io.Serializable getValuesAsArray()
- Serialized values, from the DataStorageFacade.
- Specified by:
getValuesAsArray
in class AbstractDataColumn
- Returns:
- the values in this column as an array. Subclasses should return an array of the appropriate primitive
type or String.
initializeArray
public void initializeArray(int numberOfValues)
- Initializes this column to hold the number of values given.
- Specified by:
initializeArray
in class AbstractDataColumn
- Parameters:
numberOfValues
- number of values
isLoaded
public boolean isLoaded()
- Indicates whether this column is already loaded, meaning its populated with an array of values.
- Specified by:
isLoaded
in class AbstractDataColumn
- Returns:
- true if data has been loaded.