Example #1
0
 public static synchronized Cache getInstance(
     DefaultStorIOSQLite customStorIOSQLite, CacheStrategyFactory cacheStrategyFactory) {
   if (_cache == null) {
     StorIOSQLite.initWithCustomStorIOSQLite(customStorIOSQLite);
     _cache = new CacheSQL(cacheStrategyFactory);
   }
   return _cache;
 }
Example #2
0
 @Override
 public boolean clear(Context context) {
   try {
     StorIOSQLite.getInstance().close();
     return context.deleteDatabase(ScreensSQLiteOpenHelper.SCREENS_CACHE_DB);
   } catch (IOException e) {
     LiferayLogger.e("Could not clear the database", e);
     return false;
   }
 }
Example #3
0
 public static List queryGet(
     Class tableClass, String tableName, String where, Object... queryArgs) {
   return StorIOSQLite.queryGet(tableClass, tableName, where, queryArgs);
 }
Example #4
0
 @NonNull
 public static DatabaseResult querySet(Object object) {
   return StorIOSQLite.querySet(object);
 }