|
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.ChildItem<BioPlateEventParticipantData> net.sf.basedb.core.BioPlateEventParticipant
public class BioPlateEventParticipant
Holds information about a bioplate that is participating in a bioplate event. The bioplate may have a specific 'role' and an 'index' (if the ordering among multiple plates is important). The BASE core itself doesn't requires or makes any use of those attributes. It is also possible to link individual biomaterial events to a participant.
A bioplate participant object is formally a child item to the bioplate event, but users that has read permission to the bioplate also get read permission to the participant object.
Field Summary | |
---|---|
static int |
MAX_ROLE_LENGTH
The maximum length of the role string that can be stored in the database. |
static Item |
TYPE
The type of item represented by this class. |
Constructor Summary | |
---|---|
BioPlateEventParticipant(BioPlateEventParticipantData data)
|
Method Summary | |
---|---|
BioPlate |
getBioPlate()
Get the BioPlate . |
static BioPlateEventParticipant |
getById(DbControl dc,
int id)
Get a BioPlateEventParticipant item when you know the id. |
BioPlateEvent |
getEvent()
Get the BioPlateEvent . |
int |
getIndex()
Get the index of the plate in this event. |
(package private) static BioPlateEventParticipant |
getNew(DbControl dc,
BioPlateEvent event,
BioPlate plate)
Creates a new participant for the given event and bioplate. |
static ItemQuery<BioPlateEventParticipant> |
getQuery(BioPlate bioPlate)
Get a query configured to return all event participants for a bioplate. |
static ItemQuery<BioPlateEventParticipant> |
getQuery(BioPlateEvent event)
Get a query configured to return all participants for a bioplate event. |
String |
getRole()
Get the role that the plate has in this event. |
(package private) SharedData |
getSharedParent()
Get the shareable parent item of this child item. |
Item |
getType()
Get the type of item represented by the object. |
(package private) void |
initPermissions(int granted,
int denied)
If the logged in user has read permission for the parent, read permission is granted. |
(package private) void |
onBeforeCommit(Transactional.Action action)
This method is called on each Transactional item and on
all items if the action is Transactional.Action.CREATE
or Transactional.Action.DELETE before a commit is issued to the database. |
void |
setIndex(int index)
Set the index of the plate in this event. |
void |
setRole(String role)
Set the role that the plate has in this event. |
Methods inherited from class net.sf.basedb.core.ChildItem |
---|
getPermissionForWriteDeleteAndCreate, getPluginPermissions |
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, 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 |
Field Detail |
---|
public static final Item TYPE
Item.BIOPLATEEVENTPARTICIPANT
,
getType()
public static final int MAX_ROLE_LENGTH
setRole(String)
,
Constant Field ValuesConstructor Detail |
---|
BioPlateEventParticipant(BioPlateEventParticipantData data)
Method Detail |
---|
static BioPlateEventParticipant getNew(DbControl dc, BioPlateEvent event, BioPlate plate)
BioPlateEvent.addParticipant(BioPlate, String, int)
public static BioPlateEventParticipant getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
BioPlateEventParticipant
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
BioPlateEventParticipant
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<BioPlateEventParticipant> getQuery(BioPlateEvent event) throws InvalidDataException
event
- The event to get participants for (null is not allowed)
ItemQuery
object
InvalidUseOfNullException
- If the event parameter is null
InvalidDataException
public static ItemQuery<BioPlateEventParticipant> getQuery(BioPlate bioPlate) throws InvalidDataException
bioPlate
- The bioplate to get participants for (null is not allowed)
ItemQuery
object
InvalidUseOfNullException
- If the bioplate parameter is null
InvalidDataException
public Item getType()
Identifiable
Item
enumeration.
SharedData getSharedParent()
ChildItem
ChildItem.initPermissions(int, int)
method to calculate
the logged in user's permissions for the child item.
getSharedParent
in class ChildItem<BioPlateEventParticipantData>
void initPermissions(int granted, int denied) throws BaseException
ChildItem
ChildItem.getPermissionForWriteDeleteAndCreate()
method
for the parent, WRITE, DELETE and CREATE permission
is granted.
initPermissions
in class ChildItem<BioPlateEventParticipantData>
granted
- Permissions that have been granted by the subclassdenied
- Permissions that have been denied by the subclass
BaseException
- If the permissions couldn't be initialisedvoid onBeforeCommit(Transactional.Action action) throws BaseException
BasicItem
Transactional
item and on
all items if the action is Transactional.Action.CREATE
or Transactional.Action.DELETE
before a commit is issued to the database.
If the subclass overrides this method it must also propagate the call
to the superclass, ie. super.onBeforeCommit(action)
.
onBeforeCommit
in class BasicItem<BioPlateEventParticipantData>
BaseException
- If there is an errorTransactional
,
Core API overview - Transaction handling,
Coding rules and guidelines for item classespublic BioPlate getBioPlate() throws PermissionDeniedException, BaseException
BioPlate
.
PermissionDeniedException
- If the logged in user doesn't have
read permission for the bioplate
BaseException
- If there is another errorpublic BioPlateEvent getEvent() throws PermissionDeniedException, BaseException
BioPlateEvent
.
PermissionDeniedException
- If the logged in user doesn't have
read permission for the event
BaseException
- If there is another errorpublic String getRole()
public void setRole(String role)
public int getIndex()
public void setIndex(int index)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |