org.positronicnet.content

ContentRepository

trait ContentRepository [SourceType, IdType] extends AnyRef

Generic interface to "content repositories", including databases and ContentResolvers. Each repository can host multiple "sources" (tables in a database, ContentProviders for the content resolver, etc.). Ordinarily these methods aren't invoked directly, but instead by means of a ContentQuery object, which provides a shorthand fluid interface to adding conditions, etc.

This trait, and the associated ContentQuery class, are intended as a shorthand, along the lines of the Positronic Net ui shorthand, which allows easier use of the APIs, with less boilerplate code, but without changing any of the underlying semantics much.

The type parameters are the type of the handle to the underlying Android objects (e.g., a SQLiteDatabase) and the type of the row IDs returned by insert. (Note that most of the ContentRepository calls allow the specification of a String where argument which can name a source with more specificity, e.g., a table within a database.)

For use with the ORM, the latter must be Long; thus, for instance, the ORM can handle a LongIdContentResolverRepository (which assumes that the URIs returned by the underlying ContentResolver encode an ID according to the usual assumptions), but not a UriIdContentResolverRepository (which assumes nothing). See org.positronicnet.content.PositronicContentResolver for more.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ContentRepository
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Abstract Value Members

  1. def delete (whence: SourceType, where: String, whereArgs: Array[String]): Int

    Attributes
    abstract
  2. def getLogTag : String

    Attributes
    abstract
  3. def insert (where: SourceType, vals: ContentValues): IdType

    Attributes
    abstract
  4. def query (whence: SourceType, cols: Array[String], where: String, whereArgs: Array[String], groupBy: String, having: String, order: String, limit: String): Cursor

    Attributes
    abstract
  5. def update (whence: SourceType, vals: ContentValues, where: String, whereArgs: Array[String]): Int

    Attributes
    abstract

Concrete Value Members

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

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

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

    Attributes
    final
    Definition Classes
    AnyRef
  9. def equals (arg0: Any): Boolean

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  12. def hashCode (): Int

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

    Attributes
    final
    Definition Classes
    Any
  14. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  15. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  16. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  17. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  18. def toString (): String

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any