|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.BasicItem<D> net.sf.basedb.core.OwnedItem<D> net.sf.basedb.core.SharedItem<D> net.sf.basedb.core.CommonItem<BioPlateEventData> net.sf.basedb.core.BioPlateEvent
public class BioPlateEvent
A bioplate event represents something that happened simultaneously to the biomaterial
on one or more bioplates. Individual BioMaterialEvent
:s may be linked with
a bioplate event. The biomaterial events are then locked and most properties
are set on the bioplate event. The description field is mapped to the
comment field of the biomaterial events but it is possible to overwrite with a specific comment.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.basedb.core.Transactional |
---|
Transactional.Action |
Field Summary | |
---|---|
private boolean |
needSynchronize
|
static Item |
TYPE
The type of item represented by this class. |
Fields inherited from interface net.sf.basedb.core.Nameable |
---|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH |
Constructor Summary | |
---|---|
BioPlateEvent(BioPlateEventData data)
|
Method Summary | |
---|---|
BioPlateEventParticipant |
addParticipant(BioPlate bioPlate,
String role,
int index)
Add a bioplate as a participant in this event. |
private BioPlateEventParticipantData |
findParticipant(BioPlateData plate)
Find the participant object for the given bioplate. |
ItemQuery<BioMaterialEvent> |
getBioMaterialEvents()
Get a query returning all biomaterial events linked to this event. |
static BioPlateEvent |
getById(DbControl dc,
int id)
Get a BioPlateEvent item when you know the id. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
Date |
getEventDate()
Get the date this event was done in the lab. |
BioPlateEventType |
getEventType()
Get the event type of this event. |
Hardware |
getHardware()
Get the Hardware that was used in this event. |
static BioPlateEvent |
getNew(DbControl dc,
BioPlateEventType eventType)
Create a new BioPlateEvent item. |
BioPlateEventParticipant |
getParticipant(BioPlate bioPlate)
Get the participant object representing the given bioplate in this event. |
ItemQuery<BioPlateEventParticipant> |
getParticipants()
Get a query returning all participants in the event. |
Protocol |
getProtocol()
Get the Protocol describing the procedure used in this event. |
static ItemQuery<BioPlateEvent> |
getQuery()
Get a query that returns bioplate event items. |
Item |
getType()
Get the type of item represented by the object. |
boolean |
isParticipant(BioPlate plate)
Check if the given bioplate is a participant of this event. |
(package private) void |
onBeforeCommit(Transactional.Action action)
If a project is active, automatically share the new item according to the settings of that project, unless a project or item key has been explicitely set (including null). |
void |
removeParticipant(BioPlate bioPlate)
Remove the given bioplate from this event. |
void |
setDescription(String description)
Set the description. |
void |
setEventDate(Date eventDate)
Set the date this event was done in the lab. |
(package private) void |
setEventType(BioPlateEventType eventType)
|
void |
setHardware(Hardware hardware)
Set the Hardware that was used in this event. |
void |
setProtocol(Protocol protocol)
Set the Protocol that describes the procedure used in this event. |
(package private) void |
synchronizeAllBioMaterialEvents()
Synchronize all properties on the child biomaterial events that are related to this event. |
(package private) void |
synchronizeProperties(BioMaterialEventData event,
BioPlateEventParticipantData participant)
Synchronize all related properties between this event and the biomaterial event. |
Methods inherited from class net.sf.basedb.core.CommonItem |
---|
getDescription, getName, isRemoved, setName, setRemoved, toTransferable |
Methods inherited from class net.sf.basedb.core.SharedItem |
---|
getItemKey, getProjectKey, initPermissions, isShared, setItemKey, setProjectKey, toTransferable |
Methods inherited from class net.sf.basedb.core.OwnedItem |
---|
getOwner, isOwner, setOwner, takeOwnership, toTransferable |
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getUsingItems, getVersion, hashCode, hasPermission, isDetached, isInDatabase, isUsed, onAfterCommit, onAfterInsert, onRollback, setDbControl, setProjectDefaults, toString, toTransferable, validate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.Identifiable |
---|
getId, getVersion |
Methods inherited from interface net.sf.basedb.core.AccessControlled |
---|
checkPermission, getPermissions, hasPermission |
Methods inherited from interface net.sf.basedb.core.Ownable |
---|
getOwner, isOwner, setOwner, takeOwnership |
Field Detail |
---|
public static final Item TYPE
Item.BIOPLATEEVENT
,
getType()
private boolean needSynchronize
Constructor Detail |
---|
BioPlateEvent(BioPlateEventData data)
Method Detail |
---|
public static BioPlateEvent getNew(DbControl dc, BioPlateEventType eventType) throws BaseException
BioPlateEvent
item.
dc
- The DbControl
which will be used for
permission checking and database accesseventType
- The event type of the event (must not be null)
BioPlateEvent
item
BaseException
- If there is an errorpublic static BioPlateEvent getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
BioPlateEvent
item 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
BioPlateEvent
item
ItemNotFoundException
- If an item with the specified
id is not found
PermissionDeniedException
- If the logged in user doesn't
have read permission to the item
BaseException
- If there is another errorpublic static ItemQuery<BioPlateEvent> getQuery()
ItemQuery
object.public Item getType()
Identifiable
Item
enumeration.
getType
in interface Identifiable
public Date getEntryDate()
Registered
getEntryDate
in interface Registered
public void setDescription(String description) throws PermissionDeniedException, InvalidDataException
setDescription
in interface Nameable
setDescription
in class CommonItem<BioPlateEventData>
description
- The new description for the item
PermissionDeniedException
- If the logged in user doesn't
have write permission
InvalidDataException
- If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH
constantvoid onBeforeCommit(Transactional.Action action) throws NotLoggedInException, BaseException
SharedItem
onBeforeCommit
in class SharedItem<BioPlateEventData>
NotLoggedInException
- If no user is logged in
BaseException
- If there is another errorTransactional
,
Core API overview - Transaction handling,
Coding rules and guidelines for item classespublic Protocol getProtocol() throws PermissionDeniedException, BaseException
Protocol
describing the procedure used in this event.
Protocol
item, or null if not known
PermissionDeniedException
- If the logged in user doesn't have
read permission to the protocol
BaseException
- If there is another errorpublic void setProtocol(Protocol protocol) throws PermissionDeniedException
Protocol
that describes the procedure used in this event.
The protocol is also updated on all related biomaterial events (when the
transaction is committed).
protocol
- A Protocol
item, or null if not known
PermissionDeniedException
- If the logged in user doesn't have
write permission on this event or use permission for the protocolpublic Hardware getHardware() throws PermissionDeniedException, BaseException
Hardware
that was used in this event.
Hardware
item, or null if not known
PermissionDeniedException
- If the logged in user doesn't have
read permission to the hardware
BaseException
- If there is another errorpublic void setHardware(Hardware hardware) throws PermissionDeniedException
Hardware
that was used in this event. The hardware
is also updated on all related biomaterial events (when the
transaction is committed).
hardware
- A Hardware
item, or null if not known
PermissionDeniedException
- If the logged in user doesn't have
write permission on this event or use permission for the hardwarepublic Date getEventDate()
Date
object, or null if not knownpublic void setEventDate(Date eventDate) throws PermissionDeniedException
eventDate
- The date, or null if not known
PermissionDeniedException
- If the logged in user doesn't have
write permission on this eventpublic BioPlateEventType getEventType()
void setEventType(BioPlateEventType eventType)
public boolean isParticipant(BioPlate plate)
plate
- A bioplate
public BioPlateEventParticipant getParticipant(BioPlate bioPlate)
bioPlate
- The bioplate
public BioPlateEventParticipant addParticipant(BioPlate bioPlate, String role, int index)
bioPlate
- The bioplate to add as a participant (null is not allowed)role
- The rolw of the plateindex
- The index (if the event requires ordering of the plates)
public void removeParticipant(BioPlate bioPlate)
bioPlate
- The bioplate
PermissionDeniedException
- If the logged in user
doesn't have write permissionpublic ItemQuery<BioPlateEventParticipant> getParticipants()
public ItemQuery<BioMaterialEvent> getBioMaterialEvents()
private BioPlateEventParticipantData findParticipant(BioPlateData plate)
plate
- The bioplate
void synchronizeAllBioMaterialEvents()
void synchronizeProperties(BioMaterialEventData event, BioPlateEventParticipantData participant)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |