class
ContentValue
extends AnyRef
Instance Constructors
-
new
ContentValue
()
Abstract Value Members
-
def
asConditionString
: String
-
def
putContentValues
(cv: ContentValues, key: String): Unit
Concrete Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
asInstanceOf
[T0]
: T0
-
def
clone
(): AnyRef
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
isInstanceOf
[T0]
: Boolean
-
def
ne
(arg0: AnyRef): Boolean
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
Abstract wrapper for any value that can be stored in a field of a data source in a ContentRepository --- currently, a SQLite database or Android ContentProvider.
NB that there are implicit conversions in the ContentValue companion object that coerce various primitive types to a ContentValue, to facilitate their use with the org.postronicnet.content.ContentQuery API, etc. In addition to handling the usual primitives, this also allows use of Booleans, adhering to the recommended SQLite convention of converting them to an integer 0 (false) or 1 (true).
A further implementation note:
Android's Database API has two forms of binding: in a lot of places, you can stuff things into a contentValues, which holds typed objects --- but for bound variables in where clauses (the various selectionArgs arguments), you can supply only strings. Fortunately, it matters less than one might think, since the SQLite engine does conversions if you ask it to compare a number to a string. But it does mean that if you're implementing conversions of your own --- as we do with Booleans here, to implement the standard SQLite convention of representing them as 0 or 1 --- you have to specify the conversions both ways to keep it consistent.