Enum Class BioWell.LockMode

java.lang.Object
java.lang.Enum<BioWell.LockMode>
net.sf.basedb.core.BioWell.LockMode
All Implemented Interfaces:
Serializable, Comparable<BioWell.LockMode>, java.lang.constant.Constable
Enclosing class:
BioWell

public static enum BioWell.LockMode extends Enum<BioWell.LockMode>
The lock mode for a well is determined by the plate's bio plate type. See BioPlateType.getLockMode(). The lock-mode is used to determine if the well can be assigned to a biomaterial or not.
Since:
2.16
  • Enum Constant Details

    • UNLOCKED

      public static final BioWell.LockMode UNLOCKED
      The well is not locked. It is possible to change the biomaterial any number of times.
    • LOCKED_AFTER_MOVE

      public static final BioWell.LockMode LOCKED_AFTER_MOVE
      It is allowed to add biomaterial once to the well. It can not be replaced by a new biomaterial but it is possible to clear it. The original biomaterial is then saved in the BioWell.getOriginalBioMaterial().
    • LOCKED_AFTER_ADD

      public static final BioWell.LockMode LOCKED_AFTER_ADD
      It is allowed to add biomaterial once to the well. It can't be replaced by a new biomaterial and it is not possible to clear it. It is possible to add biomaterial to empty wells at any time.
    • LOCKED_AFTER_CREATE

      public static final BioWell.LockMode LOCKED_AFTER_CREATE
      It is allowed to add biomaterial once to the well, but it most be done at the same time the plate is creted. Once the transaction has been committed to the database, all wells become locked.
  • Field Details

    • valueMapping

      private static final Map<Integer,BioWell.LockMode> valueMapping
      Maps an integer to a lock mode.
    • value

      private final int value
      The integer value of this lock mode.
    • displayValue

      private final String displayValue
  • Constructor Details

    • LockMode

      private LockMode(int value, String displayValue)
  • Method Details

    • values

      public static BioWell.LockMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static BioWell.LockMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Overrides:
      toString in class Enum<BioWell.LockMode>
    • getValue

      public int getValue()
      Get the integer value that is used when storing a lock mode to the database.
      Returns:
      The integer value for this lock mode
    • fromValue

      public static BioWell.LockMode fromValue(int value)
      Get the Lock mode object when you know the integer code.
      Parameters:
      value - The integer value
      Returns:
      The location for the integer value
    • canClear

      public boolean canClear(BioWell well)
      Is it allowed to clear a well from biomaterial? This method should return true for an empty well.
      Parameters:
      well - The biowell to check
    • canClear

      abstract boolean canClear(BioWellData well)
    • onClear

      void onClear(BioWellData well, MeasuredBioMaterialData biomaterial)
      Called when a well is cleared from an existing biomaterial. The default implementation of this method does nothing, but it may be overriden by some lock modes.
      Parameters:
      well - The well that is cleared
      biomaterial - The biomaterial that is currently located on the well
    • canAdd

      public boolean canAdd(BioWell well)
      Is it allowed to add (a different) biomaterial to the well? If this method is called for a non-empty well, the check must assume that the well is first cleared.
      Parameters:
      well - A biowell
      See Also:
    • canAdd

      abstract boolean canAdd(BioWellData well)
    • onAdd

      void onAdd(BioWellData well, MeasuredBioMaterialData biomaterial)
      Called when biomaterial is added to a well. The default implementation of this method does nothing, but it may be overriden by some lock modes.
      Parameters:
      well - The well the biomaterial is added to
      biomaterial - The biomaterial that is going to be added to the well