|
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<D> net.sf.basedb.core.OwnedItem<D> net.sf.basedb.core.SharedItem<D> net.sf.basedb.core.CommonItem<D> net.sf.basedb.core.AnnotatedItem<ArraySlideData> net.sf.basedb.core.ArraySlide
public class ArraySlide
This class represents a physical microarray slide.
Field Summary | |
---|---|
static int |
MAX_BARCODE_LENGTH
The maximum length of the barcode that can be stored in the database. |
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 | |
---|---|
ArraySlide(ArraySlideData data)
|
Method Summary | |
---|---|
static boolean |
barcodeExists(DbControl dc,
String barcode)
Checks if a slide with the given barcode already exists in the database. |
Set<Annotatable> |
getAnnotatableParents()
Get the array batch. |
ArrayBatch |
getArrayBatch()
Get the ArrayBatch item to which this slide belongs. |
String |
getBarcode()
Get the barcode of the slide. |
int |
getBatchIndex()
Get the index of this slide in the batch. |
static ArraySlide |
getById(DbControl dc,
int id)
Get a ArraySlide object when you know the ID. |
Date |
getEntryDate()
Get the date that the item was registered in the database. |
Hybridization |
getHybridization()
Get the Hybridization item which was used on this slide. |
static ArraySlide |
getNew(DbControl dc,
ArrayBatch arrayBatch)
Create a new ArraySlide item. |
static ItemQuery<ArraySlide> |
getQuery()
Get a ItemQuery object configured
to retrieve array slides. |
Item |
getType()
Get the type of item represented by the object. |
Set<ItemProxy> |
getUsingItems()
Get the hybridization that was used on this plate. |
boolean |
isDestroyed()
Check if the slide is flagged as destroyed or not. |
boolean |
isUsed()
Check if this item is used by some other item. |
boolean |
isUsedByOther(Hybridization hyb)
Checks if this array design is used by a different hybridization than the given one. |
private void |
setArrayBatch(ArrayBatch arrayBatch)
Set the ArrayBatch this arrayslide belongs to. |
void |
setBarcode(String barcode)
Set the barcode for the slide. |
void |
setBatchIndex(int batchIndex)
Set the index of this slide in the batch. |
void |
setDestroyed(boolean destroyed)
Set if the slide should be flagged as destroyed. |
Methods inherited from class net.sf.basedb.core.AnnotatedItem |
---|
getAnnotationSet, getProtocol, isAnnotated, removeAnnotations, toTransferable |
Methods inherited from class net.sf.basedb.core.CommonItem |
---|
getDescription, getName, isRemoved, setDescription, setName, setRemoved, toTransferable |
Methods inherited from class net.sf.basedb.core.SharedItem |
---|
getItemKey, getProjectKey, initPermissions, isShared, onBeforeCommit, setItemKey, setProjectKey, toTransferable |
Methods inherited from class net.sf.basedb.core.OwnedItem |
---|
getOwner, isOwner, setOwner, takeOwnership, toTransferable |
Methods inherited from class net.sf.basedb.core.BasicItem |
---|
addUsingItems, addUsingItems, checkPermission, equals, getData, getDbControl, getId, getPermissions, getPluginPermissions, getSessionControl, getVersion, hashCode, hasPermission, isDetached, isInDatabase, onAfterCommit, onAfterInsert, 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 |
Methods inherited from interface net.sf.basedb.core.Ownable |
---|
getOwner, isOwner, setOwner, takeOwnership |
Field Detail |
---|
public static final Item TYPE
Item.ARRAYSLIDE
,
getType()
public static final int MAX_BARCODE_LENGTH
setBarcode
method to avoid exceptions.
Constructor Detail |
---|
ArraySlide(ArraySlideData data)
Method Detail |
---|
public static ArraySlide getNew(DbControl dc, ArrayBatch arrayBatch) throws PermissionDeniedException, BaseException
ArraySlide
item.
dc
- The DbControl
which will be used for
permission checking and database accessarrayBatch
- The ArrayBatch
this slide belongs to
ArraySlide
item
PermissionDeniedException
- If the logged in user doesn't
have use permission for the array batch
BaseException
- If there is another errorpublic static ArraySlide getById(DbControl dc, int id) throws ItemNotFoundException, PermissionDeniedException, BaseException
ArraySlide
object 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
ArraySlide
item
ItemNotFoundException
- If an item with the specified ID is
not found
PermissionDeniedException
- If the logged in user doesn't
have read permission to the item
BaseException
- If there is another errorpublic static boolean barcodeExists(DbControl dc, String barcode)
dc
- The DbControl to use for database accessbarcode
- The barcode to check
public static ItemQuery<ArraySlide> getQuery()
ItemQuery
object configured
to retrieve array slides.
ItemQuery
objectpublic Item getType()
Identifiable
Item
enumeration.
getType
in interface Identifiable
public Set<Annotatable> getAnnotatableParents() throws BaseException
getAnnotatableParents
in interface Annotatable
BaseException
- If there is an errorpublic Date getEntryDate()
Registered
getEntryDate
in interface Registered
public boolean isUsed() throws BaseException
BasicItem
super.isUsed()
, unless it has decided
that the item is used by some other means.
isUsed
in class BasicItem<ArraySlideData>
BaseException
- If not able to tell if item is used or not.BasicItem.getUsingItems()
public Set<ItemProxy> getUsingItems() throws BaseException
getUsingItems
in class BasicItem<ArraySlideData>
BaseException
- If there is an error loading the itemsBasicItem.addUsingItems(Set, Item, org.hibernate.Query)
public int getBatchIndex()
public void setBatchIndex(int batchIndex) throws PermissionDeniedException
batchIndex
- The index of the slide in the batch
PermissionDeniedException
- This exception is thrown if the
logged in user doesn't have write
permission.public String getBarcode()
public void setBarcode(String barcode) throws PermissionDeniedException, InvalidDataException
MAX_BARCODE_LENGTH
constant.
barcode
- The new barcode for the slide
PermissionDeniedException
- If the logged in user doesn't
have write permission
InvalidDataException
- This exception is thrown if the barcode
is longer than MAX_BARCODE_LENGTH
public boolean isDestroyed()
public void setDestroyed(boolean destroyed) throws PermissionDeniedException
destroyed
- true if the slide should be flagged as destroyed,
false otherwise
PermissionDeniedException
- If the logged in user doesn't
have write permissionpublic ArrayBatch getArrayBatch() throws PermissionDeniedException, BaseException
ArrayBatch
item to which this slide belongs.
ArrayBatch
item
PermissionDeniedException
- If the logged in user doesn't have read
permission for the array batch
BaseException
- If there is another errorprivate void setArrayBatch(ArrayBatch arrayBatch) throws InvalidDataException, PermissionDeniedException
ArrayBatch
this arrayslide belongs to.
arrayBatch
- the arrayBatch to be set. Cannot be null.
InvalidDataException
- If the arrayBatch is null
PermissionDeniedException
- If the logged in user doesn't have
use permission for the batchpublic Hybridization getHybridization() throws PermissionDeniedException, BaseException
Hybridization
item which was used on this slide. To set the
hybridization use the Hybridization.setArraySlide(ArraySlide)
method.
Hybridization
item
PermissionDeniedException
- This exception is thrown if
the logged in user doesn't have read permission to the item
BaseException
- If there is another errorpublic boolean isUsedByOther(Hybridization hyb)
hyb
- The hybridization to check, or null to check if the slide is used
by any hybridization
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |