Tabnine Logo
AbstractDataSource
Code IndexAdd Tabnine to your IDE (free)

How to use
AbstractDataSource
in
com.abubusoft.kripton.android.sqlite

Best Java code snippets using com.abubusoft.kripton.android.sqlite.AbstractDataSource (Showing top 20 results out of 315)

origin: com.abubusoft/kripton-orm

@Override
public SQLiteDatabase database() {
  return dataSource.database();
}
origin: xcesco/kripton

/**
 * Force a schema update for a datasource. Note that no DDL was execute
 * untill the database was opened.
 *
 * @param <H>
 *            the element type
 * @param dataSource
 *            the data source
 * @param version
 *            to upgrade.
 */
public static <H extends AbstractDataSource> void forceDataSourceSchemaUpdate(H dataSource, int version) {
  dataSource.forceClose();
  dataSource.version = version;
  dataSource.database = null;
  dataSource.sqliteHelper = null;
  dataSource.openWritableDatabase();
}
origin: com.abubusoft/kripton-orm

@Override
public void onConfigure(SQLiteDatabase database) {
  AbstractDataSource.this.database = database;
  AbstractDataSource.this.onConfigure(database);
}
origin: xcesco/kripton

/**
 * Clear datasource.
 *
 * @param <H>
 *            the element type
 * @param dataSource
 *            the data source
 */
public static <H extends AbstractDataSource> void clearDataSource(H dataSource) {
  if (dataSource.options.inMemory) {
    dataSource.close();
    return;
  }
  dataSource.openWritableDatabase();
  File file = new File(dataSource.database.getPath(), dataSource.name);
  if (dataSource.isOpen()) {
    dataSource.forceClose();
    dataSource.close();
  }
  Logger.info("Clear database file %s", file.getAbsolutePath());
  if (!file.delete()) {
    Logger.warn("Can not delete database " + file.getAbsolutePath());
  }
}
origin: com.abubusoft/kripton-orm

try {
  if (sqliteHelper == null)
    createHelper(options);
origin: xcesco/kripton

  @Override
  public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) {
    AbstractDataSource.this.onUpgrade(database, oldVersion, newVersion);
  }
};
origin: com.abubusoft/kripton-orm

@Override
public void onDowngrade(SQLiteDatabase database, int oldVersion, int newVersion) {
  AbstractDataSource.this.onDowngrade(database, oldVersion, newVersion);
}
origin: com.abubusoft/kripton-orm

@Override
public void onCreate(SQLiteDatabase database) {
  AbstractDataSource.this.onCreate(database);
}
origin: com.abubusoft/kripton-orm

clearCompiledStatements();
database.close();
origin: com.abubusoft/kripton-orm

try {
  if (sqliteHelper == null)
    createHelper(options);
origin: com.abubusoft/kripton-orm

  @Override
  public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) {
    AbstractDataSource.this.onUpgrade(database, oldVersion, newVersion);
  }
};
origin: xcesco/kripton

@Override
public void onDowngrade(SQLiteDatabase database, int oldVersion, int newVersion) {
  AbstractDataSource.this.onDowngrade(database, oldVersion, newVersion);
}
origin: xcesco/kripton

@Override
public void onCreate(SQLiteDatabase database) {
  AbstractDataSource.this.onCreate(database);
}
origin: xcesco/kripton

clearCompiledStatements();
database.close();
origin: xcesco/kripton

@Override
public SQLiteDatabase database() {
  return dataSource.database();
}
origin: xcesco/kripton

try {
  if (sqliteHelper == null)
    createHelper(options);
origin: xcesco/kripton

@Override
public void onConfigure(SQLiteDatabase database) {
  AbstractDataSource.this.database = database;
  AbstractDataSource.this.onConfigure(database);
}
origin: com.abubusoft/kripton-orm

@Override
public SQLiteDatabase database() {
  return dataSource.database();
}
origin: xcesco/kripton

try {
  if (sqliteHelper == null)
    createHelper(options);
origin: xcesco/kripton

@Override
public SQLiteDatabase database() {
  return dataSource.database();
}
com.abubusoft.kripton.android.sqliteAbstractDataSource

Javadoc

Base class for data source

.

Most used methods

  • clearCompiledStatements
    used to clear prepared statements.
  • close
  • createHelper
    Creates the helper.
  • database
    Return database object or runtimeexception if no database is opened.
  • forceClose
    Force close.
  • isOpen
    return true if database is already opened.
  • onConfigure
    On configure.
  • onCreate
    On create.
  • onDowngrade
    On downgrade.
  • onUpgrade
    On upgrade.
  • openWritableDatabase
    open a writable database.
  • openWritableDatabase

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now