com.gilt.opm

OpmStorage

trait OpmStorage[V <: OpmObject] extends AnyRef

Document Me.

Since

9/4/12 7:07 PM

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. OpmStorage
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def allRecords(implicit mf: Manifest[V]): OpmQueryResult[V]

  2. abstract def get(key: String)(implicit mf: Manifest[V]): Option[V]

  3. abstract def put(obj: V)(implicit mf: Manifest[V]): Unit

  4. abstract def remove(key: String): Unit

  5. abstract def search[T](v: (V) ⇒ T)(implicit mf: Manifest[V]): OpmSearcherHelper[V, T]

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @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
  12. def hashCode(): Int

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

    Definition Classes
    Any
  14. def maybePut(obj: V)(implicit mf: Manifest[V]): Unit

  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def nestedToStorage[T <: OpmObject](obj: Option[T])(implicit mf: Manifest[T]): Option[OpmStorage[T]]

    If you want automatic storage of nested object, override this.

    If you want automatic storage of nested object, override this.

    Blech. The typing here is all crazy and this is the only way I could find to make it work properly. It would be ideal to pass in a correct type and get back OpmStorage specific to that type. The problem is that one could potentially call this method to return OpmStorage for any number of different subclasses of OpmObject. I think there's some confusion (in my head, at least) around covariance and contravariance - it's possible this needs V to be covariant, but all of the other places it's used it needs to be either contravariant or invariant. Anyway, I have it expecting a typed obj here purely for typing purposes; as such, it is optional and None can be passed. The type of the returned OpmStorage object is really determined by the manifest, which will oftentimes even override the type of the passed-in obj. If you know how to clean up this mess, please do. But it works as-is and is generally hidden from the end user.

    Returns an OpmStorage object for the given type.

  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. def squashPut(obj: V)(implicit mf: Manifest[V]): Unit

    Use this to put a batch of changes as a single diff, without losing history.

    Use this to put a batch of changes as a single diff, without losing history.

    OPM can be a bit verbose when storing diffs as individual records in the database. Use this method to take all of your current unwritten changes, squash them into one single change, then push them to the top of the object's history. For example, imagine your implementation is in Postgres and triggers save off your changes when you update a table.

    put would look like this: update my_table set foo = '1' where id = 1234; update my_table set bar = '2' where id = 1234; update my_table set baz = '3' where id = 1234;

    but squashPut would look like this: update my_table set foo = '1', bar = '2', baz = '3' where id = 1234;

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

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped