Package net.anotheria.anodoc.data
Class BooleanProperty
- java.lang.Object
-
- net.anotheria.anodoc.data.DataHolder
-
- net.anotheria.anodoc.data.Property
-
- net.anotheria.anodoc.data.BooleanProperty
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,IBasicStoreableObject,IPlainDataObject
public class BooleanProperty extends Property
This class represents a boolean property.- Since:
- 1.0
- Version:
- $Id: $Id
- Author:
- lrosenberg
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BooleanProperty(java.lang.String name, boolean value)Creates a new BooleanProperty with given name and value.BooleanProperty(java.lang.String name, java.lang.Boolean value)Creates a new BooleanProperty with given name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectcloneValue()cloneValue.booleangetboolean()Returns the value of this Property as boolean data (primary type).java.lang.BooleangetBoolean()Returns the value of this Property as a Boolean object.PropertyTypegetPropertyType()getPropertyType.longgetSizeInBytes()The 'size' of a DataHolder is needed for the quota calculation.
The size of an atomic DataHolder like a Property should be the real amount of bytes it uses, whether the size of complex objects should be cumulated.
The overhead for administration shouldn't be counted (i.e.voidsetboolean(boolean aValue)Sets the value of this property to the given boolean value.voidsetBoolean(java.lang.Boolean aValue)Sets the value of this property to the given Boolean value.voidsetValue(java.lang.Object o)Sets the value of this Property.-
Methods inherited from class net.anotheria.anodoc.data.Property
clone, cloneAs, equals, getName, getStorageId, getValue, toString, toXMLNode
-
Methods inherited from class net.anotheria.anodoc.data.DataHolder
getId, hashCode, setId
-
-
-
-
Constructor Detail
-
BooleanProperty
public BooleanProperty(java.lang.String name, boolean value)Creates a new BooleanProperty with given name and value.- Parameters:
name- aStringobject.value- a boolean.
-
BooleanProperty
public BooleanProperty(java.lang.String name, java.lang.Boolean value)Creates a new BooleanProperty with given name and value.- Parameters:
name- aStringobject.value- aBooleanobject.
-
-
Method Detail
-
getBoolean
public java.lang.Boolean getBoolean()
Returns the value of this Property as a Boolean object.- Returns:
- a
Booleanobject.
-
getboolean
public boolean getboolean()
Returns the value of this Property as boolean data (primary type).- Returns:
- a boolean.
-
setboolean
public void setboolean(boolean aValue)
Sets the value of this property to the given boolean value.- Parameters:
aValue- a boolean.
-
setBoolean
public void setBoolean(java.lang.Boolean aValue)
Sets the value of this property to the given Boolean value.- Parameters:
aValue- aBooleanobject.
-
setValue
public void setValue(java.lang.Object o)
Sets the value of this Property. Sets the value of this property to the given value, which can be a Boolean or a String.
-
getSizeInBytes
public long getSizeInBytes()
The 'size' of a DataHolder is needed for the quota calculation.
The size of an atomic DataHolder like a Property should be the real amount of bytes it uses, whether the size of complex objects should be cumulated.
The overhead for administration shouldn't be counted (i.e. the size of an IntProperty is the amount of bytes needed to store the int value itself, not the amount of bytes needed to store the DataHolder object). Returns the size of this property in bytes (one byte).- Specified by:
getSizeInBytesin classDataHolder- Returns:
- a long.
- See Also:
DataHolder.getSizeInBytes()
-
cloneValue
protected java.lang.Object cloneValue()
cloneValue.
- Specified by:
cloneValuein classProperty- Returns:
- a
Objectobject.
-
getPropertyType
public PropertyType getPropertyType()
getPropertyType.
- Specified by:
getPropertyTypein classProperty- Returns:
- a
PropertyTypeobject.
-
-