2.17.2: 2011-06-17

net.sf.basedb.core
Class ArrayDesignPlate

java.lang.Object
  extended by net.sf.basedb.core.BasicItem<D>
      extended by net.sf.basedb.core.ChildItem<ArrayDesignPlateData>
          extended by net.sf.basedb.core.ArrayDesignPlate
All Implemented Interfaces:
AccessControlled, Identifiable

public class ArrayDesignPlate
extends ChildItem<ArrayDesignPlateData>

Version:
2.0
Author:
Enell
Last modified
$Date$

Field Summary
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
ArrayDesignPlate(ArrayDesignPlateData arrayDesignPlateData)
           
 
Method Summary
 ArrayDesign getArrayDesign()
          Gets this item's ArrayDesign.
(package private) static ArrayDesignPlate getById(DbControl dc, int id)
          Get a ArrayDesignPlate item when you know the id.
 Plate getPlate()
          Gets the Plate 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
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
 

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 a ArrayDesignPlate item when you know the id.

Parameters:
dc - The DbControl 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 found
PermissionDeniedException - If the logged in user doesn't have Permission.READ permission to the item
BaseException - If there is another error

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 the Item 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 class BasicItem<ArrayDesignPlateData>
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 class BasicItem<ArrayDesignPlateData>
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)

getSharedParent

SharedData getSharedParent()
Description copied from class: ChildItem
Get the shareable parent item of this child item. This is used by the ChildItem.initPermissions(int, int) method to calculate the logged in user's permissions for the child item.

Specified by:
getSharedParent in class ChildItem<ArrayDesignPlateData>
Returns:
The parent item

getPlate

public Plate getPlate()
               throws PermissionDeniedException,
                      BaseException
Gets the Plate that belongs to this item.

Returns:
A Plate object
Throws:
PermissionDeniedException - If the logged in user doesn't have Permission.READ permission.
BaseException - If there is another error.

getArrayDesign

public ArrayDesign getArrayDesign()
                           throws PermissionDeniedException,
                                  BaseException
Gets this item's ArrayDesign.

Returns:
An ArrayDesign object.
Throws:
PermissionDeniedException - If the logged in user doesn't have Permission.READ permission.
BaseException - If there is another error.

getPosition

public int getPosition()
Gets the position of this item.


2.17.2: 2011-06-17