public static < K > ColumnParent getColumnParent ( ColumnFamily < ? , ? > columnFamily , ColumnPath < ? > path ) throws BadRequestException { ColumnParent cp = new ColumnParent ( ) ; cp . setColumn_family ( columnFamily . getName ( ) ) ; if ( path != null ) { Iterator < ByteBuffer > columns = path . iterator ( ) ; if ( columnFamily . getType ( ) == ColumnType . SUPER && columns . hasNext ( ) ) { cp . setSuper_column ( columns . next ( ) ) ; } } return cp ; }
Construct a Hector ColumnParent based on the information in the query and the type of column family being queried .