Package net.sf.basedb.core
Class ArrayDesignPlate
- java.lang.Object
-
- net.sf.basedb.core.BasicItem
-
- net.sf.basedb.core.ChildItem
-
- net.sf.basedb.core.ArrayDesignPlate
-
- All Implemented Interfaces:
AccessControlled
,Identifiable
public class ArrayDesignPlate extends ChildItem
- Version:
- 2.0
- Author:
- Enell
- Last modified
- $Date$
-
-
Field Summary
Fields Modifier and Type Field Description private static QueryRuntimeFilter
RUNTIME_FILTER
This filter will only return items if the logged in user has generic read permission to array designs.static Item
TYPE
The type of item represented by this class.
-
Constructor Summary
Constructors Constructor Description ArrayDesignPlate(ArrayDesignPlateData arrayDesignPlateData)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayDesign
getArrayDesign()
Gets this item'sArrayDesign
.(package private) static ArrayDesignPlate
getById(DbControl dc, int id)
Get aArrayDesignPlate
item when you know the id.(package private) ArrayDesignPlateData
getData()
Get theBasicData
object that holds all data for this item.Plate
getPlate()
Gets thePlate
that belongs to this item.int
getPosition()
Gets the position of this item.static ItemQuery<ArrayDesignPlate>
getQuery(ArrayDesign design)
Get a query that returns ArrayDesignPlates connections for the specified array design.(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 the array design this plate is used on.boolean
isUsed()
Always TRUE.-
Methods inherited from class net.sf.basedb.core.ChildItem
getPermissionForUse, getPermissionForWriteDeleteAndCreate, getPluginPermissions, initPermissions
-
Methods inherited from class net.sf.basedb.core.BasicItem
addAnnotatableParents, addUsingItems, addUsingItems, breakCircularReferences, checkBatchAnnotatableUsage, checkPermission, equals, getBasicData, getDbControl, getId, getPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, onBeforeCommit, onRollback, setDbControl, setProjectDefaults, toString, validate
-
-
-
-
Field Detail
-
TYPE
public static final Item TYPE
The type of item represented by this class.- See Also:
Item.ARRAYDESIGNPLATE
,getType()
-
RUNTIME_FILTER
private static final QueryRuntimeFilter RUNTIME_FILTER
This filter will only return items if the logged in user has generic read permission to array designs.
-
-
Constructor Detail
-
ArrayDesignPlate
ArrayDesignPlate(ArrayDesignPlateData arrayDesignPlateData)
-
-
Method Detail
-
getQuery
public static ItemQuery<ArrayDesignPlate> getQuery(ArrayDesign design)
Get a query that returns ArrayDesignPlates connections for the specified array design.- Parameters:
design
- The array design to retreive plate connections for, null is allowed if the logged in user has generic READ permission for array designs in which case all plate connections will be retrieved- Returns:
- An
ItemQuery
object - See Also:
ArrayDesign.getArrayDesignPlates()
-
getById
static ArrayDesignPlate getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
Get aArrayDesignPlate
item when you know the id.- Parameters:
dc
- TheDbControl
which will be used for permission checking and database access.id
- The id of the item to load- Returns:
- The
ArrayDesignPlate
item - Throws:
ItemNotFoundException
- If an item with the specified id is not foundPermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission to the itemBaseException
- If there is another error
-
getData
ArrayDesignPlateData getData()
Description copied from class:BasicItem
Get theBasicData
object that holds all data for this item.
-
getType
public Item getType()
Description copied from interface:Identifiable
Get the type of item represented by the object. The returned value is one of the values defined in theItem
enumeration.- Returns:
- A value indicating the type of item
-
isUsed
public boolean isUsed() throws BaseException
Always TRUE. It is used by the array design.- Overrides:
isUsed
in classBasicItem
- Returns:
- TRUE if this item is used, FALSE otherwise
- Throws:
BaseException
- If not able to tell if item is used or not.- See Also:
BasicItem.getUsingItems()
-
getUsingItems
public Set<ItemProxy> getUsingItems() throws BaseException
Get the array design this plate is used on.- Overrides:
getUsingItems
in classBasicItem
- Returns:
- A set containing proxies for the items, or an empty set if no items are using this item
- Throws:
BaseException
- If there is an error loading the items- Since:
- 2.2
- See Also:
BasicItem.addUsingItems(Set, Item, org.hibernate.query.Query)
-
getSharedParent
SharedData getSharedParent()
Description copied from class:ChildItem
Get the shareable parent item of this child item. This is used by theChildItem.initPermissions(int, int)
method to calculate the logged in user's permissions for the child item.- Specified by:
getSharedParent
in classChildItem
- Returns:
- The parent item
-
getPlate
public Plate getPlate() throws PermissionDeniedException, BaseException
Gets thePlate
that belongs to this item.- Returns:
- A
Plate
object - Throws:
PermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission.BaseException
- If there is another error.
-
getArrayDesign
public ArrayDesign getArrayDesign() throws PermissionDeniedException, BaseException
Gets this item'sArrayDesign
.- Returns:
- An
ArrayDesign
object. - Throws:
PermissionDeniedException
- If the logged in user doesn't havePermission.READ
permission.BaseException
- If there is another error.
-
getPosition
public int getPosition()
Gets the position of this item.
-
-