org.molgenis.omx.observ
Class Category

java.lang.Object
  extended by org.molgenis.util.AbstractEntity
      extended by org.molgenis.omx.observ.Characteristic
          extended by org.molgenis.omx.observ.Category
All Implemented Interfaces:
Serializable, Autoid, Identifiable, Entity

@Entity
public class Category
extends Characteristic

Category: Category is partOf ObservableFeature to define categories for an ObservableFeature, such as the categorical answer codes that are often used in Questionaires. For example the ObservableFeature 'sex' has {code_string = 1, label=male} and {code_string = 2, label=female}. Category can be linked to well-defined ontology terms via the ontologyReference. Category extends ObservationElement such that it can be referenced by ObservedValue.value. The Category class maps to METABASE::Category .

Author:
MOLGENIS generator
See Also:
Serialized Form

Field Summary
static String DEFINITION
           
static String DEFINITION_IDENTIFIER
           
static String ID
           
static String ISMISSING
           
static String OBSERVABLEFEATURE
           
static String OBSERVABLEFEATURE_IDENTIFIER
           
static String VALUECODE
           
 
Fields inherited from class org.molgenis.omx.observ.Characteristic
__TYPE, DESCRIPTION, IDENTIFIER, NAME
 
Constructor Summary
Category()
           
Category(Category copyMe)
          copy constructor
 
Method Summary
 Category create(Tuple tuple)
           
 boolean equals(Object obj)
           
