SuperCfTemplate extends AbstractColumnFamilyTemplate<K, SN> { public <V> HColumn<N, V> querySingleSubColumn(K key, SN columnName, N subColumnName, Serializer<V> valueSerializer) { SuperCfResult<K,SN,N> result = doExecuteSlice(key, columnName, activeSlicePredicate); if (result == null) { return null; } HColumn<N,ByteBuffer> origCol = result.getColumn(subColumnName); if ( columnName == null || origCol == null ) { return null; } return new HColumnImpl<N, V>(subColumnName, valueSerializer.fromByteBuffer(origCol.getValue()), origCol.getClock(), subSerializer, valueSerializer); } SuperCfTemplate(Keyspace keyspace, String columnFamily,
      Serializer<K> keySerializer, Serializer<SN> topSerializer,
      Serializer<N> subSerializer); Serializer<N> getSubSerializer(); boolean isColumnsExist(K key); boolean isSubColumnsExist(K key, SN superColumnName); @SuppressWarnings("unchecked") int countColumns(K key); @SuppressWarnings("unchecked") int countSubColumns(K key, SN superColumnName); int countColumns(K key, SN start, SN end, int max); int countSubColumns(K key, SN superColumnName, N start,
      N end, int max); HColumn<N, V> querySingleSubColumn(K key,
      SN columnName, N subColumnName, Serializer<V> valueSerializer); SuperCfResult<K, SN, N> querySuperColumns(K key, HSlicePredicate<SN> predicate); SuperCfResult<K, SN, N> querySuperColumns(K key, List<SN> sColumnNames); SuperCfResult<K, SN, N> querySuperColumns(List<K> keys, List<SN> sColumnNames); SuperCfResult<K, SN, N> querySuperColumns(List<K> keys); T querySuperColumns(K key, List<SN> sColumnNames,
      SuperCfRowMapper<K, SN, N, T> mapper); SuperCfResult<K, SN, N> querySuperColumns(K key); SuperCfResult<K, SN, N> querySuperColumn(K key, SN sColumnName); SuperCfUpdater<K, SN, N> createUpdater(K key, SN sColumnName); SuperCfUpdater<K, SN, N> createUpdater(K key); void update(SuperCfUpdater<K, SN, N> updater); @Override void deleteColumn(K key, SN sColumnName); @Override void deleteRow(K key);  }
@Test public void testQuerySingleSubColumn() { SuperCfTemplate<String, String, String> sTemplate = new ThriftSuperCfTemplate<String, String, String>(keyspace, "Super1", se, se, se); SuperCfUpdater<String,String,String> sUpdater = sTemplate.createUpdater("skey3","super1"); sUpdater.setString("sub1_col_1", "sub1_val_1"); sTemplate.update(sUpdater); HColumn<String,String> myCol = sTemplate.querySingleSubColumn("skey3", "super1", "sub1_col_1", se); assertEquals("sub1_val_1", myCol.getValue()); }