Trait/Object

io.udash.properties.model

ModelProperty

Related Docs: object ModelProperty | package model

Permalink

trait ModelProperty[A] extends AbstractReadableModelProperty[A] with AbstractProperty[A]

Property based on trait representing data model.

Linear Supertypes
AbstractProperty[A], Property[A], AbstractReadableModelProperty[A], ModelPropertyMacroApi[A], ReadableModelProperty[A], AbstractReadableProperty[A], ReadableProperty[A], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ModelProperty
  2. AbstractProperty
  3. Property
  4. AbstractReadableModelProperty
  5. ModelPropertyMacroApi
  6. ReadableModelProperty
  7. AbstractReadableProperty
  8. ReadableProperty
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def get: A

    Permalink

    returns

    Current property value.

    Definition Classes
    ReadableProperty
  2. abstract def getSubModel[T](getter: (A) ⇒ T, key: String): ReadableModelProperty[T]

    Permalink
    Definition Classes
    ModelPropertyMacroApi
  3. abstract def getSubProperty[T](getter: (A) ⇒ T, key: String): ReadableProperty[T]

    Permalink
    Definition Classes
    ModelPropertyMacroApi
  4. abstract def getSubSeq[T](getter: (A) ⇒ Seq[T], key: String): ReadableSeqProperty[T, ReadableProperty[T]]

    Permalink
    Definition Classes
    ModelPropertyMacroApi
  5. abstract val id: PropertyId

    Permalink

    Unique property ID.

    Unique property ID.

    Definition Classes
    ReadableProperty
  6. abstract def parent: ReadableProperty[_]

    Permalink

    Parent property.

    Parent property. null if this property has no parent.

    Attributes
    protected[io.udash.properties]
    Definition Classes
    ReadableProperty
  7. abstract def set(t: A, force: Boolean = false): Unit

    Permalink

    Changes current property value.

    Changes current property value. Fires value change listeners.

    t

    Should not be null!

    force

    If true, the value change listeners will be fired even if value didn't change.

    Definition Classes
    Property
  8. abstract def setInitValue(t: A): Unit

    Permalink

    Changes current property value.

    Changes current property value. Does not fire value change listeners.

    Definition Classes
    Property
  9. abstract def touch(): Unit

    Permalink

    Fires value change listeners with current value and clears validation result.

    Fires value change listeners with current value and clears validation result.

    Definition Classes
    Property

Concrete Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addValidator(f: (A) ⇒ ValidationResult): Registration

    Permalink

    Adds new validator and clears current validation result.

    Adds new validator and clears current validation result. It does not fire validation process.

    Definition Classes
    AbstractProperty → Property
  5. def addValidator(v: Validator[A]): Registration

    Permalink

    Adds new validator and clears current validation result.

    Adds new validator and clears current validation result. It does not fire validation process.

    Definition Classes
    AbstractProperty → Property
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clearListeners(): Unit

    Permalink

    Removes all listeners from property.

    Removes all listeners from property.

    Definition Classes
    AbstractProperty → Property
  8. def clearValidators(): Unit

    Permalink

    Removes all validators from property and clears current validation result.

    Removes all validators from property and clears current validation result. It does not fire validation process.

    Definition Classes
    AbstractProperty → Property
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def combine[B, O](property: ReadableProperty[B], combinedParent: ReadableProperty[_] = null)(combiner: (A, B) ⇒ O)(implicit arg0: PropertyCreator[O]): ReadableProperty[O]

    Permalink

    Combines two properties into a new one.

    Combines two properties into a new one. Created property will be updated after any change in the origin ones.

    B

    Type of elements in provided property.

    O

    Output property elements type.

    property

    Property[B] to combine with this.

    combinedParent

    Parent of combined property, null by default.

    combiner

    Method combining values A and B into O.

    returns

    Property[O] updated on any change in this or property.

    Definition Classes
    ReadableProperty
  11. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def fireValueListeners(): Unit

    Permalink

    Fires value listeners.

    Fires value listeners.

    Attributes
    protected[io.udash.properties]
    Definition Classes
    AbstractReadableProperty → ReadableProperty
  15. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def isValid: Future[ValidationResult]

    Permalink

    ModelProperty is valid if all validators return io.udash.properties.Valid and all subproperties are valid.

    ModelProperty is valid if all validators return io.udash.properties.Valid and all subproperties are valid.

    returns

    Validation result as Future, which will be completed on the validation process ending. It can fire validation process if needed.

    Definition Classes
    AbstractReadableModelProperty → AbstractReadableProperty → ReadableProperty
  19. def listen(valueListener: (A) ⇒ Any, initUpdate: Boolean = false): Registration

    Permalink

    Registers listener which will be called on value change.

    Registers listener which will be called on value change.

    initUpdate

    If true, listener will be instantly triggered with current value of property.

    Definition Classes
    AbstractReadableProperty → ReadableProperty
  20. def listenOnce(valueListener: (A) ⇒ Any): Registration

    Permalink

    Registers listener which will be called on the next value change.

    Registers listener which will be called on the next value change. This listener will be fired only once.

    Definition Classes
    AbstractReadableProperty → ReadableProperty
  21. final val listeners: Buffer[(A) ⇒ Any]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AbstractReadableProperty
  22. def listenersCount(): Int

    Permalink

    Returns listeners count.

    Returns listeners count.

    Definition Classes
    AbstractReadableProperty → ReadableProperty
  23. def listenersUpdate(): Unit

    Permalink

    This method should be called when the listener is registered or removed.

    This method should be called when the listener is registered or removed.

    Attributes
    protected[io.udash.properties]
    Definition Classes
    AbstractReadableProperty → ReadableProperty
  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final val oneTimeListeners: Buffer[Registration]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AbstractReadableProperty
  28. val properties: Map[String, Property[_]]

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractReadableModelProperty
  29. lazy val readable: ReadableModelProperty[A]

    Permalink

    Ensures read-only access to this property.

    Ensures read-only access to this property.

    Definition Classes
    AbstractReadableModelProperty → ReadableModelProperty → AbstractReadableProperty → ReadableProperty
  30. macro def roSubModel[B](f: (A) ⇒ B)(implicit ev: ModelPropertyCreator[B]): ReadableModelProperty[B]

    Permalink

    Returns child ModelProperty[B].

    Returns child ModelProperty[B].

    Definition Classes
    ReadableModelProperty
  31. macro def roSubProp[B](f: (A) ⇒ B)(implicit ev: PropertyCreator[B]): ReadableProperty[B]

    Permalink

    Returns child DirectProperty[B].

    Returns child DirectProperty[B].

    Definition Classes
    ReadableModelProperty
  32. macro def roSubSeq[B](f: (A) ⇒ Seq[B])(implicit ev: SeqPropertyCreator[B]): ReadableSeqProperty[B, CastableReadableProperty[B]]

    Permalink

    Returns child DirectSeqProperty[B]

    Returns child DirectSeqProperty[B]

    Definition Classes
    ReadableModelProperty
  33. def streamTo[B](target: Property[B], initUpdate: Boolean = true)(transformer: (A) ⇒ B): Registration

    Permalink

    Streams value changes to the target property.

    Streams value changes to the target property. It is not as strong relation as transform, because target can change value independently.

    Definition Classes
    AbstractReadableProperty → ReadableProperty
  34. macro def subModel[B](f: (A) ⇒ B)(implicit ev: ModelPropertyCreator[B]): ModelProperty[B]

    Permalink

    Returns child ModelProperty[B].

  35. macro def subProp[B](f: (A) ⇒ B)(implicit ev: PropertyCreator[B]): Property[B]

    Permalink

    Returns child DirectProperty[B].

  36. macro def subSeq[B](f: (A) ⇒ Seq[B])(implicit ev: SeqPropertyCreator[B]): SeqProperty[B, CastableProperty[B]]

    Permalink

    Returns child DirectSeqProperty[B]

  37. def sync[B](p: Property[B])(transformer: (A) ⇒ B, revert: (B) ⇒ A): Registration

    Permalink

    Bidirectionally synchronizes Property[B] with this.

    Bidirectionally synchronizes Property[B] with this. The transformed value is synchronized from this to Property[B] on initialization.

    B

    Type of new Property.

    p

    Property to be synchronized with this.

    transformer

    Method transforming type A of existing Property to type B of new Property.

    revert

    Method transforming type B of new Property to type A of existing Property.

    returns

    Bidirectional registration between existing and new property.

    Definition Classes
    AbstractProperty → Property
  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  39. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  40. def transform[B](transformer: (A) ⇒ B, revert: (B) ⇒ A): Property[B]

    Permalink

    Creates Property[B] linked to this.

    Creates Property[B] linked to this. Changes will be bidirectionally synchronized between this and new property.

    B

    Type of new Property.

    transformer

    Method transforming type A of existing Property to type B of new Property.

    revert

    Method transforming type B of new Property to type A of existing Property.

    returns

    New Property[B], which will be synchronised with original Property[A].

    Definition Classes
    AbstractProperty → Property
  41. def transform[B](transformer: (A) ⇒ B): ReadableProperty[B]

    Permalink

    Creates ReadableProperty[B] linked to this.

    Creates ReadableProperty[B] linked to this. Changes will be synchronized with this.

    B

    Type of new Property.

    transformer

    Method transforming type A of existing Property to type B of new Property.

    returns

    New ReadableProperty[B], which will be synchronised with original ReadableProperty[A].

    Definition Classes
    AbstractReadableProperty → ReadableProperty
  42. def transformToSeq[B](transformer: (A) ⇒ Seq[B], revert: (Seq[B]) ⇒ A)(implicit arg0: PropertyCreator[B]): SeqProperty[B, Property[B]]

    Permalink

    Creates SeqProperty[B] linked to this.

    Creates SeqProperty[B] linked to this. Changes will be synchronized with this in both directions.

    B

    Type of elements in new SeqProperty.

    transformer

    Method transforming type A of existing Property to type Seq[B] of new Property.

    revert

    Method transforming type Seq[B] to A.

    returns

    New ReadableSeqProperty[B], which will be synchronised with original Property[A].

    Definition Classes
    AbstractProperty → Property
  43. def transformToSeq[B](transformer: (A) ⇒ Seq[B])(implicit arg0: PropertyCreator[B]): ReadableSeqProperty[B, ReadableProperty[B]]

    Permalink

    Creates ReadableSeqProperty[B] linked to this.

    Creates ReadableSeqProperty[B] linked to this. Changes will be synchronized with this.

    B

    Type of elements in new SeqProperty.

    transformer

    Method transforming type A of existing Property to type Seq[B] of new Property.

    returns

    New ReadableSeqProperty[B], which will be synchronised with original ReadableProperty[A].

    Definition Classes
    AbstractReadableProperty → ReadableProperty
  44. lazy val valid: ReadableProperty[ValidationResult]

    Permalink

    Property containing validation result.

    Property containing validation result.

    Definition Classes
    AbstractReadableProperty → ReadableProperty
  45. def validate(): Unit

    Permalink

    Triggers validation.

    Triggers validation.

    Attributes
    protected[io.udash.properties]
    Definition Classes
    AbstractReadableProperty → ReadableProperty
  46. final lazy val validationProperty: ValidationProperty[A]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AbstractReadableProperty
  47. var validationResult: Future[ValidationResult]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AbstractReadableProperty
  48. final val validators: Buffer[Validator[A]]

    Permalink
    Attributes
    protected[this]
    Definition Classes
    AbstractReadableProperty
  49. def valueChanged(): Unit

    Permalink

    This method should be called when the value has changed.

    This method should be called when the value has changed.

    Attributes
    protected[io.udash.properties]
    Definition Classes
    AbstractReadableProperty → ReadableProperty
  50. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. def wrapListenerRegistration(reg: Registration): Registration

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractReadableProperty
  54. def wrapOneTimeListenerRegistration(reg: Registration): Registration

    Permalink
    Attributes
    protected
    Definition Classes
    AbstractReadableProperty

Inherited from AbstractProperty[A]

Inherited from Property[A]

Inherited from AbstractReadableModelProperty[A]

Inherited from ModelPropertyMacroApi[A]

Inherited from ReadableModelProperty[A]

Inherited from AbstractReadableProperty[A]

Inherited from ReadableProperty[A]

Inherited from AnyRef

Inherited from Any

Ungrouped