/** * Verify schema. * * @param <H> * the generic type * @param dataSource * the data source * @param inputStream * the input stream */ public static <H extends AbstractDataSource> void verifySchema(H dataSource, InputStream inputStream) { verifySchema(dataSource.openWritableDatabase(), inputStream); }
/** * Execute SQL. * * @param database * the database * @param fileInputStream * the file input stream */ public static void executeSQL(final SQLiteDatabase database, InputStream fileInputStream) { List<String> commands = readSQLFromFile(fileInputStream); executeSQL(database, commands); }
/** * For each element of array, generate a question. * * @param args * @return */ public static <E> String generateQuestion(byte[] args) { if (args == null || args.length == 0) return ""; return generateInternal(args.length); }
@Override public KriptonContentValues contentValuesForUpdate(SQLiteStatement compiledStatement) { this.contentValuesForUpdate.clear(compiledStatement); return this.contentValuesForUpdate; }
/** * Content values for update. * * @param compiledStatement the compiled statement * @return the kripton content values */ protected KriptonContentValues contentValuesForUpdate(SQLiteStatement compiledStatement) { return _context.contentValuesForUpdate(compiledStatement); }
/** * Sql builder. * * @return the string builder */ protected StringBuilder sqlBuilder() { return context.sqlBuilder(); }
/** * Checks if is log enabled. * * @return true, if is log enabled */ public boolean isLogEnabled() { return context.isLogEnabled(); }
/** * Content values. * * @return the kripton content values */ protected KriptonContentValues contentValues() { return _context.contentValues(null); }
/** * Creates the insert. * * @param result * the result * @return the SQ lite event */ public static SQLiteEvent createInsertWithId(Long result) { return new SQLiteEvent(SqlModificationType.INSERT, null, result, null); }
/** * On session opened. */ protected void onSessionOpened() { this.context.onSessionOpened(); }
/** * Retrieve SQLite database instance. * * @return the SQ lite database */ protected SQLiteDatabase database() { return _context.database(); }
/** * Builds the. * * @return the data source options */ public DataSourceOptions build() { return new DataSourceOptions(factory, errorHandler, databaseLifecycleHandler, updateTasks, logEnabled, populator, inMemory); } }
/** * Content values for update. * * @param compiledStatement * the compiled statement * @return the kripton content values */ protected KriptonContentValues contentValuesForUpdate(SQLiteStatement compiledStatement) { return context.contentValuesForUpdate(compiledStatement); }
@Override public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) { AbstractDataSource.this.onUpgrade(database, oldVersion, newVersion); } };
/** * Content values for content provider. * * @param values the values * @return the kripton content values */ protected KriptonContentValues contentValuesForContentProvider(ContentValues values) { return _context.contentValuesForContentProvider(values); }
/** * For each element of array, generate a question. * * @param args * @return */ public static <E> String generateQuestion(short[] args) { if (args == null || args.length == 0) return ""; return generateInternal(args.length); }
@Override public KriptonContentValues contentValues(SQLiteStatement compiledStatement) { this.contentValues.clear(compiledStatement); return this.contentValues; }
/** * Content values for update. * * @return the kripton content values */ protected KriptonContentValues contentValuesForUpdate() { return _context.contentValuesForUpdate(null); }
/** * For each element of array, generate a question. * * @param args * @return */ public static <E> String generateQuestion(E[] args) { if (args == null || args.length == 0) return ""; return generateInternal(args.length); }