bill.util.persist
Class BooleanElement
java.lang.Object
|
+--bill.util.persist.ElementData
|
+--bill.util.persist.BooleanElement
- public class BooleanElement
- extends ElementData
Persistent element of boolean type.
Constructor Summary |
BooleanElement()
Default creator, does not do anything special. |
BooleanElement(String logicalName,
String physicalName)
Alternate creator that sets the element's logical and physical names. |
Method Summary |
void |
setValue(boolean value)
Set the element's value to the specified value. |
void |
setValue(Object value)
Set the element's value to the specified value. |
Methods inherited from class bill.util.persist.ElementData |
addElementData, equals, formatValue, getElementData, getLogicalName, getPhysicalName, getValue, isRequired, removeElementData, setElementData, setLogicalName, setPhysicalName, setRequired, toString |
BooleanElement
public BooleanElement()
- Default creator, does not do anything special.
BooleanElement
public BooleanElement(String logicalName,
String physicalName)
- Alternate creator that sets the element's logical and physical names.
- Parameters:
logicalName
- The new element's logical namephysicalName
- The new element's physical name
setValue
public void setValue(Object value)
throws PersistException
- Set the element's value to the specified value. If a
null
or "empty" value is specified, a value of 'true' is assigned.
- Overrides:
setValue
in class ElementData
- Parameters:
value
- The new value to assign to the element.- Throws:
PersistException
- If the passed value cannot be converted into
a boolean value.
setValue
public void setValue(boolean value)
throws PersistException
- Set the element's value to the specified value.
- Parameters:
value
- The new value to assign to the element.