本文整理汇总了Java中com.datastax.driver.core.Row.getSet方法的典型用法代码示例。如果您正苦于以下问题:Java Row.getSet方法的具体用法?Java Row.getSet怎么用?Java Row.getSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.datastax.driver.core.Row
的用法示例。
在下文中一共展示了Row.getSet方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: load
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
public Data load(Data data, Row row) {
// Int more efficient
data.ns = row.getString(0);
data.name = row.getString(1);
data.perms = row.getSet(2,String.class);
data.description = row.getString(3);
return data;
}
示例2: load
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
@Override
public Data load(Data data, Row row) {
// Int more efficient Match "fields" string
data.ns = row.getString(0);
data.type = row.getString(1);
data.instance = row.getString(2);
data.action = row.getString(3);
data.roles = row.getSet(4,String.class);
data.description = row.getString(5);
return data;
}
示例3: 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;
}
示例4: load
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private static void load(Trans trans, Session session, String query) {
//
trans.info().log( "query: " + query );
TimeTaken tt = trans.start("Read Perms", Env.REMOTE);
ResultSet results;
try {
Statement stmt = new SimpleStatement( query );
results = session.execute(stmt);
} finally {
tt.done();
}
try {
Iterator<Row> iter = results.iterator();
Row row;
tt = trans.start("Load Perms", Env.SUB);
try {
while(iter.hasNext()) {
row = iter.next();
Perm pk = new Perm(row.getString(0),row.getString(1),row.getString(2),row.getString(3), row.getString(4), row.getSet(5,String.class));
keys.put(pk.encode(), pk);
data.put(pk,pk.roles);
}
} finally {
tt.done();
}
} finally {
trans.info().log("Found",data.size(),"perms");
}
}
示例5: load
import com.datastax.driver.core.Row; //导入方法依赖的package包/类
private static void load(Trans trans, Session session, String query) {
trans.info().log( "query: " + query );
TimeTaken tt = trans.start("Read Roles", Env.REMOTE);
ResultSet results;
try {
Statement stmt = new SimpleStatement( query );
results = session.execute(stmt);
} finally {
tt.done();
}
try {
Iterator<Row> iter = results.iterator();
Row row;
tt = trans.start("Load Roles", Env.SUB);
try {
while(iter.hasNext()) {
row = iter.next();
Role rk =new Role(row.getString(0),row.getString(1), row.getString(2),row.getSet(3,String.class));
keys.put(rk.encode(), rk);
data.put(rk,rk.perms);
}
} finally {
tt.done();
}
} finally {
trans.info().log("Found",data.size(),"roles");
}
}