|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.basedb.core.BioMaterialEventSource
public class BioMaterialEventSource
Class for holding information about a parent biomaterial
that was used in an event that created a child biomaterial or
a physical bioassay. Each event may only include the same parent
biomaterial once. Permission-wise the information belongs
to the BioMaterialEvent and the user has the same permissions
as for the event.
| Nested Class Summary | |
|---|---|
static class |
BioMaterialEventSource.BioMaterialEventSourceTransformer
|
| Field Summary | |
|---|---|
private BioMaterialEventSourceData |
data
|
private DbControl |
dc
|
| Constructor Summary | |
|---|---|
BioMaterialEventSource(DbControl dc,
BioMaterialEventSourceData data)
|
|
| Method Summary | |
|---|---|
void |
checkPermission(Permission permission)
Check if the logged in user has the desired permission on the item, otherwise throw an exception. |
BioMaterial |
getBioMaterial()
Get the biomaterial that was used as a source in this event. |
BioMaterialEvent |
getEvent()
Get the event that this information belongs to. |
Set<Permission> |
getPermissions()
Get the logged in user's permissions on the item. |
int |
getPosition()
Get the position that the source biomaterial was used on in the event. |
static SpecialQuery<BioMaterialEventSource> |
getQuery(BioMaterial source)
Get a query returning event information where a given biomaterial has been used as a source. |
static SpecialQuery<BioMaterialEventSource> |
getQuery(BioMaterialEvent event)
Get a query returning source information for a given (creation) event. |
Float |
getUsedQuantity()
Get the quantity that was used from the source biomaterial by the event. |
boolean |
hasPermission(Permission permission)
Check if the logged in user has the desired permission on the item. |
void |
setPosition(int position)
|
void |
setUsedQuantity(Float usedQuantity)
Set the quantity that was used from the source biomaterial by the event. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final DbControl dc
private final BioMaterialEventSourceData data
| Constructor Detail |
|---|
BioMaterialEventSource(DbControl dc,
BioMaterialEventSourceData data)
| Method Detail |
|---|
public static SpecialQuery<BioMaterialEventSource> getQuery(BioMaterialEvent event)
event - An event or nullpublic static SpecialQuery<BioMaterialEventSource> getQuery(BioMaterial source)
source - An biomaterial or nullpublic boolean hasPermission(Permission permission)
AccessControlled
hasPermission in interface AccessControlledpermission - The permission to check if the user has.
public void checkPermission(Permission permission)
throws PermissionDeniedException
AccessControlled
checkPermission in interface AccessControlledpermission - Permission the user should have.
PermissionDeniedException - If the user doesn't have the
requested permissionpublic Set<Permission> getPermissions()
AccessControlled
getPermissions in interface AccessControlledpublic BioMaterialEvent getEvent()
public BioMaterial getBioMaterial()
public Float getUsedQuantity()
public void setUsedQuantity(Float usedQuantity)
MeasuredBioMaterial.
usedQuantity - The used quantity or null if not knownpublic int getPosition()
public void setPosition(int position)
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||