net.sourceforge.hatbox
Class RTreeSessionDb
java.lang.Object
net.sourceforge.hatbox.RTreeSessionDb
- All Implemented Interfaces:
- RTreeSession
public class RTreeSessionDb
- extends java.lang.Object
- implements RTreeSession
- Author:
- Peter Yuill
Constructor Summary |
RTreeSessionDb(java.sql.Connection con,
RTreeDml dml,
boolean write)
The general use constructor for short transactions. |
RTreeSessionDb(java.sql.Connection con,
RTreeDml dml,
int commitInterval)
A special purpose constructor to support index creation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RTreeSessionDb
public RTreeSessionDb(java.sql.Connection con,
RTreeDml dml,
int commitInterval)
throws java.sql.SQLException
- A special purpose constructor to support index creation.
Assumes that the connection is *not* nested
(ie it can be committed explicitly). and a lock
is not required because the index status has
already been set to 'BUILDING'
- Parameters:
con
- dml
- nodeMap
-
- Throws:
java.sql.SQLException
RTreeSessionDb
public RTreeSessionDb(java.sql.Connection con,
RTreeDml dml,
boolean write)
throws java.sql.SQLException
- The general use constructor for short transactions.
This constructor creates a Lock which acts on the index meta node.
- Parameters:
con
- The database connection to usedml
- The database and index specific DML to usewrite
- Is the session going to write to the index
- Throws:
java.sql.SQLException
getRootId
public long getRootId()
throws java.sql.SQLException
- Specified by:
getRootId
in interface RTreeSession
- Throws:
java.sql.SQLException
setRootId
public void setRootId(long id)
throws java.sql.SQLException
- Specified by:
setRootId
in interface RTreeSession
- Throws:
java.sql.SQLException
getCon
public java.sql.Connection getCon()
setCon
public void setCon(java.sql.Connection con)
closeAll
public void closeAll()
getNode
public Node getNode(long id)
throws java.sql.SQLException
- Specified by:
getNode
in interface RTreeSession
- Throws:
java.sql.SQLException
insertNode
public long insertNode(Node node)
throws java.sql.SQLException
- Specified by:
insertNode
in interface RTreeSession
- Throws:
java.sql.SQLException
updateNode
public void updateNode(Node node)
throws java.sql.SQLException
- Specified by:
updateNode
in interface RTreeSession
- Throws:
java.sql.SQLException
deleteNode
public void deleteNode(Node node)
throws java.sql.SQLException
- Specified by:
deleteNode
in interface RTreeSession
- Throws:
java.sql.SQLException
getWKB
public byte[] getWKB(long id)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
Copyright © 2010. All Rights Reserved.