Packages

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
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
    @native() @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
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  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
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  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
    @native() @throws( ... )
  29. def withFallbackReads[K](altReads: Reads[K])(keyFormat: KeyFormat[K]): KeyFormat[K]

    Augment K's format with an additional fallback JsReads implementation.

    Augment K's format with an additional fallback JsReads implementation.

    K

    The key type.

    altReads

    An alternate JsValue to K Reads implementation.

    keyFormat

    The standard KeyFormat to augment.

    returns

    The augmented KeyFormat.

Inherited from PrimitiveFormats

Inherited from AnyRef

Inherited from Any

Ungrouped