本文整理汇总了Java中com.datastax.driver.core.Row.get方法的典型用法代码示例。如果您正苦于以下问题:Java Row.get方法的具体用法?Java Row.get怎么用?Java Row.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.datastax.driver.core.Row
的用法示例。
在下文中一共展示了Row.get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getValueGroupChange
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private Set<ValueGroupChange> getValueGroupChange(final Row row) {
final String type = row.getString("vgchangetype");
if (type != null && Type.valueOf(type) != Type.NONE) {
final ValueGroup group =
new ValueGroup(row.getUUID("vgid"), row.getString("vgname"),
row.getList("vgdrivers", String.class),
new DateRange(row.get("vgstart", Instant.class), row.get("vgend", Instant.class)));
final String driver = row.getString("vgdrivername");
if (driver != null && !driver.isEmpty()) {
group.setNewRuleData(driver, row.getList("vgrulecodes", UUID.class));
}
return Collections.singleton(new ValueGroupChange(Type.valueOf(type), group));
}
return Collections.emptySet();
}
示例2: verifyNextRow
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private String verifyNextRow(ResultSet rs) {
String rowid = null;
for (int col=0; col < 137; col++) {
Row row = rs.one();
assertNotNull(row);
if (rowid == null) {
rowid = row.get("rowid", TypeCodec.varchar());
} else {
assertEquals(row.get("rowid", TypeCodec.varchar()), rowid);
}
assertEquals((long) row.get("col", TypeCodec.bigint()), col);
assertEquals( row.get("data", TypeCodec.blob()).asIntBuffer().get(), col);
}
return rowid;
}
示例3: getChange
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
public Result<ChangeSet> getChange(final String changeSetName) {
try {
final ResultSet resultSet = this.session.execute(CQL_GET_ACTIVE_CHANGE, changeSetName);
EhSupport.ensure(!resultSet.isExhausted(), "ChangeSet %s does not exist in %s.", changeSetName,
this.keyspace);
UUID changeSetId = null;
final Map<Change, List<Change>> changes = new HashMap<>();
for (final Row row : resultSet) {
changeSetId = row.getUUID("id");
final UUID changeid = row.getUUID("changeid");
final String rulesetname = row.getString("rulesetname");
final Instant activationTime = row.get("activationtime", Instant.class);
final DateRange changeRange = new DateRange(row.get("start", Instant.class),
row.get("end", Instant.class));
final Change newchange = new Change(changeid, rulesetname, activationTime, changeRange,
getAuditForChange(row), getRuleChangeForChange(row), getValueGroupChange(row));
final List<Change> internalChanges = changes.computeIfAbsent(newchange, value -> new ArrayList<>());
internalChanges.add(newchange);
}
return Result.success(new ChangeSet(changeSetId, changeSetName, mergeChangesIntoSet(changes)));
} catch (final Exception exception) {
return Result.failure(() -> exception);
}
}
示例4: convertResultToAttributesKvEntry
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private AttributeKvEntry convertResultToAttributesKvEntry(String key, Row row) {
AttributeKvEntry attributeEntry = null;
if (row != null) {
long lastUpdateTs = row.get(LAST_UPDATE_TS_COLUMN, Long.class);
attributeEntry = new BaseAttributeKvEntry(CassandraBaseTimeseriesDao.toKvEntry(row, key), lastUpdateTs);
}
return attributeEntry;
}
示例5: getAuditForChange
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private Audit getAuditForChange(final Row row) {
return new Audit(row.getString("initiator"),
row.get("initiatortime", Instant.class), row.getString("approver"),
row.get("approvertime", Instant.class));
}