Java Code Examples for com.pushtorefresh.storio.sqlite.queries.DeleteQuery

The following examples show how to use com.pushtorefresh.storio.sqlite.queries.DeleteQuery. These examples are extracted from open source projects. 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
@NonNull
@Override
protected DeleteQuery mapToDeleteQuery(@NonNull StockUpdate object) {
    return DeleteQuery.builder()
            .table(StockUpdateTable.TABLE)
            .where(StockUpdateTable.Columns.ID + " = ?")
            .whereArgs(object.getId())
            .build();
}
 
Example 2
@NonNull
@Override
protected DeleteQuery mapToDeleteQuery(@NonNull StockUpdate object) {
    return DeleteQuery.builder()
            .table(StockUpdateTable.TABLE)
            .where(StockUpdateTable.Columns.ID + " = ?")
            .whereArgs(object.getId())
            .build();
}
 
Example 3
@NonNull
@Override
protected DeleteQuery mapToDeleteQuery(@NonNull StockUpdate object) {
    return DeleteQuery.builder()
            .table(StockUpdateTable.TABLE)
            .where(StockUpdateTable.Columns.ID + " = ?")
            .whereArgs(object.getId())
            .build();
}
 
Example 4
Source Project: Reactive-Android-Programming   Source File: StorIOFactory.java    License: MIT License 5 votes vote down vote up
private static DeleteResolver<StockUpdate> createDeleteResolver() {
    return new DefaultDeleteResolver<StockUpdate>() {
        @NonNull
        @Override
        protected DeleteQuery mapToDeleteQuery(@NonNull StockUpdate object) {
            return null;
        }
    };
}
 
Example 5
@NonNull
@Override
protected DeleteQuery mapToDeleteQuery(@NonNull StockUpdate object) {
    return DeleteQuery.builder()
            .table(StockUpdateTable.TABLE)
            .where(StockUpdateTable.Columns.ID + " = ?")
            .whereArgs(object.getId())
            .build();
}
 
Example 6
@NonNull
@Override
protected DeleteQuery mapToDeleteQuery(@NonNull StockUpdate object) {
    return DeleteQuery.builder()
            .table(StockUpdateTable.TABLE)
            .where(StockUpdateTable.Columns.ID + " = ?")
            .whereArgs(object.getId())
            .build();
}
 
Example 7
@NonNull
@Override
protected DeleteQuery mapToDeleteQuery(@NonNull StockUpdate object) {
    return DeleteQuery.builder()
            .table(StockUpdateTable.TABLE)
            .where(StockUpdateTable.Columns.ID + " = ?")
            .whereArgs(object.getId())
            .build();
}
 
Example 8
Source Project: android   Source File: LocationCacheMeta.java    License: Apache License 2.0 5 votes vote down vote up
@NonNull
@Override
protected DeleteQuery mapToDeleteQuery(@NonNull LocationCache object) {
    return DeleteQuery.builder()
            .table(TABLE)
            .where(Columns._ID + " = ?")
            .whereArgs(object.getId())
            .build();
}
 
Example 9
Source Project: android   Source File: PrayerCacheMeta.java    License: Apache License 2.0 5 votes vote down vote up
@NonNull
@Override
protected DeleteQuery mapToDeleteQuery(@NonNull PrayerCache object) {
    return DeleteQuery.builder()
            .table(TABLE)
            .where(Columns._ID + " = ?")
            .whereArgs(object.id)
            .build();
}
 
Example 10
Source Project: Hews   Source File: LocalDataManager.java    License: MIT License 5 votes vote down vote up
@Override
public Observable<DeleteResult> deleteStoryCommentsFromDb(long postId) {
    return StorIOHelper.getStorIOSQLite(mContext)
        .delete()
        .byQuery(DeleteQuery.builder()
            .table(CommentTable.TABLE)
            .where(CommentTable.COLUMN_PARENT + "=" + postId)
            .build())
        .prepare()
        .asRxObservable().onBackpressureBuffer();
}