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


Java Row.getInt方法代码示例

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


在下文中一共展示了Row.getInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: convertToEntityEvent

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
static EntityEvent convertToEntityEvent(Row entityEventData) {
        EventKey eventKey = new EventKey(entityEventData.getString(CassandraEventRecorder.ENTITY_ID), entityEventData.getInt(CassandraEventRecorder.VERSION));
        String opId = entityEventData.getString(CassandraEventRecorder.OP_ID);
        String eventData = entityEventData.getString(CassandraEventRecorder.EVENT_DATA);
//            ObjectNode jsonNode = (ObjectNode) objectMapper.readTree(eventData);
/*            for (String indexedField : indexedFields) {
                if (entityEventData.getColumnDefinitions().contains(indexedField))
                    jsonNode.put(indexedField, entityEventData.getString(indexedField));
            }*/
        return new EntityEvent(eventKey, opId,
                entityEventData.getTimestamp(CassandraEventRecorder.OP_DATE),
                entityEventData.getString(CassandraEventRecorder.EVENT_TYPE),
                EventState.valueOf(entityEventData.getString(CassandraEventRecorder.STATUS)),
                entityEventData.getString(CassandraEventRecorder.AUDIT_INFO),
                eventData);
    }
 
开发者ID:kloiasoft,项目名称:eventapis,代码行数:17,代码来源:CassandraViewQuery.java

示例3: 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

示例4: 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

示例5: load

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
		public Data load(Data data, Row row) {
			data.id = row.getUUID(0);
			data.yr_mon = row.getInt(1);
			data.user = row.getString(2);
			data.action = row.getString(3);
			data.target = row.getString(4);
			data.subject = row.getString(5);
			data.memo = row.getString(6);
//			data.detail = row.getMap(6, String.class, String.class);
			data.reconstruct = row.getBytes(7);
			return data;
		}
 
开发者ID:att,项目名称:AAF,代码行数:14,代码来源:HistoryDAO.java

示例6: load

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
public Data load(Data data, Row row) {
    data.id = row.getString(0);
    data.type = row.getInt(1);    // NOTE: in datastax driver,  If the int value is NULL, 0 is returned!
    data.expires = row.getDate(2);
    data.other = row.getInt(3);
    data.ns = row.getString(4);     
    data.notes = row.getString(5);
    data.cred = row.getBytesUnsafe(6);            
    return data;
}
 
开发者ID:att,项目名称:AAF,代码行数:12,代码来源:CredDAO.java

示例7: load

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
public Data load(Data data, Row row) {
	// Int more efficient
	data.name = row.getString(0);
	data.type = row.getInt(1);
	data.description = row.getString(2);
	data.parent = row.getString(3);
	return data;
}
 
开发者ID:att,项目名称:AAF,代码行数:10,代码来源:NsDAO.java

示例8: load

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
public Data load(Data data, Row row) {
	// Int more efficient
	data.name = row.getString(0);
	data.seg = row.getInt(1);
	data.touched = row.getDate(2);
	return data;
}
 
开发者ID:att,项目名称:AAF,代码行数:9,代码来源:CacheInfoDAO.java

示例9: load

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
public Data load(Data data, Row row) {
    data.mechid = row.getString(0);
    data.machine = row.getString(1);
    data.type = row.getSet(2, String.class);
    data.sponsor = row.getString(3);
    data.ca = row.getString(4);
    data.dir = row.getString(5);
    data.appName = row.getString(6);
    data.os_user = row.getString(7);
    data.notify = row.getString(8);
    data.expires = row.getDate(9);
    data.renewDays = row.getInt(10);
    return data;
}
 
开发者ID:att,项目名称:AAF,代码行数:16,代码来源:ArtiDAO.java

示例10: testSimpleCreateAndLoadEntities

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Test
public void testSimpleCreateAndLoadEntities() throws Exception {
    Row row = statefulTestBean.query();
    String lastName = row.getString("lastname");
    assertEquals(lastName,"Smith");
    int age = row.getInt("age");
    assertEquals(age,36);
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:9,代码来源:CassandraArquillianTest.java

示例11: testAsyncQuery

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Test
public void testAsyncQuery() throws Exception {
    Row row = statefulTestBean.asyncQuery();
    String lastName = row.getString("lastname");
    assertEquals(lastName,"Smith");
    int age = row.getInt("age");
    assertEquals(age,36);
}
 
开发者ID:wildfly-swarm,项目名称:wildfly-swarm,代码行数:9,代码来源:CassandraArquillianTest.java

示例12: getInt

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private static Integer getInt(Row row, String column) {
    if (row.getColumnDefinitions().contains(column)) {
        return row.getInt(column);
    }
    return null;
}
 
开发者ID:xm-online,项目名称:xm-ms-timeline,代码行数:7,代码来源:TimelineMapper.java

示例13: create

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
public NS create(Row row) {
	return new NS(row.getString(0),row.getString(1), row.getString(2),row.getInt(3),row.getInt(4));
}
 
开发者ID:att,项目名称:AAF,代码行数:5,代码来源:NS.java

示例14: create

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
public Notification create(Row row) {
	return new Notification(row.getString(0), row.getInt(1), row.getDate(2),row.getInt(3));
}
 
开发者ID:att,项目名称:AAF,代码行数:5,代码来源:Notification.java

示例15: getBlock

import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
protected int getBlock(Row row) {
    return row.getInt(_blockIndex);
}
 
开发者ID:bazaarvoice,项目名称:emodb,代码行数:5,代码来源:CqlDeltaIterator.java


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