com.spotright.polidoro.model

ColumnPath

case class ColumnPath[K, N](rowpath: RowPath[K], colname: N)(implicit evidence$1: Manifest[K], evidence$2: Manifest[N]) extends ColumnPathish[K, N] with Product with Serializable

Cassandra Column Path

A ColumnPath represents the full path to a given column. Any ColumnPath (or substructure) can use get to optionally fetch the column (although recent changes mean that to get a Composite Column you need to use RowPath to do so). Additionally execute and executeAsync expose the Astyanax operations available on a com.netflix.astyanax.ColumnMutation.

Operations

The get operation returns the column if it exists. Use getWith to name the serializer for composite columns.

val maybeCol = (cfUsers \ username \ ("name").get
val needsWork = maybeCol.map{_.getValue}.getOrElse("-unknown-")

// Short-cut for get with a default
val needsWork = (cfUsers \ username \ ("name").getOrElse("-unknown-")

The execute and executeAsync operations allow for modifying the Column found at this ColumnPath.

A ColumnPath can be used to construct a Column.

val col = colpath \ 7
Linear Supertypes
Serializable, Serializable, Product, Equals, modelish.ColumnPathish[K, N], modelish.RowPathish[K], modelish.ColFamish, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ColumnPath
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. ColumnPathish
  7. RowPathish
  8. ColFamish
  9. AnyRef
  10. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ColumnPath(rowpath: RowPath[K], colname: N)(implicit arg0: Manifest[K], arg1: Manifest[N])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def \[V](colval: V, ttl: Int)(implicit arg0: Manifest[V]): Column[K, N, V]

  7. def \[V](colval: V)(implicit arg0: Manifest[V]): Column[K, N, V]

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. val cfname: String

    Definition Classes
    ColumnPathColFamish
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. val colname: N

    Definition Classes
    ColumnPathColumnPathish
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def execute(body: (ColumnMutation) ⇒ Execution[Void]): Either[ConnectionException, OperationResult[Void]]

    Executes a com.netflix.astyanax.ColumnMutation based on this ColumnPath.

    Executes a com.netflix.astyanax.ColumnMutation based on this ColumnPath.

    You should pass in a function which will take the ColumnMutation to an Execution[Void]. E.g.,

    // `null` here is the ttl
    (cfUsers \ username \ "age").execute {_.putValue(3, null)}

    The Execution[Void] will then be run.

  14. def executeAsync(body: (ColumnMutation) ⇒ Execution[Void]): Either[ConnectionException, Future[OperationResult[Void]]]

    Executes a com.netflix.astyanax.ColumnMutation based on this ColumnPath asynchronously.

    Executes a com.netflix.astyanax.ColumnMutation based on this ColumnPath asynchronously.

    You should pass in a function which will take the ColumnMutation to an Execution[Void]. E.g.,

    // `null` here is the ttl
    (cfUsers \ username \ "age").executeAsync {_.putValue(3, null)}

    The Execution[Void] will then be run asynchronously resulting in a java.util.concurrent.Future.

  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def get: Option[netflix.astyanax.model.Column[N]]

    Optionally returns a com.netflix.astyanax.model.Column if it exists at this ColumnPath.

  17. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  18. def getOrElse[V](default: ⇒ V)(implicit arg0: Manifest[V]): V

    Return the value at this ColumnPath or a default if no column exists in Cassandra.

    Return the value at this ColumnPath or a default if no column exists in Cassandra.

    The column could exist and have an empty value. If you need to check for that use

    // Assuming the value is a String.
    colPath.get.flatMap{c => if (c.hasValue) Some(c.getStringValue) else None}.getOrElse(default)
  19. def getWith[M](acsM: AnnotatedCompositeSerializer[M]): Option[netflix.astyanax.model.Column[M]]

    Optionally returns a com.netflix.astyanax.model.Column if it exists at this ColumnPath.

    Optionally returns a com.netflix.astyanax.model.Column if it exists at this ColumnPath.

    Note that the colname and serializer type products must agree. E.g., both (String, String) or both (String, Int, String).

  20. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  21. val keyspace: Keyspace

    Definition Classes
    ColumnPathColFamish
  22. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. val rowkey: K

    Definition Classes
    ColumnPathRowPathish
  26. val rowpath: RowPath[K]

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  29. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  30. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from modelish.ColumnPathish[K, N]

Inherited from modelish.RowPathish[K]

Inherited from modelish.ColFamish

Inherited from AnyRef

Inherited from Any

Ungrouped