com.pushtorefresh.storio.sqlite.SQLiteTypeMapping Java Examples
The following examples show how to use
com.pushtorefresh.storio.sqlite.SQLiteTypeMapping.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StorIOFactory.java From Reactive-Android-Programming with MIT License | 6 votes |
public synchronized static StorIOSQLite get(Context context) { if (INSTANCE != null) { return INSTANCE; } INSTANCE = DefaultStorIOSQLite.builder() .sqliteOpenHelper(new StorIODbHelper(context)) .addTypeMapping(StockUpdate.class, SQLiteTypeMapping.<StockUpdate>builder() .putResolver(new StockUpdatePutResolver()) .getResolver(new StockUpdateGetResolver()) .deleteResolver(new StockUpdateDeleteResolver()) .build()) .build(); return INSTANCE; }
Example #2
Source File: StorIOFactory.java From Reactive-Android-Programming with MIT License | 6 votes |
public synchronized static StorIOSQLite get(Context context) { if (INSTANCE != null) { return INSTANCE; } INSTANCE = DefaultStorIOSQLite.builder() .sqliteOpenHelper(new StorIODbHelper(context)) .addTypeMapping(StockUpdate.class, SQLiteTypeMapping.<StockUpdate>builder() .putResolver(new StockUpdatePutResolver()) .getResolver(new StockUpdateGetResolver()) .deleteResolver(new StockUpdateDeleteResolver()) .build()) .build(); return INSTANCE; }
Example #3
Source File: StorIOFactory.java From Reactive-Android-Programming with MIT License | 6 votes |
public synchronized static StorIOSQLite get(Context context) { if (INSTANCE != null) { return INSTANCE; } INSTANCE = DefaultStorIOSQLite.builder() .sqliteOpenHelper(new StorIODbHelper(context)) .addTypeMapping(StockUpdate.class, SQLiteTypeMapping.<StockUpdate>builder() .putResolver(new StockUpdatePutResolver()) .getResolver(new StockUpdateGetResolver()) .deleteResolver(new StockUpdateDeleteResolver()) .build()) .build(); return INSTANCE; }
Example #4
Source File: StorIOFactory.java From Reactive-Android-Programming with MIT License | 6 votes |
public synchronized static StorIOSQLite get(Context context) { if (INSTANCE != null) { return INSTANCE; } INSTANCE = DefaultStorIOSQLite.builder() .sqliteOpenHelper(new StorIODbHelper(context)) .addTypeMapping(StockUpdate.class, SQLiteTypeMapping.<StockUpdate>builder() .putResolver(new StockUpdatePutResolver()) .getResolver(createGetResolver()) .deleteResolver(createDeleteResolver()) .build()) .build(); return INSTANCE; }
Example #5
Source File: StorIOFactory.java From Reactive-Android-Programming with MIT License | 6 votes |
public synchronized static StorIOSQLite get(Context context) { if (INSTANCE != null) { return INSTANCE; } INSTANCE = DefaultStorIOSQLite.builder() .sqliteOpenHelper(new StorIODbHelper(context)) .addTypeMapping(StockUpdate.class, SQLiteTypeMapping.<StockUpdate>builder() .putResolver(new StockUpdatePutResolver()) .getResolver(new StockUpdateGetResolver()) .deleteResolver(new StockUpdateDeleteResolver()) .build()) .build(); return INSTANCE; }
Example #6
Source File: StorIOFactory.java From Reactive-Android-Programming with MIT License | 6 votes |
public synchronized static StorIOSQLite get(Context context) { if (INSTANCE != null) { return INSTANCE; } INSTANCE = DefaultStorIOSQLite.builder() .sqliteOpenHelper(new StorIODbHelper(context)) .addTypeMapping(StockUpdate.class, SQLiteTypeMapping.<StockUpdate>builder() .putResolver(new StockUpdatePutResolver()) .getResolver(new StockUpdateGetResolver()) .deleteResolver(new StockUpdateDeleteResolver()) .build()) .build(); return INSTANCE; }
Example #7
Source File: StorIOFactory.java From Reactive-Android-Programming with MIT License | 6 votes |
public synchronized static StorIOSQLite get(Context context) { if (INSTANCE != null) { return INSTANCE; } INSTANCE = DefaultStorIOSQLite.builder() .sqliteOpenHelper(new StorIODbHelper(context)) .addTypeMapping(StockUpdate.class, SQLiteTypeMapping.<StockUpdate>builder() .putResolver(new StockUpdatePutResolver()) .getResolver(new StockUpdateGetResolver()) .deleteResolver(new StockUpdateDeleteResolver()) .build()) .build(); return INSTANCE; }
Example #8
Source File: StorIOHelper.java From Hews with MIT License | 6 votes |
public static StorIOSQLite getStorIOSQLite(Context context) { if (mStorIOSQLite != null) { return mStorIOSQLite; } mStorIOSQLite = DefaultStorIOSQLite.builder() .sqliteOpenHelper(new DbOpenHelper(context)) .addTypeMapping(Post.class, SQLiteTypeMapping.<Post>builder() // object that knows how to perform Put Operation (insert or update) .putResolver(new PostStorIOSQLitePutResolver()) // object that knows how to perform Get Operation .getResolver(new PostStorIOSQLiteGetResolver()) // object that knows how to perform Delete Operation .deleteResolver(new PostStorIOSQLiteDeleteResolver()) .build()) .addTypeMapping(Comment.class, SQLiteTypeMapping.<Comment>builder() .putResolver(new CommentStorIOSQLitePutResolver()) .getResolver(new CommentStorIOSQLiteGetResolver()) .deleteResolver(new CommentStorIOSQLiteDeleteResolver()) .build()) .build(); return mStorIOSQLite; }