Package net.anotheria.anodoc.data
Class DataHolder
- java.lang.Object
-
- net.anotheria.anodoc.data.DataHolder
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
- Direct Known Subclasses:
Document,DocumentList,Property
public abstract class DataHolder extends java.lang.Object implements java.io.Serializable, java.lang.CloneableThis class represents the root class for all objects that can hold information and therefore data. In particular its Document, DocumentList and Property.- Since:
- 1.0
- Version:
- $Id: $Id
- Author:
- lrosenberg
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDataHolder(java.lang.String anId)Creates a new DataHolder object with the given id.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()clone.java.lang.StringgetId()Returns the name of this DataHolder.abstract 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.inthashCode()protected voidsetId(java.lang.String anId)Sets the name of this DataHolder to the given value.
Warning: Only use this method, if you know what you do.net.anotheria.util.xml.XMLNodetoXMLNode()toXMLNode.
-
-
-
Method Detail
-
getId
public java.lang.String getId()
Returns the name of this DataHolder.- Returns:
- the name of this DataHolder object.
-
setId
protected void setId(java.lang.String anId)
Sets the name of this DataHolder to the given value.
Warning: Only use this method, if you know what you do.- Parameters:
anId- aStringobject.
-
getSizeInBytes
public abstract 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:
- a long.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionclone.
- Overrides:
clonein classjava.lang.Object- Returns:
- a
Objectobject. - Throws:
java.lang.CloneNotSupportedException- if any.
-
toXMLNode
public net.anotheria.util.xml.XMLNode toXMLNode()
toXMLNode.
- Returns:
- a
XMLNodeobject.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-