org.geotools.index.rtree.database
Class DatabaseNode

java.lang.Object
  extended byorg.geotools.index.rtree.Node
      extended byorg.geotools.index.rtree.database.DatabaseNode
All Implemented Interfaces:
EntryBoundsChangeListener

public class DatabaseNode
extends Node

DOCUMENT ME!

Author:
Tommaso Nolli

Field Summary
 
Fields inherited from class org.geotools.index.rtree.Node
bounds, entries, entriesCount, isChanged, maxNodeEntries
 
Constructor Summary
DatabaseNode(int maxNodeEntries, javax.sql.DataSource ds, Dialect dialect, java.lang.String tableName)
          Constructor
DatabaseNode(int maxNodeEntries, javax.sql.DataSource ds, Dialect dialect, java.lang.String tableName, java.lang.Integer pageId)
          Constructor that retrieves data from the db
 
Method Summary
protected  void doInsert(java.sql.Connection cnn, byte[] bytes)
          Inserts this Node into the database
protected  void doSave()
          Saves this Node; called from save()
protected  void doUpdate(java.sql.Connection cnn, byte[] bytes)
          Update the databse with this Node informations
protected  Entry getEntry(Node node)
          Returns the Entry pointing the specified Node
 java.lang.Integer getPageId()
          DOCUMENT ME!
 Node getParent()
          DOCUMENT ME!
 void setPageId(java.lang.Integer pageId)
          DOCUMENT ME!
 void setParent(Node node)
          Sets the parent of this Node
 
Methods inherited from class org.geotools.index.rtree.Node
addEntry, boundsChanged, clear, getBounds, getEntries, getEntriesCount, getEntry, isLeaf, removeEntry, save, setLeaf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseNode

public DatabaseNode(int maxNodeEntries,
                    javax.sql.DataSource ds,
                    Dialect dialect,
                    java.lang.String tableName)
Constructor

Parameters:
maxNodeEntries -
ds -
dialect -
tableName -

DatabaseNode

public DatabaseNode(int maxNodeEntries,
                    javax.sql.DataSource ds,
                    Dialect dialect,
                    java.lang.String tableName,
                    java.lang.Integer pageId)
             throws TreeException
Constructor that retrieves data from the db

Parameters:
maxNodeEntries -
ds -
dialect -
tableName -
pageId -
Throws:
TreeException - DOCUMENT ME!
Method Detail

doSave

protected void doSave()
               throws TreeException
Description copied from class: Node
Saves this Node; called from save()

Specified by:
doSave in class Node
Throws:
TreeException
See Also:
Node.doSave()

doInsert

protected void doInsert(java.sql.Connection cnn,
                        byte[] bytes)
                 throws java.sql.SQLException,
                        java.io.IOException
Inserts this Node into the database

Parameters:
cnn -
bytes -
Throws:
java.sql.SQLException
java.io.IOException

doUpdate

protected void doUpdate(java.sql.Connection cnn,
                        byte[] bytes)
                 throws java.sql.SQLException,
                        java.io.IOException
Update the databse with this Node informations

Parameters:
cnn -
bytes -
Throws:
java.sql.SQLException
java.io.IOException

getEntry

protected Entry getEntry(Node node)
Description copied from class: Node
Returns the Entry pointing the specified Node

Specified by:
getEntry in class Node
Parameters:
node - The Node
Returns:
The Entry
See Also:
Node.getEntry(org.geotools.index.rtree.Node)

getParent

public Node getParent()
               throws TreeException
Description copied from class: Node
DOCUMENT ME!

Specified by:
getParent in class Node
Returns:
Throws:
TreeException - DOCUMENT ME!
See Also:
Node.getParent()

setParent

public void setParent(Node node)
Description copied from class: Node
Sets the parent of this Node

Specified by:
setParent in class Node
Parameters:
node - The parent Node
See Also:
Node.setParent(org.geotools.index.rtree.Node)

getPageId

public java.lang.Integer getPageId()
DOCUMENT ME!

Returns:
Returns the pageId.

setPageId

public void setPageId(java.lang.Integer pageId)
DOCUMENT ME!

Parameters:
pageId - The pageId to set.


Copyright © GeoTools. All Rights Reserved.