gov.nih.nci.caarray.domain.vocabulary
Class Category

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.vocabulary.Category
All Implemented Interfaces:
com.fiveamsolutions.nci.commons.data.persistent.PersistentObject, java.io.Serializable, java.lang.Cloneable

@UniqueConstraints(constraints={@UniqueConstraint(fields={@UniqueConstraintField(name="name"),@UniqueConstraintField(name="source")}),@UniqueConstraint(fields={@UniqueConstraintField(name="accession"),@UniqueConstraintField(name="source")})},
                   message="{category.uniqueConstraint}")
public class Category
extends AbstractCaArrayEntity
implements java.lang.Cloneable

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
Category()
          Empty constructor (for tools).
Category(java.lang.String name, TermSource ts)
          Create Category with given name and source.
 
Method Summary
 boolean equals(java.lang.Object o)
          The default comparison uses the id.
 java.lang.String getAccession()
           
 java.util.Set<Category> getChildren()
          Gets the children.
 java.lang.String getName()
          Gets the name.
 java.util.Set<Category> getParents()
          Gets the parent.
 TermSource getSource()
           
 java.lang.String getUrl()
           
 int hashCode()
          Default hashCode goes off of id.
 void setAccession(java.lang.String accession)
           
 void setName(java.lang.String nameVal)
          Sets the name.
 void setSource(TermSource termSource)
          Set the termSource.
 void setUrl(java.lang.String url)
           
 java.lang.String toString()
          
 
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
getCaBigId, getId, getPostLoadSecurityPolicies, getRemoteApiSecurityPolicies, setCaBigId, setId
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Category

public Category()
Empty constructor (for tools).


Category

public Category(java.lang.String name,
                TermSource ts)
Create Category with given name and source.

Parameters:
name - the category name
ts - the TermSource to which the category belongs
Method Detail

getName

@Length(min=1,
        max=254)
@NotNull
public java.lang.String getName()
Gets the name.

Returns:
the name

setName

public void setName(java.lang.String nameVal)
Sets the name.

Parameters:
nameVal - the name

getAccession

public java.lang.String getAccession()
Returns:
the accession number for this category

setAccession

public void setAccession(java.lang.String accession)
Parameters:
accession - the accession to set

getUrl

public java.lang.String getUrl()
Returns:
the url for this category

setUrl

public void setUrl(java.lang.String url)
Parameters:
url - the url to set

getParents

public java.util.Set<Category> getParents()
Gets the parent.

Returns:
the parent

getChildren

public java.util.Set<Category> getChildren()
Gets the children.

Returns:
the children

getSource

@NotNull
public TermSource getSource()
Returns:
the term source to which this category belongs

setSource

public void setSource(TermSource termSource)
Set the termSource.

Parameters:
termSource - The termSource to set

equals

public boolean equals(java.lang.Object o)
The default comparison uses the id.

Overrides:
equals in class AbstractCaArrayObject
Parameters:
o - other object
Returns:
equal or not

hashCode

public int hashCode()
Default hashCode goes off of id.

Overrides:
hashCode in class AbstractCaArrayObject
Returns:
hashCode

toString

public java.lang.String toString()

Overrides:
toString in class AbstractCaArrayObject