org.neodatis.odb.impl.core.btree
Class ODBBTreeNodeSingle

java.lang.Object
  extended by org.neodatis.btree.impl.AbstractBTreeNode
      extended by org.neodatis.btree.impl.singlevalue.BTreeNodeSingleValuePerKey
          extended by org.neodatis.odb.impl.core.btree.ODBBTreeNodeSingle
All Implemented Interfaces:
java.io.Serializable, IBTreeNode, IBTreeNodeOneValuePerKey

public class ODBBTreeNodeSingle
extends BTreeNodeSingleValuePerKey

The NeoDatis ODB BTree Node implementation. It extends the DefaultBTreeNode generic implementation to be able to be stored in the ODB database.

Author:
osmadja
See Also:
Serialized Form

Field Summary
protected  OID[] childrenOids
           
protected  OID oid
           
protected  IBTreeNode parent
          lazy loaded
protected  OID parentOid
           
 
Fields inherited from class org.neodatis.btree.impl.AbstractBTreeNode
btree, degree, keys, maxNbChildren, maxNbKeys, nbChildren, nbKeys, values
 
Constructor Summary
ODBBTreeNodeSingle()
           
ODBBTreeNodeSingle(IBTree btree)
           
 
Method Summary
 void clear()
           
 void deleteChildAt(int index)
           
 IBTreeNode getChildAt(int index, boolean throwExceptionIfNotExist)
           
 java.lang.Object getChildIdAt(int childIndex, boolean throwExceptionIfDoesNotExist)
           
 java.lang.Object getId()
           
 IBTreeNode getParent()
           
 java.lang.Object getParentId()
           
 java.lang.Object getValueAsObjectAt(int index)
           
 boolean hasParent()
           
protected  void init()
           
 void moveChildFromTo(int sourceIndex, int destinationIndex, boolean throwExceptionIfDoesNotExist)
           
 void setChildAt(IBTreeNode child, int index)
           
 void setChildAt(IBTreeNode node, int childIndex, int indexDestination, boolean throwExceptionIfDoesNotExist)
           
 void setId(java.lang.Object id)
           
 void setNullChildAt(int childIndex)
           
 void setParent(IBTreeNode node)
           
 
Methods inherited from class org.neodatis.btree.impl.singlevalue.BTreeNodeSingleValuePerKey
getValueAt, insertKeyAndValue, search
 
Methods inherited from class org.neodatis.btree.impl.AbstractBTreeNode
deleteKeyAndValueAt, deleteKeyForLeafNode, extractRightPart, getBTree, getDegree, getKeyAndValueAt, getKeyAt, getLastChild, getLastKeyAndValue, getLastPositionChild, getMaxNbChildren, getMedian, getNbChildren, getNbKeys, getPositionOfKey, incrementNbChildren, incrementNbKeys, isFull, isLeaf, leftShiftFrom, mergeWith, removeKeyAndValueAt, rightShiftFrom, setBTree, setKeyAndValueAt, setKeyAndValueAt, setKeyAndValueAt, setKeyAndValueAt, setNbChildren, setNbKeys, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.neodatis.btree.IBTreeNode
deleteKeyAndValueAt, deleteKeyForLeafNode, extractRightPart, getBTree, getDegree, getKeyAndValueAt, getKeyAt, getLastChild, getLastKeyAndValue, getLastPositionChild, getMaxNbChildren, getMedian, getNbChildren, getNbKeys, getPositionOfKey, incrementNbChildren, incrementNbKeys, isFull, isLeaf, mergeWith, removeKeyAndValueAt, setBTree, setKeyAndValueAt, setKeyAndValueAt, setKeyAndValueAt, setKeyAndValueAt, setNbChildren, setNbKeys
 

Field Detail

oid

protected OID oid

childrenOids

protected OID[] childrenOids

parentOid

protected OID parentOid

parent

protected transient IBTreeNode parent
lazy loaded

Constructor Detail

ODBBTreeNodeSingle

public ODBBTreeNodeSingle()

ODBBTreeNodeSingle

public ODBBTreeNodeSingle(IBTree btree)
Method Detail

getChildAt

public IBTreeNode getChildAt(int index,
                             boolean throwExceptionIfNotExist)
Specified by:
getChildAt in interface IBTreeNode
Specified by:
getChildAt in class AbstractBTreeNode

getParent

public IBTreeNode getParent()
Specified by:
getParent in interface IBTreeNode
Specified by:
getParent in class AbstractBTreeNode

setChildAt

public void setChildAt(IBTreeNode child,
                       int index)

setParent

public void setParent(IBTreeNode node)
Specified by:
setParent in interface IBTreeNode
Specified by:
setParent in class AbstractBTreeNode

hasParent

public boolean hasParent()
Specified by:
hasParent in interface IBTreeNode
Specified by:
hasParent in class AbstractBTreeNode

init

protected void init()
Specified by:
init in class AbstractBTreeNode

getId

public java.lang.Object getId()

setId

public void setId(java.lang.Object id)

clear

public void clear()
Specified by:
clear in interface IBTreeNode
Overrides:
clear in class AbstractBTreeNode

deleteChildAt

public void deleteChildAt(int index)

moveChildFromTo

public void moveChildFromTo(int sourceIndex,
                            int destinationIndex,
                            boolean throwExceptionIfDoesNotExist)
Specified by:
moveChildFromTo in interface IBTreeNode
Specified by:
moveChildFromTo in class AbstractBTreeNode

setChildAt

public void setChildAt(IBTreeNode node,
                       int childIndex,
                       int indexDestination,
                       boolean throwExceptionIfDoesNotExist)

setNullChildAt

public void setNullChildAt(int childIndex)

getChildIdAt

public java.lang.Object getChildIdAt(int childIndex,
                                     boolean throwExceptionIfDoesNotExist)

getParentId

public java.lang.Object getParentId()
Specified by:
getParentId in interface IBTreeNode
Specified by:
getParentId in class AbstractBTreeNode

getValueAsObjectAt

public java.lang.Object getValueAsObjectAt(int index)