|
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.BasicItem<D>
net.sf.basedb.core.ChildItem<PlateEventTypeData>
net.sf.basedb.core.PlateEventType
public class PlateEventType
This class is used together with the PlateType class
to define event types for plates. A plate may be associated with one
of each event type.
Plate,
PlateType,
PlateEvent| Field Summary | |
|---|---|
private static QueryRuntimeFilter |
RUNTIME_FILTER
This filter will only return items if the logged in user has generic read permission to plate types. |
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 | |
|---|---|
PlateEventType(PlateEventTypeData plateEventTypeData)
|
|
| Method Summary | |
|---|---|
static PlateEventType |
getById(DbControl dc,
int id)
Get a PlateEventType item when you know the id. |
String |
getDescription()
Get the description for the item. |
String |
getName()
Get the name of the item. |
static PlateEventType |
getNew(DbControl dc,
PlateType plateType)
Create a new PlateEventType item. |
int |
getOrdinal()
Get the order of this event among the list of events. |
PlateType |
getPlateType()
Get the PlateType this event type belongs to. |
ItemSubtype |
getProtocolType()
Get the associated protocol type item. |
static ItemQuery<PlateEventType> |
getQuery(PlateType plateType)
Get a query configured to retrieve event types for the specified plate type |
(package private) SharedData |
getSharedParent()
Get the shareable parent item of this child item. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get all: PlateEvent:s of this type
|
boolean |
isRemoved()
Check if the removed flag is set for this item. |
boolean |
isUsed()
Check if: A PlateEvent of this type exists
|
void |
setDescription(String description)
Set the description for the item. |
void |
setName(String name)
Set the name of the item. |
void |
setOrdinal(int ordinal)
Set the order of this event in relation to the list of all events. |
private void |
setPlateType(PlateType plateType)
Set the plate type owning this event type. |
void |
setProtocolType(ItemSubtype protocolType)
Set the protocol type of this PlateTypeEvent item. |
void |
setRemoved(boolean removed)
Set the removed flag for this item. |
| Methods inherited from class net.sf.basedb.core.ChildItem |
|---|
getPermissionForWriteDeleteAndCreate, getPluginPermissions, initPermissions |
| Methods inherited from class net.sf.basedb.core.BasicItem |
|---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onBeforeCommit, 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 |
| Field Detail |
|---|
public static final Item TYPE
Item.PLATEEVENTTYPE,
getType()private static final QueryRuntimeFilter RUNTIME_FILTER
| Constructor Detail |
|---|
PlateEventType(PlateEventTypeData plateEventTypeData)
| Method Detail |
|---|
public static PlateEventType getNew(DbControl dc,
PlateType plateType)
throws InvalidDataException,
BaseException
PlateEventType item.
dc - The DbControl which will be used for
permission checking and database accessplateType - The plate type
PlateEventType item
PermissionDeniedException - If the loggged in user
doesn't have write permission for the plate type
InvalidDataException - If the plate type is null
BaseException - If there is an error
public static PlateEventType getById(DbControl dc,
int id)
throws ItemNotFoundException,
PermissionDeniedException,
BaseException
PlateEventType 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
PlateEventType item
ItemNotFoundException - If an item with the specified
id is not found
PermissionDeniedException - If the logged in user doesn't
have Permission.READ permission to the item
BaseException - If there is another errorpublic static ItemQuery<PlateEventType> getQuery(PlateType plateType)
plateType - The plate type to retreive event types for, null is allowed if
the logged in user has generic READ permission for plate types in which case
all event types will be returned
ItemQuery objectPlateType.getEventTypes()public Item getType()
IdentifiableItem enumeration.
getType in interface Identifiablepublic String getName()
Nameable
getName in interface NameableString with the name of the item
public void setName(String name)
throws PermissionDeniedException,
InvalidDataException
NameableNameable.MAX_NAME_LENGTH constant.
setName in interface Nameablename - The new name for the item
PermissionDeniedException - If the logged in user doesn't
have write permission
InvalidDataException - If the name is null or longer
than specified by the Nameable.MAX_NAME_LENGTH constantpublic String getDescription()
Nameable
getDescription in interface NameableString with a description of the item
public void setDescription(String description)
throws PermissionDeniedException,
InvalidDataException
NameableNameable.MAX_DESCRIPTION_LENGTH constant.
setDescription in interface Nameabledescription - 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 constantpublic boolean isRemoved()
Removable
isRemoved in interface Removable
public void setRemoved(boolean removed)
throws PermissionDeniedException
Removable
setRemoved in interface Removableremoved - TRUE if the item should be flagged as removed,
FALSE otherwise
PermissionDeniedException - If the logged in user doesn't
have Permission.DELETE permission for setting the flag
to TRUE or Permission.WRITE permission for setting the
flag to FALSE
public boolean isUsed()
throws BaseException
PlateEvent of this type exists
isUsed in class BasicItem<PlateEventTypeData>BaseException - If not able to tell if item is used or not.BasicItem.getUsingItems()public Set<ItemProxy> getUsingItems()
PlateEvent:s of this type
getUsingItems in class BasicItem<PlateEventTypeData>BasicItem.addUsingItems(Set, Item, org.hibernate.Query)SharedData getSharedParent()
ChildItemChildItem.initPermissions(int, int) method to calculate
the logged in user's permissions for the child item.
getSharedParent in class ChildItem<PlateEventTypeData>
public PlateType getPlateType()
throws PermissionDeniedException,
BaseException
PlateType this event type belongs to.
PlateType item
PermissionDeniedException - If the logged in user doesn't have
Permission.READ permission for the plate type
BaseException - If there is another error
private void setPlateType(PlateType plateType)
throws PermissionDeniedException,
InvalidDataException
PermissionDeniedException - If the logged in user
doesn't have write permission for the plate type
InvalidDataException - If the plate type is null
public ItemSubtype getProtocolType()
throws PermissionDeniedException,
BaseException
PlateEvent items for a Plate the protocol for the
event must be of this type.
ProtocolType item, or null
if no protocol type has been specified
PermissionDeniedException - If the logged in user doesn't
have read permission to the protocol type
BaseException - If there is another error
public void setProtocolType(ItemSubtype protocolType)
throws PermissionDeniedException,
BaseException
PlateTypeEvent item.
When creating PlateEvent items for a Plate the
protocol for the event must be of this type.
protocolType - The new ProtocolType
PermissionDeniedException - If the logged in user doesn't have
write permission for this event or use permission for the
protocol type
BaseException - If there is another errorpublic int getOrdinal()
public void setOrdinal(int ordinal)
throws PermissionDeniedException,
InvalidDataException
ordinal - The new ordinal value
PermissionDeniedException - If the logged in user doesn't
have write permission to this event type
InvalidDataException - If the ordinal is less than one
|
3.1.1: 2012-03-29 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||