|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.core.BasicItem<D>
org.proteios.core.BioMaterialEvent<D>
public abstract class BioMaterialEvent<D extends BioMaterialEventData>
This class represents an event in the life of a MeasuredBioMaterial.
There are two main types of events: creation events, and other events. A
creation event is an event that produces a measured biomaterial from other
biomaterials. Other events are used to leave a note about something that
affected an already existing biomaterial.
| Field Summary | |
|---|---|
static int |
MAX_COMMENT_LENGTH
The maximum length of the comment about this event. |
static Item |
TYPE
The type of item represented by this class. |
| Method Summary | |
|---|---|
void |
addSource(MeasuredBioMaterial bioMaterial,
Float usedQuantity)
Add a source biomaterial to this event or update the used quantity of an existing source. |
MeasuredBioMaterial |
getBioMaterial()
Get the single MeasuredBioMaterial that was used for this event. |
String |
getComment()
Get the comment about this event. |
Date |
getEntryDate()
Get the date this event was added to the database. |
Date |
getEventDate()
Get the date this event was done in the lab. |
String |
getEventType()
Get the type of event. |
BioMaterialEvent<?> |
getPreviousBioMaterialEvent()
This function returns the previous event that is directly linked to this event. |
Protocol |
getProtocol()
Get the Protocol describing the procedure used in this event. |
static ItemQuery<BioMaterialEvent> |
getQuery(MeasuredBioMaterial bioMaterial)
Get a query that returns events for a biomaterial. |
Set<MeasuredBioMaterial> |
getSourceBioMaterials()
Get all source biomaterials |
ItemQuery<? extends MeasuredBioMaterial> |
getSources()
Get a query that return all biomaterials used as sources for this event. |
Item |
getType()
Get the type of item represented by the object. |
Float |
getUsedQuantityInMicroLiters()
Get the quantity that was used from the biomaterial by this event. |
Float |
getUsedQuantityInMicroLiters(MeasuredBioMaterial bioMaterial)
Get the quantity in microliters that was used by this event for the specified biomaterial. |
User |
getUser()
Get the User that is responsible for this event. |
boolean |
isUsed()
BioMaterialEvents are not linked to any other items. |
void |
removeSource(MeasuredBioMaterial bioMaterial)
Remove a biomaterial used as a source. |
protected void |
setBioMaterial(MeasuredBioMaterial bioMaterial)
Set the single biomaterial that was used for this event. |
void |
setComment(String comment)
Set the comment about this event. |
protected void |
setEntryDate(Date entryDate)
Set the date this event was added to the database. |
void |
setEventDate(Date eventDate)
Set the date this event was done in the lab. |
void |
setPreviousBioMaterialEvent(BioMaterialEvent<?> previousBioMaterialEvent)
This function sets the previous event that is directly linked to this event. |
void |
setProtocol(Protocol protocol)
Set the Protocol that describes the procedure used in this event. |
void |
setUsedQuantityInMicroLiters(Float usedQuantity)
Set the used quantity measured in microliters. |
protected void |
setUser(UserData userData)
Set the User that is responsible for this event. |
| Methods inherited from class org.proteios.core.BasicItem |
|---|
checkPermission, equals, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Item TYPE
Item.BIOMATERIALEVENT,
getType()public static final int MAX_COMMENT_LENGTH
setComment(String) method
to avoid exceptions.
| Method Detail |
|---|
public static ItemQuery<BioMaterialEvent> getQuery(MeasuredBioMaterial bioMaterial)
throws InvalidDataException
bioMaterial - The biomaterial to retreive events for, null is not
allowed
ItemQuery object
InvalidDataException - If the bioMaterial is nullMeasuredBioMaterial.getEvents()public Item getType()
IdentifiableItem enumeration.
public boolean isUsed()
throws BaseException
isUsed in class BasicItem<D extends BioMaterialEventData>BaseExceptionpublic String getEventType()
Type
public MeasuredBioMaterial getBioMaterial()
throws PermissionDeniedException,
BaseException
MeasuredBioMaterial that was used for this event.
If multiple biomaterials, getSources is used instead.
MeasuredBioMaterial item or null if this is
hybridization event
PermissionDeniedException - If the logged in user doesn't have read
permission to the biomaterial
BaseException - If there is another error
protected void setBioMaterial(MeasuredBioMaterial bioMaterial)
throws PermissionDeniedException,
InvalidDataException
PermissionDeniedException
InvalidDataException
protected void setEntryDate(Date entryDate)
throws InvalidDataException
InvalidDataException
public User getUser()
throws PermissionDeniedException,
BaseException
User that is responsible for this event.
User item
PermissionDeniedException - If the logged in user doesn't have read
permission to the user
BaseException - If there is another error
protected void setUser(UserData userData)
throws PermissionDeniedException,
BaseException
User that is responsible for this event.
userData - A UserData item
PermissionDeniedException - If the logged in user doesn't have read
permission to the user
BaseException - If there is another error
public 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 error
public void setProtocol(Protocol protocol)
throws PermissionDeniedException
Protocol that describes the procedure used in this event.
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 Float getUsedQuantityInMicroLiters()
public void setUsedQuantityInMicroLiters(Float usedQuantity)
throws PermissionDeniedException
PermissionDeniedExceptionpublic Float getUsedQuantityInMicroLiters(MeasuredBioMaterial bioMaterial)
bioMaterial - A biomaterial object
public void addSource(MeasuredBioMaterial bioMaterial,
Float usedQuantity)
throws PermissionDeniedException,
InvalidDataException,
BaseException
bioMaterial - The biomaterial used as a sourceusedQuantity - The quantity that was used from the source
biomaterial, measured in microliters
PermissionDeniedException - If the logged in user doesn't have
write permission for this event of use permission for the source
InvalidDataException - If this is not a creation event or if the
produced biomaterial is not pooled or if the source biomaterial
is of another type
BaseException - If there is another error
public void removeSource(MeasuredBioMaterial bioMaterial)
throws PermissionDeniedException,
InvalidDataException,
BaseException
bioMaterial - The biomaterial used as a source
PermissionDeniedException - If the logged in user doesn't have
write permission for this event of use permission for the source
InvalidDataException - If this is not a creation event or if the
produced biomaterial is not pooled or if the source biomaterial
is of another type
BaseException - If there is another errorpublic ItemQuery<? extends MeasuredBioMaterial> getSources()
ItemQuery objectpublic Set<MeasuredBioMaterial> getSourceBioMaterials()
public String getComment()
public void setComment(String comment)
throws PermissionDeniedException,
InvalidDataException
MAX_COMMENT_LENGTH
constant.
comment - The new comment
PermissionDeniedException - If the logged in user doesn't have
write permission on this event
InvalidDataException - If the comment is too longpublic Date getEntryDate()
Date objectpublic Date getEventDate()
Date object, or null if not known
public 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 BioMaterialEvent<?> getPreviousBioMaterialEvent()
public void setPreviousBioMaterialEvent(BioMaterialEvent<?> previousBioMaterialEvent)
previousBioMaterialEvent - The previousBioMaterialEvent to set.
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||