com.netflix.astyanax.model
Class ColumnFamily<K,C>

java.lang.Object
  extended by com.netflix.astyanax.model.ColumnFamily<K,C>
Type Parameters:
K -
C -

public class ColumnFamily<K,C>
extends Object

Basic column family definition. The column family definition encapsulates the column family name as well as the type and serializers for the row keys and first level columns. Super column subcolumn name type and serializers are specified using a ColumnPath.

Author:
elandau

Constructor Summary
ColumnFamily(String columnFamilyName, Serializer<K> keySerializer, Serializer<C> columnSerializer)
           
ColumnFamily(String columnFamilyName, Serializer<K> keySerializer, Serializer<C> columnSerializer, ColumnType type)
          Deprecated. Super columns should be replaced with composite columns
 
Method Summary
 Serializer<C> getColumnSerializer()
          Serializer for first level column names.
 Serializer<K> getKeySerializer()
          Serializer used to generate row keys.
 String getName()
           
 ColumnType getType()
          Deprecated. Super columns should be replaced with composite columns
static
<K,C> ColumnFamily<K,C>
newColumnFamily(String columnFamilyName, Serializer<K> keySerializer, Serializer<C> columnSerializer)
           
 PreparedIndexExpression<K,C> newIndexClause()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColumnFamily

public ColumnFamily(String columnFamilyName,
                    Serializer<K> keySerializer,
                    Serializer<C> columnSerializer,
                    ColumnType type)
Deprecated. Super columns should be replaced with composite columns

Parameters:
columnFamilyName -
keySerializer -
columnSerializer -
type -

ColumnFamily

public ColumnFamily(String columnFamilyName,
                    Serializer<K> keySerializer,
                    Serializer<C> columnSerializer)
Method Detail

getName

public String getName()

getColumnSerializer

public Serializer<C> getColumnSerializer()
Serializer for first level column names. This serializer does not apply to sub column names.

Returns:

getKeySerializer

public Serializer<K> getKeySerializer()
Serializer used to generate row keys.

Returns:

getType

public ColumnType getType()
Deprecated. Super columns should be replaced with composite columns

Type of columns in this column family (Standard or Super)

Returns:

newIndexClause

public PreparedIndexExpression<K,C> newIndexClause()

newColumnFamily

public static <K,C> ColumnFamily<K,C> newColumnFamily(String columnFamilyName,
                                                      Serializer<K> keySerializer,
                                                      Serializer<C> columnSerializer)


Copyright © 2012. All Rights Reserved.