Package net.anotheria.anodoc.data
Class LongProperty
- java.lang.Object
-
- net.anotheria.anodoc.data.DataHolder
-
- net.anotheria.anodoc.data.Property
-
- net.anotheria.anodoc.data.LongProperty
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,IBasicStoreableObject,IPlainDataObject
public class LongProperty extends Property
This property represents a long value.- Since:
- 1.0
- Version:
- $Id: $Id
- Author:
- another
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LongProperty(java.lang.String name, long value)Creates a new LongProperty with given name and value.LongProperty(java.lang.String name, java.lang.Long value)Creates a new LongProperty with given name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.ObjectcloneValue()cloneValue.longgetlong()Returns the value of this property as long.java.lang.LonggetLong()Returns the value of this property as Long 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.longlongValue()Returns the value of this property as long.voidsetLong(long aValue)Sets the value of this property to the given value.voidsetLong(java.lang.Long aValue)Sets the value of this property to the given Long object.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
-
LongProperty
public LongProperty(java.lang.String name, long value)Creates a new LongProperty with given name and value.- Parameters:
name- aStringobject.value- a long.
-
LongProperty
public LongProperty(java.lang.String name, java.lang.Long value)Creates a new LongProperty with given name and value.- Parameters:
name- aStringobject.value- aLongobject.
-
-
Method Detail
-
getLong
public java.lang.Long getLong()
Returns the value of this property as Long object.- Returns:
- a
Longobject.
-
getlong
public long getlong()
Returns the value of this property as long.- Returns:
- a long.
-
longValue
public long longValue()
Returns the value of this property as long.- Returns:
- a long.
-
setLong
public void setLong(long aValue)
Sets the value of this property to the given value.- Parameters:
aValue- a long.
-
setLong
public void setLong(java.lang.Long aValue)
Sets the value of this property to the given Long object.- Parameters:
aValue- aLongobject.
-
setValue
public void setValue(java.lang.Object o)
Sets the value of this Property. Sets the value of this property to the given value.
-
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 in bytes (8bytes = 64 bit datatype).- Specified by:
getSizeInBytesin classDataHolder- Returns:
- a long.
-
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.
-
-