Class ArraySlide

    • Field Detail

      • MAX_BARCODE_LENGTH

        public static final int MAX_BARCODE_LENGTH
        The maximum length of the barcode that can be stored in the database. Check the length against this value before calling the setBarcode method to avoid exceptions.
        See Also:
        Constant Field Values
    • Method Detail

      • barcodeExists

        public static boolean barcodeExists​(DbControl dc,
                                            String barcode)
        Checks if a slide with the given barcode already exists in the database. The check is done on ALL slides, even on those not normally accessible by the logged in user.
        Parameters:
        dc - The DbControl to use for database access
        barcode - The barcode to check
        Returns:
        TRUE if the barcode exists, FALSE if not or if the argument is NULL
        Since:
        2.7
      • 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.
        Specified by:
        getType in interface Identifiable
        Returns:
        A value indicating the type of item
      • getEntryDate

        public Date getEntryDate()
        Description copied from interface: Registered
        Get the date that the item was registered in the database.
        Specified by:
        getEntryDate in interface Registered
        Returns:
        A date or null if this is not known
      • setEntryDate

        public void setEntryDate​(Date entryDate)
        Description copied from interface: Registered
        Set the date the entry was registered in the database. Implementations should only allow this property to be set before the item is first stored in the database. The intention of this method is to facilitate export/import of data between server.
        Specified by:
        setEntryDate in interface Registered
        Parameters:
        entryDate - A date or null to use today's date
      • isUsed

        public boolean isUsed()
                       throws BaseException
        Description copied from class: BasicItem
        Check if this item is used by some other item. With used we mean that another item is linking to this item in way that prevents this item from beeing deleted. Ie. if we tried to delete an item that is used, we would get a foreign key violation error from the database. If the subclass overrides this method it should propagate the call to the superclass, ie. super.isUsed(), unless it has decided that the item is used by some other means.
        Overrides:
        isUsed in class BasicItem
        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()
      • getBatchIndex

        public int getBatchIndex()
        Get the index of this slide in the batch.
        Returns:
        The index of the slide
      • setBatchIndex

        public void setBatchIndex​(int batchIndex)
                           throws PermissionDeniedException
        Set the index of this slide in the batch.
        Parameters:
        batchIndex - The index of the slide in the batch
        Throws:
        PermissionDeniedException - This exception is thrown if the logged in user doesn't have write permission.
      • getBarcode

        public String getBarcode()
        Get the barcode of the slide.
        Returns:
        A string with the barcode sequence
      • isDestroyed

        public boolean isDestroyed()
        Check if the slide is flagged as destroyed or not. A destroyed slide may not be connected to a hybridization.
        Returns:
        TRUE if the slide is destroyed, FALSE otherwise
      • setDestroyed

        public void setDestroyed​(boolean destroyed)
                          throws PermissionDeniedException
        Set if the slide should be flagged as destroyed. A destroyed slide may not be connected to a hybridization.
        Parameters:
        destroyed - true if the slide should be flagged as destroyed, false otherwise
        Throws:
        PermissionDeniedException - If the logged in user doesn't have write permission
      • isUsedByOther

        public boolean isUsedByOther​(PhysicalBioAssay pba)
        Checks if this array slide is used by a different bioassay than the given one.
        Parameters:
        pba - The bioassay to check, or null to check if the slide is used by any bioassay
        Returns:
        TRUE if the slide is used by a different bioassay, or FALSE if it is used by the given bioassay, or not used at all
        Since:
        2.8.3