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

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

public class ColumnFamily<K,C>
extends java.lang.Object
implements java.lang.Comparable<ColumnFamily<K,C>>

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.


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

Constructor Detail

ColumnFamily

public ColumnFamily(java.lang.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(java.lang.String columnFamilyName,
                    Serializer<K> keySerializer,
                    Serializer<C> columnSerializer)

ColumnFamily

public ColumnFamily(java.lang.String columnFamilyName,
                    Serializer<K> keySerializer,
                    Serializer<C> columnSerializer,
                    Serializer<?> defaultValueSerializer)
Method Detail

getName

public java.lang.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:

getDefaultValueSerializer

public Serializer<?> getDefaultValueSerializer()

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(java.lang.String columnFamilyName,
                                                      Serializer<K> keySerializer,
                                                      Serializer<C> columnSerializer)

newColumnFamily

public static <K,C> ColumnFamily<K,C> newColumnFamily(java.lang.String columnFamilyName,
                                                      Serializer<K> keySerializer,
                                                      Serializer<C> columnSerializer,
                                                      Serializer<?> defaultSerializer)

compareTo

public int compareTo(ColumnFamily<K,C> other)
Specified by:
compareTo in interface java.lang.Comparable<ColumnFamily<K,C>>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object