|
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<BioPlateEventTypeData> net.sf.basedb.core.BioPlateEventType
public class BioPlateEventType
The type of a bioplate event defines what happened in the event. A type is usually coupled to a certain functionality in the client application.
Field Summary | |
---|---|
static String |
CREATE_BIOMATERIAL
The system ID for "Create" event type. |
static String |
GENERIC
The system ID for "Generic" event type. |
static String |
HYBRIDIZATION
The system ID for "Hybridization" event type. |
static String |
MOVE
The system ID for "Move" event type. |
static String |
PLACE_ON_PLATE
The system ID for "Place-on-plate" event type. |
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 |
Fields inherited from interface net.sf.basedb.core.SystemItem |
---|
MAX_SYSTEM_ID_LENGTH |
Constructor Summary | |
---|---|
BioPlateEventType(BioPlateEventTypeData data)
|
Method Summary | |
---|---|
static BioPlateEventType |
getById(DbControl dc,
int id)
Gets a BioPlate event type when knowing the item's id |
static BioPlateEventType |
getById(DbControl dc,
String systemId)
Gets a BioPlate event type when knowing the item's system id |
String |
getDescription()
Get the description for the item. |
String |
getName()
Get the name of the item. |
static BioPlateEventType |
getNew(DbControl dc,
String systemId)
Creates a new bioplate event type. |
static ItemQuery<BioPlateEventType> |
getQuery()
Gets query that returns bioplate event types. |
String |
getSystemId()
Get the system id for the item. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Gets all BioPlates and BioPlateEventDefinitions
using this type |
boolean |
isRemoved()
Check if the removed flag is set for this item. |
boolean |
isSystemItem()
Check if the item is a system item or not. |
boolean |
isUsed()
Check if there are any BioPlateEvents using this type. |
(package private) void |
onAfterInsert()
This method is called on all items directly after Hibernate has inserted it into the database. |
void |
setDescription(String description)
Set the description for the item. |
void |
setName(String name)
Set the name of the item. |
void |
setRemoved(boolean removed)
Set the removed flag for this item. |
(package private) void |
setSystemId(String systemId)
|
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, initPermissions, isDetached, isInDatabase, onAfterCommit, 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.BIOPLATEEVENTTYPE
,
getType()
public static final String GENERIC
public static final String PLACE_ON_PLATE
public static final String MOVE
public static final String CREATE_BIOMATERIAL
public static final String HYBRIDIZATION
Constructor Detail |
---|
BioPlateEventType(BioPlateEventTypeData data)
Method Detail |
---|
public static BioPlateEventType getNew(DbControl dc, String systemId) throws BaseException, InvalidDataException
dc
- DbControl used for database accesssystemId
- The system id to give to the event type (can't be changed later)
BaseException
- If anything goes wrong when creating
InvalidDataException
public static BioPlateEventType getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
dc
- DbControl used for database accessid
- The item's id.
BioPlateEventType
object
ItemNotFoundException
- If no item with the given id was found
PermissionDeniedException
- If logged in user doesn't have read
permission to the requested item
BaseException
- If there is another error.public static BioPlateEventType getById(DbControl dc, String systemId) throws ItemNotFoundException, PermissionDeniedException, BaseException
dc
- DbControl used for database accesssystemId
- The item's system id.
BioPlateEventType
object
ItemNotFoundException
- If no item with the given id was found
PermissionDeniedException
- If logged in user doesn't have read
permission to the requested item
BaseException
- If there is another error.public static ItemQuery<BioPlateEventType> getQuery()
ItemQuery
objectpublic Item getType()
Identifiable
Item
enumeration.
getType
in interface Identifiable
public String getName()
Nameable
getName
in interface Nameable
String
with the name of the itempublic void setName(String name) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_NAME_LENGTH
constant.
setName
in interface Nameable
name
- 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 Nameable
String
with a description of the itempublic void setDescription(String description) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_DESCRIPTION_LENGTH
constant.
setDescription
in interface Nameable
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
constantpublic boolean isRemoved()
Removable
isRemoved
in interface Removable
public void setRemoved(boolean removed) throws PermissionDeniedException
Removable
setRemoved
in interface Removable
removed
- 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 FALSEpublic boolean isUsed()
BioPlateEvents
using this type.
isUsed
in class BasicItem<BioPlateEventTypeData>
BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
BioPlates
and BioPlateEventDefinitions
using this type
getUsingItems
in class BasicItem<BioPlateEventTypeData>
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
void onAfterInsert() throws BaseException
BasicItem
BasicItem.onBeforeCommit(Transactional.Action)
in case the id is needed. The id
has not been generated when the onBeforeCommit
is called.
onAfterInsert
in class BasicItem<BioPlateEventTypeData>
BaseException
- If there is an errorTransactional
,
Core API overview - Transaction handling,
Coding rules and guidelines for item classespublic String getSystemId()
SystemItem
getSystemId
in interface SystemItem
public boolean isSystemItem()
SystemItem
isSystemItem
in interface SystemItem
void setSystemId(String systemId)
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |