public class Reporter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static ClassMetadata |
metaData |
Constructor and Description |
---|
Reporter() |
Modifier and Type | Method and Description |
---|---|
static ReporterData |
getByExternalId(DbControl dc,
java.lang.String externalId)
Get a
ReporterData object when you know the external id. |
static ReporterData |
getByExternalId(DbControl dc,
java.lang.String externalId,
Experiment experiment)
Get a
ReporterData object when you know the external id, possibly
using the cloned reporter annotations of the given experiment. |
static ReporterData |
getById(DbControl dc,
int id)
Get a
ReporterData object when you know the ID. |
static ReporterData |
getById(DbControl dc,
int id,
Experiment experiment)
Get a
ReporterData object when you know the ID, possibly
using the cloned reporter annotations of the given experiment. |
private static java.lang.String |
getClonedSelectSql(VirtualDb vdb)
Generate an SQL statement for selecting ALL reporter properties from a cloned
table.
|
static DynamicReporterQuery |
getDynamicQuery()
Get a dynamic query object configured to retrieve reporter information.
|
static DynamicReporterQuery |
getDynamicQuery(Experiment experiment)
Get a dynamic query object configured to retrieve reporter
information from either the master reporter table or a
cloned reporter table in the given experiment.
|
static ReporterData |
getNew(java.lang.String externalId)
Get a new instance of a reporter, and setting the external ID.
|
static ReporterData |
getProxy(int reporterId)
Get a proxy reporter object.
|
static DataQuery<ReporterData> |
getQuery()
Get a query object configured to retrieve reporters.
|
static ReporterType |
getReporterType(DbControl dc,
ReporterData reporter)
Get the reporter type item from a reporter data object.
|
static void |
setReporterType(ReporterData reporter,
ReporterType reporterType)
Set the reporter type on a reporter data object.
|
private static ClassMetadata metaData
public static ReporterData getNew(java.lang.String externalId) throws InvalidDataException, BaseException
externalId
- The external id of the new reporterReporterData
classInvalidDataException
- If the external id is nullBaseException
- If there is some other error.public static ReporterData getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
ReporterData
object when you know the ID.dc
- The DbControl
which will be used for
permission checking and database access.id
- The ID of the item to load.ReporterData
object.ItemNotFoundException
- If an item with the specified
id is not foundPermissionDeniedException
- If the logged in user doesn't
have read permission to the itemBaseException
- If there is another errorpublic static ReporterData getById(DbControl dc, int id, Experiment experiment)
ReporterData
object when you know the ID, possibly
using the cloned reporter annotations of the given experiment.
If the experiment doesn't have cloned reporter information this
method is the same as getById(DbControl, int)
. If
the experiment has cloned information, all non-cloned properties
are set to null.dc
- The DbControl
which will be used for
permission checking and database accessid
- The ID of the reporterexperiment
- The experiment which may have cloned reporter informationReporterData
objectpublic static ReporterData getByExternalId(DbControl dc, java.lang.String externalId) throws ItemNotFoundException, PermissionDeniedException, BaseException
ReporterData
object when you know the external id. Use
this method only when you need to get a few reporters. If you need
to get many reporter use the ReporterBatcher.getByExternalId(String)
method instead. It has better performance since it resuses a single
query instead of creating a new one each time as this method does.dc
- The DbControl
which will be used for
database access.externalId
- The external id of the reporter to load.ReporterData
object.ItemNotFoundException
- If an item with the specified
id is not foundPermissionDeniedException
- If the logged in user doesn't
have read permission to the itemBaseException
- If there is another errorpublic static ReporterData getByExternalId(DbControl dc, java.lang.String externalId, Experiment experiment)
ReporterData
object when you know the external id, possibly
using the cloned reporter annotations of the given experiment.
If the experiment doesn't have cloned reporter information this
method is the same as getByExternalId(DbControl, String)
.
If the experiment has cloned information, all non-cloned properties
are set to null.
Use this method only when you need to get a few reporters. If you need
to get many reporters use a query from the getDynamicQuery(Experiment)
method instead. It has better performance since it resuses a single
query instead of creating a new one each time as this method does.
dc
- The DbControl
which will be used for
permission checking and database accessexternalId
- The external id of the reporterexperiment
- The experiment which may have cloned reporter informationReporterData
objectpublic static ReporterData getProxy(int reporterId)
reporterId
- The ID of the reporterpublic static DataQuery<ReporterData> getQuery()
DataQuery
objectpublic static DynamicReporterQuery getDynamicQuery()
Query.select(net.sf.basedb.core.query.Select)
DynamicReporterQuery
objectpublic static DynamicReporterQuery getDynamicQuery(Experiment experiment)
Query.select(net.sf.basedb.core.query.Select)
DynamicReporterQuery
objectpublic static ReporterType getReporterType(DbControl dc, ReporterData reporter) throws PermissionDeniedException, BaseException
dc
- The DbControl
which will be used for
permission checking and database access.reporter
- The reporter to get the reporter type data for.ReporterType
object.PermissionDeniedException
- If the logged in user doesn't
have read permission to the itemBaseException
- If there is another errorpublic static void setReporterType(ReporterData reporter, ReporterType reporterType) throws PermissionDeniedException, BaseException
BasicBatcher.update(net.sf.basedb.core.data.BatchableData)
for the changes to be saved in the database.reporter
- The reporter data objectreporterType
- The new reporter type or nullPermissionDeniedException
- If the logged in user doesn't have
use permission on the reporter typeBaseException
- If there is another errorprivate static java.lang.String getClonedSelectSql(VirtualDb vdb)