OKこれがうまくいったことです:
ResultSet res = pstmt.executeQuery();
CassandraResultSet crs = res.unwrap(CassandraResultSet.class);
crs.next() ;
ResultSetMetaData rsmd = crs.getMetaData();
cols = rsmd.getColumnCount();
for(int i=1 ; i <= cols ; i++) {
String colNm = rsmd.getColumnName(i);
String colVal = null;
String colType = rsmd.getColumnTypeName(i);
if (colType.equals("JdbcLong")) {
colVal = "" + crs.getLong(i);
} else if (colType.equals("JdbcInteger")) {
colVal = "" + crs.getInt(i);
} else {
colVal = crs.getString(i);
キー、列名、および値を適切に表示するには、次のように列ファミリーを定義する必要があることに注意してください。
NOTE: you wont be able to understand your column names and values unless
you set the Cassandra Type hints via cassandra-cli. To have a schema like below
where all un-referenced column types are UTF8Type:
CREATE COLUMN FAMILY MyColFam WITH key_validation_class=UTF8Type
AND default_validation_class=UTF8Type AND comparator=UTF8Type
AND column_metadata = [
{column_name: an_integer_column, validation_class: IntegerType}
{column_name: a_long_column, validation_class: LongType}
];