ColumnFamilyTemplate extends AbstractColumnFamilyTemplate<K, N> { public ColumnFamilyResult<K, N> queryColumns(K key) { return doExecuteSlice(key, activeSlicePredicate); } ColumnFamilyTemplate(Keyspace keyspace, String columnFamily,
      Serializer<K> keySerializer, Serializer<N> topSerializer); ColumnFamilyTemplate<K, N> setBatched(boolean batched); ColumnFamilyUpdater<K, N> createUpdater(); ColumnFamilyUpdater<K, N> createUpdater(K key); ColumnFamilyUpdater<K, N> createUpdater(K key, Mutator<K> mutator); void update(ColumnFamilyUpdater<K, N> updater); boolean isColumnsExist(K key); @SuppressWarnings("unchecked") int countColumns(K key); int countColumns(K key, N start, N end, int max); ColumnFamilyResult<K, N> queryColumns(K key); ColumnFamilyResult<K, N> queryColumns(Iterable<K> keys); T queryColumns(K key, ColumnFamilyRowMapper<K, N, T> mapper); T queryColumns(K key, HSlicePredicate<N> predicate,
      ColumnFamilyRowMapper<K, N, T> mapper); T queryColumns(K key, List<N> columns,
      ColumnFamilyRowMapper<K, N, T> mapper); ColumnFamilyResult<K, N> queryColumns(K key, List<N> columns); ColumnFamilyResult<K, N> queryColumns(Iterable<K> keys, List<N> columns); ColumnFamilyResult<K, N> queryColumns(K key, HSlicePredicate<N> predicate); MappedColumnFamilyResult<K,N,V> queryColumns(Iterable<K> keys,
      ColumnFamilyRowMapper<K, N, V> mapper); MappedColumnFamilyResult<K,N,V> queryColumns(Iterable<K> keys,
      HSlicePredicate<N> predicate, ColumnFamilyRowMapper<K, N, V> mapper); MappedColumnFamilyResult<K,N,V> queryColumns(Iterable<K> keys,
      List<N> columns, ColumnFamilyRowMapper<K, N, V> mapper); ColumnFamilyResult<K,N> queryColumns(IndexedSlicesPredicate<K,N,V> predicate); ColumnFamilyResult<K,N> queryColumns(IndexedSlicesPredicate<K,N,V> predicate, HSlicePredicate<N> slicePredicate); ColumnFamilyResult<K,N> queryColumns(IndexedSlicesPredicate<K,N,V> predicate, List<N> columns); MappedColumnFamilyResult<K,N,R> queryColumns(IndexedSlicesPredicate<K,N,V> predicate, ColumnFamilyRowMapper<K, N, R> mapper); MappedColumnFamilyResult<K,N,R> queryColumns(IndexedSlicesPredicate<K,N,V> predicate, HSlicePredicate<N> slicePredicate, ColumnFamilyRowMapper<K, N, R> mapper); MappedColumnFamilyResult<K,N,R> queryColumns(IndexedSlicesPredicate<K,N,V> predicate, List<N> columns, ColumnFamilyRowMapper<K, N, R> mapper); @SuppressWarnings("unchecked") HColumn<N, V> querySingleColumn(K key, N columnName,
      Class<V> valueClass); HColumn<N, V> querySingleColumn(K key, N columnName,
      Serializer<V> valueSerializer);  }
@Test public void testHasNoResults() { ColumnFamilyTemplate<String, String> template = new ThriftColumnFamilyTemplate<String, String>(keyspace, "Standard1", se, se); assertFalse(template.queryColumns("noresults").hasResults()); assertFalse(template.queryColumns("noresults").hasNext()); assertEquals("noresults",template.queryColumns("noresults").getKey()); }
@Test public void testGetKeyTwiceCall() { ColumnFamilyTemplate<String, String> template = new ThriftColumnFamilyTemplate<String, String>(keyspace, "Standard1", se, se); ColumnFamilyResult<String, String> results = template.queryColumns("noresults"); assertEquals("noresults",results.getKey()); assertEquals("noresults",results.getKey()); assertEquals("noresults",results.getKey()); }