Packages

  • package root
    Definition Classes
    root
  • package play

    Play framework.

    Play framework.

    Play

    http://www.playframework.com

    Definition Classes
    root
  • package api

    Contains the public API for Scala developers.

    Contains the public API for Scala developers.

    Read configuration
    val poolSize = configuration.getInt("engine.pool.size")
    Use the logger
    Logger.info("Hello!")
    Define a Plugin
    class MyPlugin(app: Application) extends Plugin
    Create adhoc applications (for testing)
    val application = Application(new File("."), this.getClass.getClassloader, None, Play.Mode.DEV)
    Definition Classes
    play
  • package data

    Contains data manipulation helpers (typically HTTP form handling)

    Contains data manipulation helpers (typically HTTP form handling)

    import play.api.data._
    import play.api.data.Forms._
    
    val taskForm = Form(
      tuple(
        "name" -> text(minLength = 3),
        "dueDate" -> date("yyyy-MM-dd"),
        "done" -> boolean
      )
    )
    Definition Classes
    api
  • package format

    Contains the Format API used by Form.

    Contains the Format API used by Form.

    For example, to define a custom formatter:

    val signedIntFormat = new Formatter[Int] {
    
      def bind(key: String, data: Map[String, String]) = {
        stringFormat.bind(key, data).right.flatMap { value =>
          scala.util.control.Exception.allCatch[Int]
            .either(java.lang.Integer.parseInt(value))
            .left.map(e => Seq(FormError(key, "error.signedNumber", Nil)))
        }
      }
    
      def unbind(key: String, value: Long) = Map(
        key -> ((if (value<0) "-" else "+") + value)
      )
    }
    Definition Classes
    data
  • Formats
  • Formatter
  • JodaFormats

object Formats

This object defines several default formatters.

Source
Format.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Formats
  2. AnyRef
  3. 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def bigDecimalFormat(precision: Option[(Int, Int)]): Formatter[BigDecimal]

    Default formatter for the BigDecimal type.

  6. implicit val bigDecimalFormat: Formatter[BigDecimal]

    Default formatter for the BigDecimal type with no precision

  7. implicit def booleanFormat: Formatter[Boolean]

    Default formatter for the Boolean type.

  8. implicit def byteFormat: Formatter[Byte]

    Default formatter for the Byte type.

  9. implicit def charFormat: Formatter[Char]

    Default formatter for the Char type.

  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  11. def dateFormat(pattern: String, timeZone: TimeZone = TimeZone.getDefault): Formatter[Date]

    Formatter for the java.util.Date type.

    Formatter for the java.util.Date type.

    pattern

    a date pattern, as specified in java.time.format.DateTimeFormatter.

    timeZone

    the java.util.TimeZone to use for parsing and formatting

  12. implicit val dateFormat: Formatter[Date]

    Default formatter for the java.util.Date type with pattern yyyy-MM-dd.

  13. implicit def doubleFormat: Formatter[Double]

    Default formatter for the Double type.

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. implicit def floatFormat: Formatter[Float]

    Default formatter for the Float type.

  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def ignoredFormat[A](value: A): Formatter[A]

    Formatter for ignored values.

    Formatter for ignored values.

    value

    As we ignore this parameter in binding/unbinding we have to provide a default value.

  21. implicit def intFormat: Formatter[Int]

    Default formatter for the Int type.

  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def localDateFormat(pattern: String): Formatter[LocalDate]

    Formatter for the java.time.LocalDate type.

    Formatter for the java.time.LocalDate type.

    pattern

    a date pattern as specified in java.time.format.DateTimeFormatter.

  24. implicit val localDateFormat: Formatter[LocalDate]

    Default formatter for java.time.LocalDate type with pattern yyyy-MM-dd.

  25. def localDateTimeFormat(pattern: String, zoneId: ZoneId = java.time.ZoneId.systemDefault()): Formatter[LocalDateTime]

    Formatter for the java.time.LocalDateTime type.

    Formatter for the java.time.LocalDateTime type.

    pattern

    a date pattern as specified in java.time.format.DateTimeFormatter.

    zoneId

    the java.time.ZoneId to use for parsing and formatting

  26. implicit val localDateTimeFormat: Formatter[LocalDateTime]

    Default formatter for java.time.LocalDateTime type with pattern yyyy-MM-dd.

  27. def localTimeFormat(pattern: String): Formatter[LocalTime]

    Formatter for the java.time.LocalTime type.

    Formatter for the java.time.LocalTime type.

    pattern

    a date pattern as specified in java.time.format.DateTimeFormatter.

  28. implicit val localTimeFormat: Formatter[LocalTime]

    Default formatter for java.time.LocalTime type with pattern HH:mm:ss.

  29. implicit def longFormat: Formatter[Long]

    Default formatter for the Long type.

  30. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  33. def parsing[T](parse: (String) ⇒ T, errMsg: String, errArgs: Seq[Any])(key: String, data: Map[String, String]): Either[Seq[FormError], T]

    Helper for formatters binders

    Helper for formatters binders

    parse

    Function parsing a String value into a T value, throwing an exception in case of failure

    errArgs

    Error to set in case of parsing failure

    key

    Key name of the field to parse

    data

    Field data

  34. implicit def shortFormat: Formatter[Short]

    Default formatter for the Short type.

  35. def sqlDateFormat(pattern: String): Formatter[Date]

    Formatter for the java.sql.Date type.

    Formatter for the java.sql.Date type.

    pattern

    a date pattern as specified in java.time.DateTimeFormatter.

  36. implicit val sqlDateFormat: Formatter[Date]

    Default formatter for java.sql.Date type with pattern yyyy-MM-dd.

  37. def sqlTimestampFormat(pattern: String, timeZone: TimeZone = TimeZone.getDefault): Formatter[Timestamp]

    Formatter for the java.sql.Timestamp type.

    Formatter for the java.sql.Timestamp type.

    pattern

    a date pattern as specified in java.time.DateTimeFormatter.

    timeZone

    the java.util.TimeZone to use for parsing and formatting

  38. implicit val sqlTimestampFormat: Formatter[Timestamp]

    Default formatter for java.sql.Timestamp type with pattern yyyy-MM-dd HH:mm:ss.

  39. implicit def stringFormat: Formatter[String]

    Default formatter for the String type.

  40. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. implicit def uuidFormat: Formatter[UUID]

    Default formatter for the java.util.UUID type.

  43. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped