remove FindPayload
@@ -4,7 +4,6 @@ import com.backendless.persistence.BackendlessDataQuery;
import com.backendless.persistence.DataQueryBuilder;
import com.backendless.transaction.operations.Operation;
import com.backendless.transaction.operations.OperationFind;
-import com.backendless.transaction.payload.FindPayload;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
@@ -26,20 +25,11 @@ public class UnitOfWorkFindImpl implements UnitOfWorkFind
BackendlessDataQuery query = queryBuilder.build();
String operationResultId = OperationType.FIND + "_" + countFind.getAndIncrement();
- FindPayload<?> payload = convertQueryToPayload( query );
- OperationFind operationFind = new OperationFind( OperationType.FIND, tableName, operationResultId, payload );
+ OperationFind<?> operationFind = new OperationFind<>( OperationType.FIND, tableName, operationResultId, query );
operations.add( operationFind );
return TransactionHelper.makeOpResult( tableName, operationResultId, OperationType.FIND );
}
-
- private FindPayload<?> convertQueryToPayload( BackendlessDataQuery query )
- {
- return new FindPayload<Object>( query.getPageSize(), query.getOffset(), query.getProperties(), query.getWhereClause(),
- query.getHavingClause(), query.getQueryOptions().getSortBy(),
- query.getQueryOptions().getRelated(), query.getQueryOptions().getRelationsDepth(),
- query.getQueryOptions().getRelationsPageSize(), query.getGroupBy(), null );
- }
}
