Package net.sf.basedb.core
Enum 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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants Enum Constant Description LOCKED_AFTER_ADD
It is allowed to add biomaterial once to the well.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.LOCKED_AFTER_MOVE
It is allowed to add biomaterial once to the well.UNLOCKED
The well is not locked. -
Field Summary
Fields Modifier and Type Field Description private String
displayValue
private int
value
The integer value of this lock mode.private static Map<Integer,BioWell.LockMode>
valueMapping
Maps an integer to a lock mode. -
Constructor Summary
-
Method Summary
Modifier and Type Method Description boolean
canAdd(BioWell well)
Is it allowed to add (a different) biomaterial to the well?(package private) abstract boolean
canAdd(BioWellData well)
boolean
canClear(BioWell well)
Is it allowed to clear a well from biomaterial?(package private) abstract boolean
canClear(BioWellData well)
static BioWell.LockMode
fromValue(int value)
Get theLock mode
object when you know the integer code.int
getValue()
Get the integer value that is used when storing a lock mode to the database.(package private) void
onAdd(BioWellData well, MeasuredBioMaterialData biomaterial)
Called when biomaterial is added to a well.(package private) void
onClear(BioWellData well, MeasuredBioMaterialData biomaterial)
Called when a well is cleared from an existing biomaterial.String
toString()
static BioWell.LockMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static BioWell.LockMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
UNLOCKED
The well is not locked. It is possible to change the biomaterial any number of times. -
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 theBioWell.getOriginalBioMaterial()
. -
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
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
Maps an integer to a lock mode. -
value
private final int valueThe integer value of this lock mode. -
displayValue
-
-
Constructor Details
-
LockMode
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
toString
- Overrides:
toString
in classEnum<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
Get theLock mode
object when you know the integer code.- Parameters:
value
- The integer value- Returns:
- The location for the integer value
-
canClear
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
-
onClear
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 clearedbiomaterial
- The biomaterial that is currently located on the well
-
canAdd
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:
BioWell.canAddBioMaterial()
-
canAdd
-
onAdd
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 tobiomaterial
- The biomaterial that is going to be added to the well
-