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
,NoAutoUnlinkAnyToAny
,RegisteredData
- Direct Known Subclasses:
BaseFileImporter.ReporterProxy
,RawDataBatcher.ReporterProxy
public class ReporterData
extends BasicData
implements NameableData, ExtendableData, BatchableData, RegisteredData, NoAutoUnlinkAnyToAny
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 the ExtendedProperties
class.
- Version:
- 2.0
- Author:
- Samuel
- See Also:
- Hibernate: class
- table="`Reporters`" lazy="true"
-
Field Summary
Modifier and TypeFieldDescriptionprivate String
private Date
private String
private String
The source of the last updateprivate Date
The last update date.static final int
The maximum length of the external ID that can be stored in the database.static final int
The maximum length of the last source that can be stored in the database.static final int
The maximum length of the gene symbol that can be stored in the database.private String
private Set<ReporterListScoreData>
private ReporterTypeData
private String
Fields inherited from interface net.sf.basedb.core.data.NameableData
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the description for the item.Get the date this item was added to the database.getExtended
(String name) Get the value of an extended property.Get the external id for thisReporterData
item.Get the source that was used when this reporter was last updated.Get the date and time the information about this reporter last was updated.getName()
Get the name of the item.(package private) Set<ReporterListScoreData>
The lists this reporter is used in.(package private) ReporterTypeData
Get theReporterTypeData
of this the reporter.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
Set the name of the item.(package private) void
setReporterListScores
(Set<ReporterListScoreData> reporterListScores) (package private) void
setReporterType
(ReporterTypeData reporterType) void
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 Details
-
entryDate
-
MAX_EXTERNAL_ID_LENGTH
public static final int MAX_EXTERNAL_ID_LENGTHThe maximum length of the external ID that can be stored in the database.- See Also:
-
externalId
-
MAX_SYMBOL_LENGTH
public static final int MAX_SYMBOL_LENGTHThe maximum length of the gene symbol that can be stored in the database.- See Also:
-
symbol
-
lastUpdate
The last update date. -
MAX_LAST_SOURCE_LENGTH
public static final int MAX_LAST_SOURCE_LENGTHThe maximum length of the last source that can be stored in the database.- See Also:
-
lastSource
The source of the last update -
name
-
description
-
extendedProperties
-
reporterType
-
reporterListScores
-
-
Constructor Details
-
ReporterData
public ReporterData() -
ReporterData
public ReporterData(int id) Create a reporter object with a given ID.- Parameters:
id
- The reporter ID- Since:
- 2.8
-
-
Method Details
-
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
-
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
-
getSymbol
Get the gene symbol of the reporter.- Returns:
- The gene symbol of the reporter
- Hibernate: property
- column="`symbol`" type="string" length="255"
-
setSymbol
-
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
-
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
-
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
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
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
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
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
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:
- Hibernate: many-to-one
- column="`reportertype_id`" not-null="false" outer-join="false"
-
setReporterType
-
getReporterListScores
Set<ReporterListScoreData> getReporterListScores()The lists this reporter is used in. This is the inverse end.- See Also:
- 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
-