com.backendless.transaction.UnitOfWorkFindImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-common Show documentation
Show all versions of java-sdk-common Show documentation
Provides access to Backendless API
The newest version!
package com.backendless.transaction;
import com.backendless.persistence.BackendlessDataQuery;
import com.backendless.persistence.DataQueryBuilder;
import java.util.List;
class UnitOfWorkFindImpl implements UnitOfWorkFind
{
private final List operations;
private final OpResultIdGenerator opResultIdGenerator;
UnitOfWorkFindImpl( List operations, OpResultIdGenerator opResultIdGenerator )
{
this.operations = operations;
this.opResultIdGenerator = opResultIdGenerator;
}
@Override
public OpResult find( String tableName, DataQueryBuilder queryBuilder )
{
BackendlessDataQuery query = queryBuilder.build();
String operationResultId = opResultIdGenerator.generateOpResultId( OperationType.FIND, tableName );
OperationFind> operationFind = new OperationFind<>( OperationType.FIND, tableName, operationResultId, query );
operations.add( operationFind );
return TransactionHelper.makeOpResult( tableName, operationResultId, OperationType.FIND );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy