SeqMapping

com.greenfossil.data.mapping.SeqMapping
case class SeqMapping[A](tpe: String, typedValueOpt: Option[Seq[A]], constraints: Seq[Constraint[Seq[A]]], errors: Seq[MappingError], elemField: Mapping[A], minSize: Int, boundFields: Seq[Mapping[A]]) extends Mapping[Seq[A]]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Mapping[Seq[A]]
trait ConstraintVerifier[Seq[A]]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def apply[B](key: String): Mapping[B]

Alias for method field()

Alias for method field()

Attributes

Definition Classes
def apply[B](index: Int): Mapping[B]
override def bind(prefix: String, jsValue: JsValue): Mapping[Seq[A]]

Attributes

Definition Classes
override def bindName(bindName: String): Mapping[Seq[A]]

Attributes

Definition Classes
override def bindUsingPrefix(prefix: String, data: Map[String, Seq[String]]): Mapping[Seq[A]]

Attributes

Definition Classes
override def bindingValueOpt: Option[String]

Attributes

Definition Classes
def boundFieldsWithPadding(minReturnSize: Int)(mappingConversionFn: [A] => (x$1: Mapping[A], x$2: Int) => Mapping[A]): Seq[Mapping[A]]

Value parameters

mappingConversionFn
  • use assign the mapping.name based on the index number
minReturnSize

size of for the return values and will be padded with elemMapping for the missing values

Attributes

Returns
  • at least the minReturnSize size of the Seq of Mapping
def boundValueIndexes: Seq[Int]

Attributes

Returns
  • number of value bound to Mapping For FieldMapping - min 0, max 1 ProductMapping - min 0, max 1 SeqMapping - min 0, max N - number of elements in the Seq TransformMapping - depends on the underlying Mapping[A]
override def boundValueOf(index: Int): Option[_]

Value parameters

index
  • the index for the bound value

Attributes

Returns

None or Option[A]

Definition Classes
override def discardingErrors: Mapping[Seq[A]]

Attributes

Definition Classes
override def fillAndVerify(seqValue: Seq[A])(toVerify: Boolean): Mapping[Seq[A]]

Attributes

Definition Classes
override def filterErrors(predicate: MappingError => Boolean): Mapping[Seq[A]]

Attributes

Definition Classes
override def isRequired: Boolean

Attributes

Definition Classes
override def name(name: String): Mapping[Seq[A]]

Attributes

Definition Classes
override def noOfFields: Int

Attributes

Returns
  • the number of Mapping fields For FieldMapping/SeqMapping = 1, ProductMapping = N fields, TransformMapping - depends on the underlying Mapping[A]
Definition Classes
override def removeConstraints(nameRegex: String): Mapping[Seq[A]]

Attributes

Definition Classes
override def setBindingPredicate(predicate: Option[String] => Boolean): Mapping[Seq[A]]

Attributes

Definition Classes
override def setDefaultValue(values: Seq[A]): Mapping[Seq[A]]

Attributes

Definition Classes
override def setUsedChildNameOpt(name: String): Mapping[Seq[A]]

Attributes

Definition Classes
override def usedChildNameOpt: Option[String]

Attributes

Definition Classes
override def verifying(newConstraints: Constraint[Seq[A]]*): Mapping[Seq[A]]

Attributes

Definition Classes
override def withError(error: MappingError): Mapping[Seq[A]]

Adds an error to this form

Adds an error to this form

Value parameters

error

FormError

Attributes

Definition Classes

Inherited methods

def applyConstraints[B](constraints: Seq[Constraint[B]], value: B): Seq[MappingError]

Attributes

Inherited from:
ConstraintVerifier
def applyConstraints(value: Seq[A]): Seq[MappingError]

Attributes

Inherited from:
ConstraintVerifier
def bind(jsValue: JsValue): Mapping[A]

Attributes

Inherited from:
Mapping
def bind(data: Map[String, Seq[String]]): Mapping[A]

Attributes

Inherited from:
Mapping
def bind(data: (String, String)*): Mapping[A]

Attributes

Inherited from:
Mapping
def bindingName: String

Attributes

Inherited from:
Mapping

Attributes

Inherited from:
Mapping
def error(key: String): Option[MappingError]

Retrieve the first error for this key.

Retrieve the first error for this key.

Value parameters

key

field name.

Attributes

Inherited from:
Mapping
def errors(key: String): Seq[MappingError]

Retrieve all errors for this key.

Retrieve all errors for this key.

Value parameters

key

field name.

Attributes

Inherited from:
Mapping
def fill(newValue: Seq[A]): Mapping[A]

Attributes

Inherited from:
Mapping
def fold[R](onFail: Mapping[Seq[A]] => R, onSuccess: Seq[A] => R): R

Attributes

Inherited from:
Mapping

Retrieves all global errors, i.e. errors without a key.

Retrieves all global errors, i.e. errors without a key.

Attributes

Returns

all global errors

Inherited from:
Mapping
def hasAnyConstraints(names: String*): Boolean

Attributes

Inherited from:
ConstraintVerifier
def hasErrors: Boolean

Returns true if there is an error related to this form.

Returns true if there is an error related to this form.

Attributes

Inherited from:
Mapping
def hasGlobalErrors: Boolean

Attributes

Inherited from:
Mapping
def isOptional: Boolean

Attributes

Inherited from:
Mapping
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def setErrors(errors: Seq[MappingError]): Mapping[A]

Attributes

Inherited from:
Mapping
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Mapping -> Any
Inherited from:
Mapping
inline def transform[B](forwardFn: Seq[A] => B, inverseFn: B => Seq[A], mappingErrorsFilter: (Seq[MappingError], Seq[MappingError]) => Seq[MappingError]): TransformMapping[A, B]

Attributes

Inherited from:
Mapping
inline def transform[B](inline forwardFn: Seq[A] => B, inline inverseFn: B => Seq[A]): TransformMapping[A, B]

Attributes

Inherited from:
Mapping
def unwrap: Mapping[_]

Attributes

Inherited from:
Mapping
def verifying(error: String, successConstraintPredicate: Seq[A] => Boolean): Mapping[A]

Value parameters

successConstraintPredicate
  • true implies no error, false implies error

Attributes

Inherited from:
ConstraintVerifier
def verifying(constraint: Seq[A] => Boolean): Mapping[A]

Attributes

Inherited from:
ConstraintVerifier
def withError(key: String, message: String, args: Any*): Mapping[A]

Adds an error to this form

Adds an error to this form

Value parameters

args

Error message arguments

key

Error key

message

Error message

Attributes

Inherited from:
Mapping
def withGlobalError(message: String, args: String*): Mapping[A]

Adds a global error to this form

Adds a global error to this form

Value parameters

args

Error message arguments

message

Error message

Attributes

Inherited from:
Mapping

Concrete fields

override val bindNameOpt: Option[String]
override val name: String