Class/Object

com.reactific.helpers

RegistryReference

Related Docs: object RegistryReference | package helpers

Permalink

case class RegistryReference[T <: Registrable[T]] extends () ⇒ Option[T] with Product with Serializable

Reference A Memory Object From The Database

Many of the objects used in Scrupal are not stored in the database. Essentially those things coming from a Module are just retained in memory: Module, Feature, Entity, Type, Handler, etc. However, we need to reference these things from objects that are stored in the database. We do not want to be loading the low level memory objects all the time but would just like to "find" them. That's what the RegistryReference is for. We can register long-lived immutable objects in a registry and find them later, by name. But, there is a registry per object type, by design. So, we need a way to capture a reference to a named object in one of the registries. We do that by simply caching the registry object and the registrable object's id. This information is then stored in the database and reconstructed into the referenced object with the apply method.

Linear Supertypes
Serializable, Serializable, Product, Equals, () ⇒ Option[T], AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RegistryReference
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Function0
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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 apply(): Option[T]

    Permalink
    Definition Classes
    RegistryReference → Function0
  5. def as[C](): Option[C]

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

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

    Permalink
    Definition Classes
    AnyRef
  9. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. val id: Symbol

    Permalink
  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  16. val registry: Registry[T]

    Permalink
  17. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    Function0 → AnyRef → Any
  19. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from () ⇒ Option[T]

Inherited from AnyRef

Inherited from Any

Ungrouped