|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsqlwrapper.SqLiteSQLWrapper
public class SqLiteSQLWrapper
Implementation of the SQLWrapper interface for SQLite embedded database.
Field Summary | |
---|---|
private java.sql.Connection |
conn
|
private java.lang.String |
dbName
|
private java.lang.String |
dbPath
|
private java.lang.String |
driver
|
private java.lang.String |
protocol
|
private static SqLiteSQLWrapper |
sqLiteInstance
Single instance created upon class loading. |
Constructor Summary | |
---|---|
private |
SqLiteSQLWrapper()
|
Method Summary | |
---|---|
void |
commit()
Commit transaction |
boolean |
execute(java.lang.String sql)
Execute SQL statement for data definition and manipulation |
QueryResult |
executeQuery(java.lang.String sql)
Execute SQL statement for data query |
boolean |
flush()
Commit transaction, delete temporary data |
private java.sql.Connection |
getConnection()
|
static SqLiteSQLWrapper |
getInstance()
Returns the singleton sqLite instance |
private void |
loadDriver()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String driver
private final java.lang.String protocol
private final java.lang.String dbName
private java.lang.String dbPath
private java.sql.Connection conn
private static final SqLiteSQLWrapper sqLiteInstance
Constructor Detail |
---|
private SqLiteSQLWrapper()
Method Detail |
---|
public static SqLiteSQLWrapper getInstance()
public boolean execute(java.lang.String sql)
execute
in interface SQLWrapper
sql
- Sql operation
public QueryResult executeQuery(java.lang.String sql)
executeQuery
in interface SQLWrapper
sql
- Sql operation
public void commit()
commit
in interface SQLWrapper
public boolean flush()
flush
in interface SQLWrapper
private java.sql.Connection getConnection() throws java.sql.SQLException
java.sql.SQLException
private void loadDriver() throws java.sql.SQLException
java.sql.SQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |