本文整理匯總了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));
}