public class PlateGeometry extends BasicItem implements Nameable, Removable, Registered
Plate
. The number of rows and columns
must be specified when the item is created, and the values can't
be changed after that.
A PlateMapping
is a way to specify how one geometry can be
transformed to another. It holds information for how to map all source
wells to destination wells. For example it can
map four 96-well plates to one 384-well plate.
Plate
,
PlateMapping
Modifier and Type | Field and Description |
---|---|
static Item |
TYPE
The type of item represented by this class.
|
MAX_DESCRIPTION_LENGTH, MAX_NAME_LENGTH
Constructor and Description |
---|
PlateGeometry(PlateGeometryData plateGeometryData) |
Modifier and Type | Method and Description |
---|---|
static PlateGeometry |
getById(DbControl dc,
int id)
Get a
PlateGeometry item when you know the id. |
int |
getColumns()
Get the number of columns in this geometry.
|
(package private) PlateGeometryData |
getData()
Get the
BasicData object that holds all data for this item. |
String |
getDescription()
Get the description for the item.
|
Date |
getEntryDate()
Get the date that the item was registered in the database.
|
String |
getName()
Get the name of the item.
|
static PlateGeometry |
getNew(DbControl dc,
int rows,
int columns)
Create a new
PlateGeometry item. |
ItemQuery<PlateType> |
getPlateTypes()
Get a query returning all plate types using this geometry.
|
static ItemQuery<PlateGeometry> |
getQuery()
Get a query configured to retrieve plate geometries.
|
User |
getRemovedBy()
Get the user that flagged this item for removal.
|
int |
getRows()
Get the number of rows in this geometry.
|
Item |
getType()
Get the type of item represented by the object.
|
Set<ItemProxy> |
getUsingItems()
Get all:
PlateType :s of this geometry
PlateMapping :s using this geometry
BioPlate :s using this geometry
|
boolean |
isRemoved()
Check if the removed flag is set for this item.
|
boolean |
isUsed()
Check if:
A
PlateType with this geometry exists
A PlateMapping to/from this geometry exists
A BioPlate that uses this geometry exists
|
PlateType |
newPlateType()
Create a new
PlateType of this geometry. |
private void |
setColumns(int columns)
The number of columns cannot be changed, used at object creation only.
|
void |
setDescription(String description)
Set the description for the item.
|
void |
setEntryDate(Date entryDate)
Set the date the entry was registered in the database.
|
void |
setName(String name)
Set the name of the item.
|
void |
setRemoved(boolean removed)
Set the removed flag for this item.
|
private void |
setRows(int rows)
The number of rows cannot be changed, used at object creation only.
|
addAnnotatableParents, addUsingItems, addUsingItems, breakCircularReferences, checkBatchAnnotatableUsage, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, initPermissions, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getId, getVersion
checkPermission, getPermissions, hasPermission
public static final Item TYPE
Item.PLATEGEOMETRY
,
getType()
PlateGeometry(PlateGeometryData plateGeometryData)
public static PlateGeometry getNew(DbControl dc, int rows, int columns) throws InvalidDataException, BaseException
PlateGeometry
item.dc
- The DbControl
which will be used for
permission checking and database accessrows
- The number of rowscolumns
- The number of columnsPlateGeometry
itemInvalidDataException
- If the number of rows or columns is
less than or equal to zeroBaseException
- If there is an errorpublic static PlateGeometry getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
PlateGeometry
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 loadPlateGeometry
itemItemNotFoundException
- If an item with the specified
id is not foundPermissionDeniedException
- If the logged in user doesn't
have Permission.READ
permission to the itemBaseException
- If there is another errorpublic static ItemQuery<PlateGeometry> getQuery()
ItemQuery
objectPlateGeometryData getData()
BasicItem
BasicData
object that holds all data for this item.public Item getType()
Identifiable
Item
enumeration.getType
in interface Identifiable
public String getName()
Nameable
public void setName(String name) throws PermissionDeniedException, InvalidDataException
Nameable
Nameable.MAX_NAME_LENGTH
constant.setName
in interface Nameable
name
- The new name for the itemPermissionDeniedException
- If the logged in user doesn't
have write permissionInvalidDataException
- 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 itemPermissionDeniedException
- If the logged in user doesn't
have write permissionInvalidDataException
- If the description longer
than specified by the Nameable.MAX_DESCRIPTION_LENGTH
constantpublic boolean isRemoved()
Removable
public void setRemoved(boolean removed) throws PermissionDeniedException
Removable
setRemoved
in interface Removable
removed
- TRUE if the item should be flagged as removed,
FALSE otherwisePermissionDeniedException
- 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 User getRemovedBy() throws PermissionDeniedException, ItemNotFoundException
Removable
getRemovedBy
in interface Removable
PermissionDeniedException
- If the logged in user doesn't have
Permission.READ
permission for the userItemNotFoundException
- If the user that removed this item
can't be foundpublic Date getEntryDate()
Registered
getEntryDate
in interface Registered
public void setEntryDate(Date entryDate)
Registered
setEntryDate
in interface Registered
entryDate
- A date or null to use today's datepublic boolean isUsed() throws BaseException
PlateType
with this geometry exists
PlateMapping
to/from this geometry exists
BioPlate
that uses this geometry exists
isUsed
in class BasicItem
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems()
PlateType
:s of this geometry
PlateMapping
:s using this geometry
BioPlate
:s using this geometry
getUsingItems
in class BasicItem
BasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public int getRows()
private void setRows(int rows) throws InvalidDataException
InvalidDataException
- If the row count is less than 1public int getColumns()
private void setColumns(int columns) throws InvalidDataException
InvalidDataException
- If the column count is less than 1public PlateType newPlateType() throws PermissionDeniedException, BaseException
PlateType
of this geometry.PermissionDeniedException
- If the logged in user
doesn't have use permission for this plate geometryBaseException
- If there is another error