当前位置: 首页>>代码示例>>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;未经允许,请勿转载。