當前位置: 首頁>>代碼示例>>Java>>正文


Java Row.get方法代碼示例

本文整理匯總了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();
}
 
開發者ID:jpmorganchase,項目名稱:swblocks-decisiontree,代碼行數:19,代碼來源:CassandraLoader.java

示例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;
}
 
開發者ID:bazaarvoice,項目名稱:emodb,代碼行數:19,代碼來源:AdaptiveResultSetTest.java

示例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);
    }
}
 
開發者ID:jpmorganchase,項目名稱:swblocks-decisiontree,代碼行數:28,代碼來源:CassandraLoader.java

示例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;
}
 
開發者ID:osswangxining,項目名稱:iotplatform,代碼行數:9,代碼來源:CassandraBaseAttributesDao.java

示例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));
}
 
開發者ID:jpmorganchase,項目名稱:swblocks-decisiontree,代碼行數:6,代碼來源:CassandraLoader.java


注:本文中的com.datastax.driver.core.Row.get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。