Package org.tmatesoft.sqljet.core.map
Class SqlJetMapDb
- java.lang.Object
-
- org.tmatesoft.sqljet.core.table.engine.SqlJetEngine
-
- org.tmatesoft.sqljet.core.map.SqlJetMapDb
-
public class SqlJetMapDb extends SqlJetEngine
-
-
Field Summary
Fields Modifier and Type Field Description static java.io.FileIN_MEMORYFile name for in memory database.static java.lang.StringMODULE_NAME-
Fields inherited from class org.tmatesoft.sqljet.core.table.engine.SqlJetEngine
btree, dbHandle, file, FILE_SYSTEM_MANAGER, fileSystem, open, writable
-
-
Constructor Summary
Constructors Constructor Description SqlJetMapDb(java.io.File file, boolean writable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ISqlJetMapDefcreateMap(java.lang.String mapName)ISqlJetMapgetMap(java.lang.String mapName)ISqlJetMapDefgetMapDef(java.lang.String mapName)java.util.Set<java.lang.String>getMapNames()static SqlJetMapDbopen(java.io.File file, boolean writable)protected voidreadSchema()Reads database schema and options.java.lang.ObjectrunReadTransaction(ISqlJetMapTransaction transaction)java.lang.ObjectrunSynchronized(ISqlJetMapTransaction transaction)java.lang.ObjectrunTransaction(SqlJetTransactionMode mode, ISqlJetMapTransaction transaction)java.lang.ObjectrunWriteTransaction(ISqlJetMapTransaction transaction)-
Methods inherited from class org.tmatesoft.sqljet.core.table.engine.SqlJetEngine
beginTransaction, checkOpen, close, closeResources, commit, finalize, getBusyHandler, getCacheSize, getFile, getFileSystem, getJournalMode, getMutex, getOptions, getSafetyLevel, getSchemaInternal, getTransactionMode, isInTransaction, isOpen, isWritable, open, refreshSchema, registerFileSystem, rollback, runEngineTransaction, runSynchronized, setBusyHandler, setCacheSize, setJournalMode, setSafetyLevel, unregisterFileSystem
-
-
-
-
Field Detail
-
IN_MEMORY
public static final java.io.File IN_MEMORY
File name for in memory database.
-
MODULE_NAME
public static final java.lang.String MODULE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
open
public static SqlJetMapDb open(java.io.File file, boolean writable) throws SqlJetException
- Throws:
SqlJetException
-
runTransaction
public java.lang.Object runTransaction(SqlJetTransactionMode mode, ISqlJetMapTransaction transaction) throws SqlJetException
- Parameters:
mode- mode in which to run transaction.transaction- transaction to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)call. - Throws:
SqlJetException
-
runWriteTransaction
public java.lang.Object runWriteTransaction(ISqlJetMapTransaction transaction) throws SqlJetException
- Parameters:
transaction- to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)call. - Throws:
SqlJetException
-
runReadTransaction
public java.lang.Object runReadTransaction(ISqlJetMapTransaction transaction) throws SqlJetException
- Parameters:
transaction- transaction to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)call. - Throws:
SqlJetException
-
runSynchronized
public java.lang.Object runSynchronized(ISqlJetMapTransaction transaction) throws SqlJetException
- Parameters:
transaction- transaction to run.- Returns:
- result of
ISqlJetMapTransaction.run(SqlJetMapDb)call. - Throws:
SqlJetException
-
readSchema
protected void readSchema() throws SqlJetExceptionDescription copied from class:SqlJetEngineReads database schema and options.- Overrides:
readSchemain classSqlJetEngine- Throws:
SqlJetException
-
getMapNames
public java.util.Set<java.lang.String> getMapNames() throws SqlJetException- Returns:
- set of the map names stored in this database.
- Throws:
SqlJetException
-
getMapDef
public ISqlJetMapDef getMapDef(java.lang.String mapName) throws SqlJetException
- Parameters:
mapName- name of the map to get definition for.- Returns:
- definition of the map with the specified name.
- Throws:
SqlJetException
-
createMap
public ISqlJetMapDef createMap(java.lang.String mapName) throws SqlJetException
- Parameters:
mapName- name of the map to created.- Returns:
- map that has been created.
- Throws:
SqlJetException
-
getMap
public ISqlJetMap getMap(java.lang.String mapName) throws SqlJetException
- Parameters:
mapName- name of the map to get.- Returns:
- map table with the name specified.
- Throws:
SqlJetException
-
-