Search in sources :

Example 1 with SchemaApiTestRow

use of com.palantir.atlasdb.table.description.generated.SchemaApiTestTable.SchemaApiTestRow in project atlasdb by palantir.

the class SchemaApiTestImpl method getMultipleRowsFirstColumn.

@Override
protected Map<String, Long> getMultipleRowsFirstColumn(Transaction transaction, List<String> rowKeys) {
    SchemaApiTestTable table = tableFactory.getSchemaApiTestTable(transaction);
    ColumnSelection firstColSelection = SchemaApiTestTable.getColumnSelection(SchemaApiTestTable.SchemaApiTestNamedColumn.COLUMN1);
    List<SchemaApiTestRowResult> result = table.getRows(rowKeys.stream().map(SchemaApiTestRow::of).collect(Collectors.toList()), firstColSelection);
    return result.stream().collect(Collectors.toMap(entry -> entry.getRowName().getComponent1(), SchemaApiTestTable.SchemaApiTestRowResult::getColumn1));
}
Also used : StringValue(com.palantir.atlasdb.table.description.test.StringValue) EncodingUtils(com.palantir.atlasdb.ptobject.EncodingUtils) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) HashComponentsTestTable(com.palantir.atlasdb.table.description.generated.HashComponentsTestTable) ApiTestTableFactory(com.palantir.atlasdb.table.description.generated.ApiTestTableFactory) Test(org.junit.Test) Hashing(com.google.common.hash.Hashing) Collectors(java.util.stream.Collectors) PtBytes(com.palantir.atlasdb.encoding.PtBytes) ColumnSelection(com.palantir.atlasdb.keyvalue.api.ColumnSelection) RangeRequest(com.palantir.atlasdb.keyvalue.api.RangeRequest) SchemaApiTestRow(com.palantir.atlasdb.table.description.generated.SchemaApiTestTable.SchemaApiTestRow) List(java.util.List) Transaction(com.palantir.atlasdb.transaction.api.Transaction) Map(java.util.Map) SchemaApiTestRowResult(com.palantir.atlasdb.table.description.generated.SchemaApiTestTable.SchemaApiTestRowResult) BatchingVisitableView(com.palantir.common.base.BatchingVisitableView) Optional(java.util.Optional) SchemaApiTestTable(com.palantir.atlasdb.table.description.generated.SchemaApiTestTable) BatchingVisitables(com.palantir.common.base.BatchingVisitables) ColumnSelection(com.palantir.atlasdb.keyvalue.api.ColumnSelection) SchemaApiTestRow(com.palantir.atlasdb.table.description.generated.SchemaApiTestTable.SchemaApiTestRow) SchemaApiTestTable(com.palantir.atlasdb.table.description.generated.SchemaApiTestTable) SchemaApiTestRowResult(com.palantir.atlasdb.table.description.generated.SchemaApiTestTable.SchemaApiTestRowResult)

Aggregations

Hashing (com.google.common.hash.Hashing)1 PtBytes (com.palantir.atlasdb.encoding.PtBytes)1 ColumnSelection (com.palantir.atlasdb.keyvalue.api.ColumnSelection)1 RangeRequest (com.palantir.atlasdb.keyvalue.api.RangeRequest)1 EncodingUtils (com.palantir.atlasdb.ptobject.EncodingUtils)1 ApiTestTableFactory (com.palantir.atlasdb.table.description.generated.ApiTestTableFactory)1 HashComponentsTestTable (com.palantir.atlasdb.table.description.generated.HashComponentsTestTable)1 SchemaApiTestTable (com.palantir.atlasdb.table.description.generated.SchemaApiTestTable)1 SchemaApiTestRow (com.palantir.atlasdb.table.description.generated.SchemaApiTestTable.SchemaApiTestRow)1 SchemaApiTestRowResult (com.palantir.atlasdb.table.description.generated.SchemaApiTestTable.SchemaApiTestRowResult)1 StringValue (com.palantir.atlasdb.table.description.test.StringValue)1 Transaction (com.palantir.atlasdb.transaction.api.Transaction)1 BatchingVisitableView (com.palantir.common.base.BatchingVisitableView)1 BatchingVisitables (com.palantir.common.base.BatchingVisitables)1 List (java.util.List)1 Map (java.util.Map)1 Optional (java.util.Optional)1 Collectors (java.util.stream.Collectors)1 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)1 Test (org.junit.Test)1