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 and Description static java.io.FileIN_MEMORYFile name for in memory database.static java.lang.StringMODULE_NAME
-
Constructor Summary
Constructors Constructor and Description SqlJetMapDb(java.io.File file, boolean writable)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and 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)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, close, commit, getBusyHandler, getCacheSize, getFile, getFileSystem, getJournalMode, getMutex, getOptions, getSafetyLevel, getTransactionMode, isInTransaction, isOpen, isWritable, open, refreshSchema, registerFileSystem, rollback, 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
-
-
Constructor Detail
-
SqlJetMapDb
public SqlJetMapDb(java.io.File file, boolean writable)- Parameters:
file- database file.writable- true if caller needs write access to the database.
-
-
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
-
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
-
-
DataMelt 3.0 © DataMelt by jWork.ORG