org.sqlite
Class SQLiteDataSource
java.lang.Object
org.sqlite.SQLiteDataSource
- All Implemented Interfaces:
- DataSource
public class SQLiteDataSource
- extends Object
- implements DataSource
Provides DataSource
API for configuring SQLite database connection
- Author:
- leo
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLiteDataSource
public SQLiteDataSource()
SQLiteDataSource
public SQLiteDataSource(SQLiteConfig config)
setConfig
public void setConfig(SQLiteConfig config)
- Set the configuration parameters via
SQLiteConfig
object
- Parameters:
config
-
getConfig
public SQLiteConfig getConfig()
setUrl
public void setUrl(String url)
getUrl
public String getUrl()
setSharedCache
public void setSharedCache(boolean enable)
setLoadExtension
public void setLoadExtension(boolean enable)
setReadOnly
public void setReadOnly(boolean readOnly)
setCacheSize
public void setCacheSize(int numberOfPages)
setCaseSensitiveLike
public void setCaseSensitiveLike(boolean enable)
setCouncChanges
public void setCouncChanges(boolean enable)
setDefaultCacheSize
public void setDefaultCacheSize(int numberOfPages)
setEncoding
public void setEncoding(String encoding)
setEnforceForeinKeys
public void setEnforceForeinKeys(boolean enforce)
setFullColumnNames
public void setFullColumnNames(boolean enable)
setFullSync
public void setFullSync(boolean enable)
setIncrementalVacuum
public void setIncrementalVacuum(int numberOfPagesToBeRemoved)
setJournalMode
public void setJournalMode(String mode)
setJournalSizeLimit
public void setJournalSizeLimit(int limit)
setLegacyFileFormat
public void setLegacyFileFormat(boolean use)
setLockingMode
public void setLockingMode(String mode)
setPageSize
public void setPageSize(int numBytes)
setMaxPageCount
public void setMaxPageCount(int numPages)
setReadUncommited
public void setReadUncommited(boolean useReadUncommitedIsolationMode)
setRecursiveTriggers
public void setRecursiveTriggers(boolean enable)
setReverseUnorderedSelects
public void setReverseUnorderedSelects(boolean enable)
setShortColumnNames
public void setShortColumnNames(boolean enable)
setSynchronous
public void setSynchronous(String mode)
setTempStore
public void setTempStore(String storeType)
setTempStoreDirectory
public void setTempStoreDirectory(String directoryName)
setUserVersion
public void setUserVersion(int version)
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
getConnection
public Connection getConnection(String username,
String password)
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
- Specified by:
getLogWriter
in interface DataSource
- Throws:
SQLException
getLoginTimeout
public int getLoginTimeout()
throws SQLException
- Specified by:
getLoginTimeout
in interface DataSource
- Throws:
SQLException
setLogWriter
public void setLogWriter(PrintWriter out)
throws SQLException
- Specified by:
setLogWriter
in interface DataSource
- Throws:
SQLException
setLoginTimeout
public void setLoginTimeout(int seconds)
throws SQLException
- Specified by:
setLoginTimeout
in interface DataSource
- Throws:
SQLException
isWrapperFor
public boolean isWrapperFor(Class<?> iface)
throws SQLException
- Throws:
SQLException
unwrap
public <T> T unwrap(Class<T> iface)
throws SQLException
- Throws:
SQLException

This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.