com.j256.ormlite.android
Class AndroidConnectionSource
java.lang.Object
com.j256.ormlite.support.BaseConnectionSource
com.j256.ormlite.android.AndroidConnectionSource
- All Implemented Interfaces:
- com.j256.ormlite.support.ConnectionSource
public class AndroidConnectionSource
- extends com.j256.ormlite.support.BaseConnectionSource
- implements com.j256.ormlite.support.ConnectionSource
Android version of the connection source. Takes a standard Android SQLiteOpenHelper
. For best results, use
OrmLiteSqliteOpenHelper
. You can also construct with a SQLiteDatabase
.
- Author:
- kevingalligan, graywatson
Methods inherited from class com.j256.ormlite.support.BaseConnectionSource |
clearSpecial, getSavedConnection, getSpecialConnection, isSavedConnection, saveSpecial |
Methods inherited from interface com.j256.ormlite.support.ConnectionSource |
getSpecialConnection |
AndroidConnectionSource
public AndroidConnectionSource(android.database.sqlite.SQLiteOpenHelper helper)
AndroidConnectionSource
public AndroidConnectionSource(android.database.sqlite.SQLiteDatabase sqliteDatabase)
getReadOnlyConnection
public com.j256.ormlite.support.DatabaseConnection getReadOnlyConnection()
throws SQLException
- Specified by:
getReadOnlyConnection
in interface com.j256.ormlite.support.ConnectionSource
- Throws:
SQLException
getReadWriteConnection
public com.j256.ormlite.support.DatabaseConnection getReadWriteConnection()
throws SQLException
- Specified by:
getReadWriteConnection
in interface com.j256.ormlite.support.ConnectionSource
- Throws:
SQLException
releaseConnection
public void releaseConnection(com.j256.ormlite.support.DatabaseConnection connection)
- Specified by:
releaseConnection
in interface com.j256.ormlite.support.ConnectionSource
saveSpecialConnection
public boolean saveSpecialConnection(com.j256.ormlite.support.DatabaseConnection connection)
throws SQLException
- Specified by:
saveSpecialConnection
in interface com.j256.ormlite.support.ConnectionSource
- Throws:
SQLException
clearSpecialConnection
public void clearSpecialConnection(com.j256.ormlite.support.DatabaseConnection connection)
- Specified by:
clearSpecialConnection
in interface com.j256.ormlite.support.ConnectionSource
close
public void close()
- Specified by:
close
in interface com.j256.ormlite.support.ConnectionSource
getDatabaseType
public com.j256.ormlite.db.DatabaseType getDatabaseType()
- Specified by:
getDatabaseType
in interface com.j256.ormlite.support.ConnectionSource
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface com.j256.ormlite.support.ConnectionSource
toString
public String toString()
- Overrides:
toString
in class Object
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.