当前位置: 首页>>代码示例>>Java>>正文


Java Row.getBool方法代码示例

本文整理汇总了Java中com.datastax.driver.core.Row.getBool方法的典型用法代码示例。如果您正苦于以下问题:Java Row.getBool方法的具体用法?Java Row.getBool怎么用?Java Row.getBool使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.datastax.driver.core.Row的用法示例。


在下文中一共展示了Row.getBool方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getColValue

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
public Object getColValue(Row row, String colName, DataType colType){	
	switch(colType.getName()){
	case VARCHAR: 
		return row.getString(colName);
	case UUID: 
		return row.getUUID(colName);
	case VARINT: 
		return row.getVarint(colName);
	case BIGINT: 
		return row.getLong(colName);
	case INT: 
		return row.getInt(colName);
	case FLOAT: 
		return row.getFloat(colName);	
	case DOUBLE: 
		return row.getDouble(colName);
	case BOOLEAN: 
		return row.getBool(colName);
	case MAP: 
		return row.getMap(colName, String.class, String.class);
	default: 
		return null;
	}
}
 
开发者ID:att,项目名称:music,代码行数:25,代码来源:MusicDataStore.java

示例2: getValue

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private Object getValue(Row musicRow, String colname) {
	ColumnDefinitions cdef = musicRow.getColumnDefinitions();
	String type = cdef.getType(colname).getName().toString().toUpperCase();
	switch (type) {
	case "BIGINT":
		return musicRow.getLong(colname);
	case "BOOLEAN":
		return musicRow.getBool(colname);
	case "BLOB":
		return musicRow.getBytes(colname);
	case "DOUBLE":
		return musicRow.getDouble(colname);
	case "INT":
		return musicRow.getInt(colname);
	case "TIMESTAMP":
		return musicRow.getTimestamp(colname);
	default:
		logger.error("UNEXPECTED COLUMN TYPE: columname="+colname+", columntype="+type);
		// fall thru
	case "VARCHAR":
		return musicRow.getString(colname);
	}
}
 
开发者ID:att,项目名称:music,代码行数:24,代码来源:CassandraMixin.java

示例3: readRow

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private Object readRow(final Row row, final String name, final DataType colType) {
		switch (colType.getName()) {
		case BIGINT:
			return row.getLong(name);
		case BOOLEAN:
			return row.getBool(name);
		case DOUBLE:
			return row.getDouble(name);
		case FLOAT:
			return row.getFloat(name);
		case INT:
			return row.getInt(name);
		case MAP:
			return row.getMap(name, String.class, String.class);
		case UUID:
			return row.getUUID(name);
		case TEXT:
		case VARCHAR:
			return row.getString(name);
		case VARINT:
			return row.getVarint(name);
// These are not supported right now....
// ASCII
// BLOB
// COUNTER
// CUSTOM
// DECIMAL
// INET
// LIST
// SET
// TIMESTAMP
// TIMEUUID
// TUPLE
// UDT
		default:
			return null;
		}
	}
 
开发者ID:att,项目名称:music,代码行数:39,代码来源:MusicClient.java

示例4: assertResult

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private void assertResult(ResultSet set) {
  List<Row> results = set.all();
  assertThat(1).isEqualTo(results.size());
  Row row1 = results.get(0);
  boolean column1 = row1.getBool("applied");
  assertThat(column1).isTrue();
}
 
开发者ID:datastax,项目名称:simulacron,代码行数:8,代码来源:HttpPrimeBatchIntegrationTest.java

示例5: getBooleanValue

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private Boolean getBooleanValue(Row row) {
    if (aggregation == Aggregation.MIN || aggregation == Aggregation.MAX) {
        return row.getBool(BOOL_POS);
    } else {
        return null;
    }
}
 
开发者ID:osswangxining,项目名称:iotplatform,代码行数:8,代码来源:AggregatePartitionsFunction.java

示例6: getBooleanValue

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private Boolean getBooleanValue(Row row) {
    if (aggregation == Aggregation.MIN || aggregation == Aggregation.MAX) {
        return row.getBool(BOOL_POS);
    } else {
        return null; //NOSONAR, null is used for further comparison
    }
}
 
开发者ID:thingsboard,项目名称:thingsboard,代码行数:8,代码来源:AggregatePartitionsFunction.java

示例7: deleteLock

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private static void deleteLock( String className) {
    Row row = session.execute( String.format( "DELETE FROM authz.run_lock WHERE class = '%s' IF EXISTS", className ) ).one();
    if (! row.getBool("[applied]")) {
        env.info().log( "delete failed" );
    }
}
 
开发者ID:att,项目名称:AAF,代码行数:7,代码来源:Batch.java

示例8: isApplied

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
protected final boolean isApplied(ResultSet resultSet) {
    Row row = resultSet.one();
    return row == null || row.getBool("[applied]");
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:5,代码来源:CassandraIdempotentRepository.java


注:本文中的com.datastax.driver.core.Row.getBool方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。