static List<? extends Category> find(Database db, QueryRule... rules)
          Shorthand for db.find(Category.class, org.molgenis.framework.db.QueryRule ...
static Category findById(Database db, Integer id)
           
static Category findByIdentifier(Database db, String identifier)
           
 Object get(String name)
          Generic getter.
 Integer getDefinition_Id()
           
 String getDefinition_Identifier()
          Get a pretty label Identifier for cross reference Definition to OntologyTerm.Id.
 OntologyTerm getDefinition()
          Get the The category that is being measured in a specific way..
 OntologyTerm getDefinition(Database db)
          Deprecated. 
 Vector<String> getFields()
           
 Vector<String> getFields(boolean skipAutoIds)
          Get the names of all public properties of Category.
 String getFields(String sep)
          Deprecated. 
 String getIdField()
           
 Object getIdValue()
           
 Boolean getIsMissing()
          Get the whether this value should be treated as missing value..
 Boolean getIsMissing(Database db)
          Deprecated. 
 List<String> getLabelFields()
           
 Integer getObservableFeature_Id()
           
 String getObservableFeature_Identifier()
          Get a pretty label Identifier for cross reference ObservableFeature to ObservableFeature.Id.
 ObservableFeature getObservableFeature()
          Get the The Measurement these permitted values are part of..
 ObservableFeature getObservableFeature(Database db)
          Deprecated. 
 String getValueCode()
          Get the The value used to store this category in ObservedValue.
 String getValueCode(Database db)
          Deprecated. 
 String getValues(String sep)
          Deprecated. 
 String getXrefIdFieldName(String fieldName)
           
 int hashCode()
           
static Query<? extends Category> query(Database db)
          Shorthand for db.query(Category.class).
 void set(Tuple tuple, boolean strict)
           
 void setDefinition_Id(Integer definition_id)
          Set foreign key for field definition.
 void setDefinition_Identifier(String definition_Identifier)
          Set a pretty label for cross reference Definition to OntologyTerm.Id.
 void setDefinition(Integer definition_id)
           
 void setDefinition(OntologyTerm definition)
          Set the The category that is being measured in a specific way..
 void setIsMissing(Boolean isMissing)
          Set the whether this value should be treated as missing value..
 void setObservableFeature_Id(Integer observableFeature_id)
          Set foreign key for field observableFeature.
 void setObservableFeature_Identifier(String observableFeature_Identifier)
          Set a pretty label for cross reference ObservableFeature to ObservableFeature.Id.
 void setObservableFeature(Integer observableFeature_id)
           
 void setObservableFeature(ObservableFeature observableFeature)
          Set the The Measurement these permitted values are part of..
 void setValueCode(String valueCode)
          Set the The value used to store this category in ObservedValue.
 String toString()
           
 String toString(boolean verbose)
           
 void validate()
           
 
Methods inherited from class org.molgenis.omx.observ.Characteristic
get__Type, get__Type, get__TypeLabel, get__TypeOptions, getDescription, getDescription, getId, getIdentifier, getIdentifier, getName, getName, getValueMrefValueCollection, getValueMrefValueCollection, set__Type, setDescription, setId, setIdentifier, setName, setValueMrefValueCollection
 
Methods inherited from class org.molgenis.util.AbstractEntity
getLabelValue, getValues, isObjectRepresentation, isReadonly, set, set, setReadonly, setValuesFromString, string2date
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.molgenis.util.Entity
getLabelValue, getValues, isReadonly, set, set, setReadonly
 

Field Detail

OBSERVABLEFEATURE

public static final String OBSERVABLEFEATURE
See Also:
Constant Field Values

OBSERVABLEFEATURE_IDENTIFIER

public static final String OBSERVABLEFEATURE_IDENTIFIER
See Also:
Constant Field Values

VALUECODE

public static final String VALUECODE
See Also:
Constant Field Values

DEFINITION

public static final String DEFINITION
See Also:
Constant Field Values

DEFINITION_IDENTIFIER

public static final String DEFINITION_IDENTIFIER
See Also:
Constant Field Values

ISMISSING

public static final String ISMISSING
See Also:
Constant Field Values

ID

public static final String ID
See Also:
Constant Field Values
Constructor Detail

Category

public Category()

Category

public Category(Category copyMe)
         throws Exception
copy constructor

Throws:
Exception
Method Detail

query

public static Query<? extends Category> query(Database db)
Shorthand for db.query(Category.class).


find

public static List<? extends Category> find(Database db,
                                            QueryRule... rules)
                                     throws DatabaseException
Shorthand for db.find(Category.class, org.molgenis.framework.db.QueryRule ... rules).

Throws:
DatabaseException

findById

public static Category findById(Database db,
                                Integer id)
                         throws DatabaseException
Throws:
DatabaseException

findByIdentifier

public static Category findByIdentifier(Database db,
                                        String identifier)
                                 throws DatabaseException
Throws:
DatabaseException

getObservableFeature

public ObservableFeature getObservableFeature()
Get the The Measurement these permitted values are part of..

Returns:
observableFeature.

getObservableFeature

@Deprecated
public ObservableFeature getObservableFeature(Database db)
Deprecated. 


setObservableFeature

public void setObservableFeature(ObservableFeature observableFeature)
Set the The Measurement these permitted values are part of..

Parameters:
observableFeature -

setObservableFeature_Id

public void setObservableFeature_Id(Integer observableFeature_id)
Set foreign key for field observableFeature. This will erase any foreign key objects currently set. FIXME: can we autoload the new object?


setObservableFeature

public void setObservableFeature(Integer observableFeature_id)

getObservableFeature_Id

public Integer getObservableFeature_Id()

getObservableFeature_Identifier

public String getObservableFeature_Identifier()
Get a pretty label Identifier for cross reference ObservableFeature to ObservableFeature.Id.


setObservableFeature_Identifier

public void setObservableFeature_Identifier(String observableFeature_Identifier)
Set a pretty label for cross reference ObservableFeature to ObservableFeature.Id. Implies setObservableFeature(null) until save


getValueCode

public String getValueCode()
Get the The value used to store this category in ObservedValue. For example '1', '2'..

Returns:
valueCode.

getValueCode

@Deprecated
public String getValueCode(Database db)
Deprecated. 


setValueCode

public void setValueCode(String valueCode)
Set the The value used to store this category in ObservedValue. For example '1', '2'..

Parameters:
valueCode -

getDefinition

public OntologyTerm getDefinition()
Get the The category that is being measured in a specific way..

Returns:
definition.

getDefinition

@Deprecated
public OntologyTerm getDefinition(Database db)
Deprecated. 


setDefinition

public void setDefinition(OntologyTerm definition)
Set the The category that is being measured in a specific way..

Parameters:
definition -

setDefinition_Id

public void setDefinition_Id(Integer definition_id)
Set foreign key for field definition. This will erase any foreign key objects currently set. FIXME: can we autoload the new object?


setDefinition

public void setDefinition(Integer definition_id)

getDefinition_Id

public Integer getDefinition_Id()

getDefinition_Identifier

public String getDefinition_Identifier()
Get a pretty label Identifier for cross reference Definition to OntologyTerm.Id.


setDefinition_Identifier

public void setDefinition_Identifier(String definition_Identifier)
Set a pretty label for cross reference Definition to OntologyTerm.Id. Implies setDefinition(null) until save


getIsMissing

public Boolean getIsMissing()
Get the whether this value should be treated as missing value..

Returns:
isMissing.

getIsMissing

@Deprecated
public Boolean getIsMissing(Database db)
Deprecated. 


setIsMissing

public void setIsMissing(Boolean isMissing)
Set the whether this value should be treated as missing value..

Parameters:
isMissing -

get

public Object get(String name)
Generic getter. Get the property by using the name.

Specified by:
get in interface Entity
Overrides:
get in class Characteristic

validate

public void validate()
              throws DatabaseException
Specified by:
validate in interface Entity
Overrides:
validate in class Characteristic
Throws:
DatabaseException

set

public void set(Tuple tuple,
                boolean strict)
         throws Exception
Specified by:
set in interface Entity
Overrides:
set in class Characteristic
Throws:
Exception

toString

public String toString()
Overrides:
toString in class Characteristic

toString

public String toString(boolean verbose)
Overrides:
toString in class Characteristic

getFields

public Vector<String> getFields(boolean skipAutoIds)
Get the names of all public properties of Category.

Specified by:
getFields in interface Entity
Overrides:
getFields in class Characteristic

getFields

public Vector<String> getFields()
Specified by:
getFields in interface Entity
Overrides:
getFields in class Characteristic

getIdField

public String getIdField()
Specified by:
getIdField in interface Entity
Overrides:
getIdField in class Characteristic

getLabelFields

public List<String> getLabelFields()
Specified by:
getLabelFields in interface Entity
Overrides:
getLabelFields in class Characteristic

getFields

@Deprecated
public String getFields(String sep)
Deprecated. 

Specified by:
getFields in interface Entity
Overrides:
getFields in class Characteristic

getIdValue

public Object getIdValue()
Specified by:
getIdValue in interface Entity
Overrides:
getIdValue in class Characteristic

getXrefIdFieldName

public String getXrefIdFieldName(String fieldName)
Specified by:
getXrefIdFieldName in interface Entity
Overrides:
getXrefIdFieldName in class Characteristic

getValues

@Deprecated
public String getValues(String sep)
Deprecated. 

Specified by:
getValues in interface Entity
Overrides:
getValues in class Characteristic

create

public Category create(Tuple tuple)
                throws Exception
Specified by:
create in interface Entity
Overrides:
create in class Characteristic
Throws:
Exception

equals

public boolean equals(Object obj)
Overrides:
equals in class Characteristic

hashCode

public int hashCode()
Overrides:
hashCode in class Characteristic


Copyright © 2013. All Rights Reserved.