Packages

package mapper

Provides machinery for mapping Cassandra tables to user defined Scala classes or tuples. The main class in this package is mapper.ColumnMapper responsible for matching Scala object's properties with Cassandra column names.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. mapper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait ColumnMapForReading extends Serializable

    A column map for reading objects from Cassandra.

    A column map for reading objects from Cassandra. Describes object's constructor and setters.

  2. trait ColumnMapForWriting extends Serializable

    A column map for saving objects to Cassandra.

    A column map for saving objects to Cassandra. Lists available getters.

  3. trait ColumnMapper[T] extends AnyRef

    Produces ColumnMapForReading or ColumnMapForWriting objects that map class T properties to columns in a given Cassandra table.

    Produces ColumnMapForReading or ColumnMapForWriting objects that map class T properties to columns in a given Cassandra table.

    You can associate a custom ColumnMapper object with any of your classes by providing an implicit ColumnMapper in the companion object of the mapped class:

    CREATE TABLE kv(key int primary key, value text);
    case class KeyValue(k: Int, v: String)
    
    object KeyValue {
      implicit val columnMapper =
        new DefaultColumnMapper[KeyValue](Map("k" -> "key", "v" -> "value"))
    }
  4. class DefaultColumnMapper[T] extends ColumnMapper[T]

    A ColumnMapper that assumes camel case naming convention for property accessors and constructor names and underscore naming convention for column names.

    A ColumnMapper that assumes camel case naming convention for property accessors and constructor names and underscore naming convention for column names.

    Example mapping:

    case class User(
      login: String,         // mapped to "login" column
      emailAddress: String   // mapped to "email_address" column
      emailAddress2: String  // mapped to "email_address_2" column
    )

    Additionally, it is possible to name columns exactly the same as property names (case-sensitive):

    case class TaxPayer(
      TIN: String            // mapped to "TIN" column
    )
  5. class GettableDataToMappedTypeConverter[T] extends TypeConverter[T]

    Converts a GettableData object representing a table row or a UDT value to a tuple or a case class object using the given ColumnMapper.

  6. class JavaBeanColumnMapper[T] extends ReflectionColumnMapper[T]
  7. trait LowPriorityColumnMapper extends AnyRef

    Provides implicit ColumnMapper used for mapping all non-tuple classes.

  8. class PropertyExtractor[T] extends Serializable

    Extracts values from fields of an object.

  9. abstract class ReflectionColumnMapper[T] extends ColumnMapper[T]
  10. case class SimpleColumnMapForReading(constructor: Seq[ColumnRef], setters: Map[String, ColumnRef], allowsNull: Boolean = false) extends ColumnMapForReading with Product with Serializable
  11. case class SimpleColumnMapForWriting(getters: Map[String, ColumnRef]) extends ColumnMapForWriting with Product with Serializable
  12. class TupleColumnMapper[T] extends ColumnMapper[T]

Value Members

  1. object ColumnMapper extends LowPriorityColumnMapper

    Provides implicit ColumnMapper objects used for mapping tuples.

  2. object ColumnMapperConvention
  3. object DefaultColumnMapper
  4. object JavaBeanColumnMapper
  5. object MappedToGettableDataConverter extends Logging
  6. object PropertyExtractor extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped