use of org.jnosql.diana.api.column.ColumnEntity in project jnosql-diana-driver by eclipse.
the class CassandraColumnFamilyManagerAsyncTest method shouldInsertColumnsAsyncWithConsistenceLevel.
@Test
public void shouldInsertColumnsAsyncWithConsistenceLevel() {
ColumnEntity columnEntity = getColumnFamily();
columnEntityManager.save(columnEntity, CONSISTENCY_LEVEL);
}
use of org.jnosql.diana.api.column.ColumnEntity in project jnosql-diana-driver by eclipse.
the class CassandraColumnFamilyManagerAsyncTest method shouldUpdateIterableColumnsAsync.
@Test
public void shouldUpdateIterableColumnsAsync() {
ColumnEntity columnEntity = getColumnFamily();
columnEntityManager.update(singletonList(columnEntity));
}
use of org.jnosql.diana.api.column.ColumnEntity in project jnosql-diana-driver by eclipse.
the class CassandraColumnFamilyManagerAsyncTest method shouldInsertJustKeyAsync.
@Test
public void shouldInsertJustKeyAsync() {
Column key = Columns.of("id", 10L);
ColumnEntity columnEntity = ColumnEntity.of(COLUMN_FAMILY);
columnEntity.add(key);
columnEntityManager.insert(columnEntity);
}
use of org.jnosql.diana.api.column.ColumnEntity in project jnosql-diana-driver by eclipse.
the class CassandraColumnFamilyManagerAsyncTest method shouldInsertIterableColumnsAsync.
@Test
public void shouldInsertIterableColumnsAsync() {
ColumnEntity columnEntity = getColumnFamily();
columnEntityManager.insert(singletonList(columnEntity));
}
use of org.jnosql.diana.api.column.ColumnEntity in project jnosql-diana-driver by eclipse.
the class CassandraColumnFamilyManagerTest method getEntities.
private List<ColumnEntity> getEntities() {
Map<String, Object> fields = new HashMap<>();
fields.put("name", "Cassandra");
fields.put("version", 3.2);
fields.put("options", asList(1, 2, 3));
List<Column> columns = Columns.of(fields);
ColumnEntity entity = ColumnEntity.of(COLUMN_FAMILY, singletonList(Columns.of("id", 1L)));
ColumnEntity entity1 = ColumnEntity.of(COLUMN_FAMILY, singletonList(Columns.of("id", 2L)));
ColumnEntity entity2 = ColumnEntity.of(COLUMN_FAMILY, singletonList(Columns.of("id", 3L)));
columns.forEach(entity::add);
columns.forEach(entity1::add);
columns.forEach(entity2::add);
return asList(entity, entity1, entity2);
}
Aggregations