public class Database
extends java.lang.Object
Constructor and Description |
---|
Database(java.io.File file)
Instantiates a new database.
|
Modifier and Type | Method and Description |
---|---|
Node |
createNode(Node parent,
java.lang.String type)
Creates the node.
|
void |
createTables()
Creates the tables.
|
Node |
getRoot()
Read.
|
static void |
main(java.lang.String[] args)
The main method.
|
void |
read(Node parentNode,
long parentId)
Read.
|
void |
write(Node root)
Write.
|
void |
write(Node node,
long parentId)
Write.
|
public Database(java.io.File file) throws org.tmatesoft.sqljet.core.SqlJetException
file
- the fileorg.tmatesoft.sqljet.core.SqlJetException
- the sql jet exceptionpublic static void main(java.lang.String[] args)
args
- the argumentspublic void createTables() throws org.tmatesoft.sqljet.core.SqlJetException
org.tmatesoft.sqljet.core.SqlJetException
- the sql jet exceptionpublic void write(Node root) throws org.tmatesoft.sqljet.core.SqlJetException
root
- the rootorg.tmatesoft.sqljet.core.SqlJetException
- the sql jet exceptionpublic void write(Node node, long parentId) throws org.tmatesoft.sqljet.core.SqlJetException
node
- the nodeparentId
- the parent idorg.tmatesoft.sqljet.core.SqlJetException
- the sql jet exceptionpublic Node getRoot() throws org.tmatesoft.sqljet.core.SqlJetException
org.tmatesoft.sqljet.core.SqlJetException
- the sql jet exceptionpublic void read(Node parentNode, long parentId) throws org.tmatesoft.sqljet.core.SqlJetException
parentNode
- the parent nodeparentId
- the parent idorg.tmatesoft.sqljet.core.SqlJetException
- the sql jet exception