Package net.sf.basedb.core.data
Class ReporterData
- java.lang.Object
-
- net.sf.basedb.core.data.BasicData
-
- net.sf.basedb.core.data.ReporterData
-
- All Implemented Interfaces:
BatchableData
,ExtendableData
,IdentifiableData
,NameableData
,RegisteredData
- Direct Known Subclasses:
BaseFileImporter.ReporterProxy
,RawDataBatcher.ReporterProxy
public class ReporterData extends BasicData implements NameableData, ExtendableData, BatchableData, RegisteredData
This class represents the idea of clone, oligo or some other reporter for a gene. Each reporter must have a unique id, the reporter ID. The only required property, except the reporter ID is the name.The server administrator may also add columns in the database for other properties of the reporters. The new columns are mapped to BASE in the
extended-properties.xml
file. For more information about this see theExtendedProperties
class.- Version:
- 2.0
- Author:
- Samuel
- See Also:
ExtendableData
,Reporter
,ReporterBatcher
,ExtendedProperties
, Developer documentation: Reporters- Hibernate: class
- table="`Reporters`" lazy="true"
-
-
Field Summary
Fields Modifier and Type Field Description private String
description
private Date
entryDate
private Map<String,Object>
extendedProperties
private String
externalId
private String
lastSource
The source of the last updateprivate Date
lastUpdate
The last update date.static int
MAX_EXTERNAL_ID_LENGTH
The maximum length of the external ID that can be stored in the database.static int
MAX_LAST_SOURCE_LENGTH
The maximum length of the last source that can be stored in the database.static int
MAX_SYMBOL_LENGTH
The maximum length of the gene symbol that can be stored in the database.private String
name
private Set<ReporterListScoreData>
reporterListScores
private ReporterTypeData
reporterType
private String
symbol
-
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
-
Constructor Summary
Constructors Constructor Description ReporterData()
ReporterData(int id)
Create a reporter object with a given ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Get the description for the item.Date
getEntryDate()
Get the date this item was added to the database.Object
getExtended(String name)
Get the value of an extended property.String
getExternalId()
Get the external id for thisReporterData
item.String
getLastSource()
Get the source that was used when this reporter was last updated.Date
getLastUpdate()
Get the date and time the information about this reporter last was updated.String
getName()
Get the name of the item.(package private) Set<ReporterListScoreData>
getReporterListScores()
The lists this reporter is used in.(package private) ReporterTypeData
getReporterType()
Get theReporterTypeData
of this the reporter.String
getSymbol()
Get the gene symbol of the reporter.void
setDescription(String description)
Set the description for the item.(package private) void
setEntryDate(Date entryDate)
void
setExtended(String name, Object value)
Set the value of an extended property.void
setExternalId(String externalId)
(package private) void
setLastSource(String source)
(package private) void
setLastUpdate(Date lastUpdate)
void
setName(String name)
Set the name of the item.(package private) void
setReporterListScores(Set<ReporterListScoreData> reporterListScores)
(package private) void
setReporterType(ReporterTypeData reporterType)
void
setSymbol(String symbol)
-
Methods inherited from class net.sf.basedb.core.data.BasicData
equals, getId, getVersion, hashCode, setId, setVersion, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.basedb.core.data.IdentifiableData
getId, getVersion
-
-
-
-
Field Detail
-
entryDate
private Date entryDate
-
MAX_EXTERNAL_ID_LENGTH
public static final int MAX_EXTERNAL_ID_LENGTH
The maximum length of the external ID that can be stored in the database.- See Also:
setExternalId(String)
, Constant Field Values
-
externalId
private String externalId
-
MAX_SYMBOL_LENGTH
public static final int MAX_SYMBOL_LENGTH
The maximum length of the gene symbol that can be stored in the database.- See Also:
- Constant Field Values
-
symbol
private String symbol
-
lastUpdate
private Date lastUpdate
The last update date.
-
MAX_LAST_SOURCE_LENGTH
public static final int MAX_LAST_SOURCE_LENGTH
The maximum length of the last source that can be stored in the database.- See Also:
- Constant Field Values
-
lastSource
private String lastSource
The source of the last update
-
name
private String name
-
description
private String description
-
reporterType
private ReporterTypeData reporterType
-
reporterListScores
private Set<ReporterListScoreData> reporterListScores
-
-
Method Detail
-
getEntryDate
public Date getEntryDate()
Description copied from interface:RegisteredData
Get the date this item was added to the database. The value is generated at creation time and can't be modified later.- Specified by:
getEntryDate
in interfaceRegisteredData
-
setEntryDate
void setEntryDate(Date entryDate)
-
getExternalId
public String getExternalId()
Get the external id for thisReporterData
item.- Returns:
- The reporter's external ID.
- Hibernate: property
- column="`external_id`" type="string" length="255" not-null="true" unique="true"
-
setExternalId
public void setExternalId(String externalId)
-
getSymbol
public String getSymbol()
Get the gene symbol of the reporter.- Returns:
- The gene symbol of the reporter
- Hibernate: property
- column="`symbol`" type="string" length="255"
-
setSymbol
public void setSymbol(String symbol)
-
getLastUpdate
public Date getLastUpdate()
Get the date and time the information about this reporter last was updated.- Returns:
- A
Date
object - Hibernate: property
- column="`last_update`" type="timestamp" not-null="true"
-
setLastUpdate
void setLastUpdate(Date lastUpdate)
-
getLastSource
public String getLastSource()
Get the source that was used when this reporter was last updated.- Returns:
- A
String
object - Hibernate: property
- column="`last_source`" type="string" not-null="false" length="255"
-
setLastSource
void setLastSource(String source)
-
getName
public String getName()
Description copied from interface:NameableData
Get the name of the item.- Specified by:
getName
in interfaceNameableData
- Returns:
- A
String
with the name of the item
-
setName
public void setName(String name)
Description copied from interface:NameableData
Set the name of the item. The name cannot be null and mustn't be longer than the value specified by theMAX_NAME_LENGTH
constant.- Specified by:
setName
in interfaceNameableData
- Parameters:
name
- The new name for the item
-
getDescription
public String getDescription()
Description copied from interface:NameableData
Get the description for the item.- Specified by:
getDescription
in interfaceNameableData
- Returns:
- A
String
with a description of the item
-
setDescription
public void setDescription(String description)
Description copied from interface:NameableData
Set the description for the item. The description can be null but mustn't be longer than the value specified by theMAX_DESCRIPTION_LENGTH
constant.- Specified by:
setDescription
in interfaceNameableData
- Parameters:
description
- The new description for the item
-
getExtended
public Object getExtended(String name)
Description copied from interface:ExtendableData
Get the value of an extended property.- Specified by:
getExtended
in interfaceExtendableData
- Parameters:
name
- The name of the property- Returns:
- The value of the property or null if not found
-
setExtended
public void setExtended(String name, Object value)
Description copied from interface:ExtendableData
Set the value of an extended property.- Specified by:
setExtended
in interfaceExtendableData
- Parameters:
name
- The name of the propertyvalue
- The new value for the property
-
getReporterType
ReporterTypeData getReporterType()
Get theReporterTypeData
of this the reporter. Package private since we cannot expose the data object to client applications.- Returns:
- The
ReporterTypeData
item - See Also:
Reporter.getReporterType(net.sf.basedb.core.DbControl, ReporterData)
- Hibernate: many-to-one
- column="`reportertype_id`" not-null="false" outer-join="false"
-
setReporterType
void setReporterType(ReporterTypeData reporterType)
-
getReporterListScores
Set<ReporterListScoreData> getReporterListScores()
The lists this reporter is used in. This is the inverse end.- See Also:
ReporterListData.getReporterListScores()
- Hibernate: set
- lazy="true" inverse="true"
- Hibernate: collection-key
- column="`reporter_id`"
- Hibernate: collection-one-to-many
- class="net.sf.basedb.core.data.ReporterListScoreData"
-
setReporterListScores
void setReporterListScores(Set<ReporterListScoreData> reporterListScores)
-
-