org.coursera.naptime.model

KeyFormat

Related Docs: trait KeyFormat | package model

object KeyFormat extends PrimitiveFormats

Linear Supertypes
PrimitiveFormats, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. KeyFormat
  2. PrimitiveFormats
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. val ID_FIELD: String

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def caseClassFormat[K, L](apply: (L) ⇒ K, unapply: (K) ⇒ Option[L])(implicit delegateFormat: KeyFormat[L]): KeyFormat[K]

    Conveniently construct a format for a case class type.

    Conveniently construct a format for a case class type.

    For example:

    case class StorageKey(distributionKey: String, sortKey: String)
    
    object StorageKey {
      implicit val keyFormat: KeyFormat[StorageKey] =
        KeyFormat.caseClass((apply _).tupled, unapply)
    }
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. def idAsPrimitive[K, P](apply: (P) ⇒ K, unapply: (K) ⇒ Option[P])(implicit primitiveFormat: KeyFormat[P]): KeyFormat[K]

    Defines a format that only adds the "id" field to response objects.

    Defines a format that only adds the "id" field to response objects. The "id" field will contain the natural JSON representation for primitive type P. (JSON number for Int, etc.)

  14. def idAsStringOnly[K](implicit stringKeyFormatT: StringKeyFormat[K]): KeyFormat[K]

    Defines a KeyFormat that only adds the "id" field to response objects.

    Defines a KeyFormat that only adds the "id" field to response objects. The "id" field will contain a string representation of the id, as specified by stringKeyFormatT.

    Note: If K contains a single, primitive type field (like case class A(i: Int)), you may want to use idAsPrimitive instead. With idAsStringOnly, the output object will be {"id": "3"}, whereas with idAsPrimitive, it'll be {"id": 3}.

    Note: If you want to add additional fields to JSON response objects (for example, if K is a composite key), use idAsStringWithFields instead.

  15. def idAsStringWithFields[K](idWrites: OWrites[K])(implicit stringKeyFormat: StringKeyFormat[K]): KeyFormat[K]

    Defines a KeyFormat that adds the "id" field to response objects as well as others returned by idWrites.

    Defines a KeyFormat that adds the "id" field to response objects as well as others returned by idWrites. Use this for composite id types where clients should have access to parts of the id in addition to the whole opaque string.

    See idAsStringOnly.

  16. implicit val intKeyFormat: KeyFormat[Int]

    Definition Classes
    PrimitiveFormats
  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. implicit val longKeyFormat: KeyFormat[Long]

    Definition Classes
    PrimitiveFormats
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  22. implicit val stringKeyFormat: KeyFormat[String]

    Definition Classes
    PrimitiveFormats
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  24. def toString(): String

    Definition Classes
    AnyRef → Any
  25. implicit val uuidKeyFormat: KeyFormat[UUID]

    Definition Classes
    PrimitiveFormats
  26. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from PrimitiveFormats

Inherited from AnyRef

Inherited from Any

Ungrouped