PageRenderTime 60ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/api/org/positronicnet/content/ContentValue.html

https://github.com/rst/rst.github.com
HTML | 393 lines | 349 code | 44 blank | 0 comment | 0 complexity | 2ea0bfefc6a5facdf24d7c401ac971b6 MD5 | raw file
  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3. <html>
  4. <head>
  5. <title>org.positronicnet.content.ContentValue</title>
  6. <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
  7. <link type="text/css" media="screen" rel="stylesheet" href="../../../lib/template.css" />
  8. <script type="text/javascript" src="../../../lib/jquery.js"></script>
  9. <script type="text/javascript" src="../../../lib/jquery-ui.js"></script>
  10. <script type="text/javascript" src="../../../lib/template.js"></script>
  11. <script type="text/javascript" src="../../../lib/tools.tooltip.js"></script>
  12. </head>
  13. <body class="type">
  14. <div id="definition">
  15. <a title="Go to companion" href="ContentValue$.html"><img src="../../../lib/class_to_object_big.png" /></a>
  16. <p id="owner"><a name="org" class="extype" href="../../package.html">org</a>.<a name="org.positronicnet" class="extype" href="../package.html">positronicnet</a>.<a name="org.positronicnet.content" class="extype" href="package.html">content</a></p>
  17. <h1><a title="Go to companion" href="ContentValue$.html">ContentValue</a></h1>
  18. </div>
  19. <h4 class="signature" id="signature">
  20. <span class="kind">class</span>
  21. <span class="symbol">
  22. <span class="name">ContentValue</span>
  23. <span class="result"> extends AnyRef</span>
  24. </span>
  25. </h4>
  26. <div class="fullcommenttop" id="comment"><div class="comment cmt"><p>Abstract wrapper for any value that can be stored in a field
  27. of a data source in a <a name="org.positronicnet.content.ContentRepository" class="extype" href="ContentRepository.html">ContentRepository</a> ---
  28. currently, a SQLite database or Android ContentProvider.</p><p>NB that there are implicit conversions in the ContentValue
  29. companion object that coerce various primitive types to a
  30. <a name="org.positronicnet.content.ContentValue" class="extype" href="">ContentValue</a>, to facilitate
  31. their use with the org.postronicnet.content.ContentQuery
  32. API, etc. In addition to handling the usual primitives, this
  33. also allows use of Booleans, adhering to the recommended
  34. SQLite convention of converting them to an integer 0 (false)
  35. or 1 (true).</p><p>A further implementation note:</p><p>Android's Database API has two forms of binding: in a lot
  36. of places, you can stuff things into a contentValues, which
  37. holds typed objects --- but for bound variables in where
  38. clauses (the various selectionArgs arguments), you can supply
  39. only strings. Fortunately, it matters less than one might
  40. think, since the SQLite engine does conversions if you ask
  41. it to compare a number to a string. But it does mean that
  42. if you're implementing conversions of your own --- as we
  43. do with Booleans here, to implement the standard SQLite
  44. convention of representing them as 0 or 1 --- you have to
  45. specify the conversions both ways to keep it consistent.
  46. </p></div><dl class="attributes block"> <dt>Attributes</dt><dd>abstract </dd></dl><div class="toggleContainer block">
  47. <span class="toggle">Linear Supertypes</span>
  48. <div class="superTypes hiddenContent">AnyRef, <span name="scala.Any" class="extype">Any</span></div>
  49. </div><div class="toggleContainer block">
  50. <span class="toggle">Known Subclasses</span>
  51. <div class="subClasses hiddenContent"><a name="org.positronicnet.content.CvBoolean" class="extype" href="CvBoolean.html">CvBoolean</a>, <a name="org.positronicnet.content.CvDouble" class="extype" href="CvDouble.html">CvDouble</a>, <a name="org.positronicnet.content.CvFloat" class="extype" href="CvFloat.html">CvFloat</a>, <a name="org.positronicnet.content.CvInt" class="extype" href="CvInt.html">CvInt</a>, <a name="org.positronicnet.content.CvLong" class="extype" href="CvLong.html">CvLong</a>, <a name="org.positronicnet.content.CvString" class="extype" href="CvString.html">CvString</a></div>
  52. </div></div>
  53. <div id="template">
  54. <div id="mbrsel">
  55. <div id="textfilter"><span class="pre"></span><span class="input"><input accesskey="/" type="text" /></span><span class="post"></span></div>
  56. <div id="order">
  57. <span class="filtertype">Ordering</span>
  58. <ol><li class="alpha in"><span>Alphabetic</span></li><li class="inherit out"><span>By inheritance</span></li></ol>
  59. </div>
  60. <div id="ancestors">
  61. <span class="filtertype">Inherited</span>
  62. <ol><li class="hideall out"><span>Hide All</span></li>
  63. <li class="showall in"><span>Show all</span></li></ol>
  64. <ol id="linearization"><li name="org.positronicnet.content.ContentValue" class="in"><span>ContentValue</span></li><li name="scala.AnyRef" class="in"><span>AnyRef</span></li><li name="scala.Any" class="in"><span>Any</span></li></ol>
  65. </div>
  66. <div id="visbl">
  67. <span class="filtertype">Visibility</span>
  68. <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol>
  69. </div>
  70. </div>
  71. <div class="members" id="constructors">
  72. <h3>Instance Constructors</h3>
  73. <ol><li visbl="pub" name="org.positronicnet.content.ContentValue#this" data-isabs="false">
  74. <a id="this:ContentValue"></a>
  75. <h4 class="signature">
  76. <span class="kind">new</span>
  77. <span class="symbol">
  78. <span class="name">ContentValue</span>
  79. <span class="params">()</span>
  80. </span>
  81. </h4>
  82. </li></ol>
  83. </div>
  84. <div class="values members" id="values">
  85. <h3>Abstract Value Members</h3>
  86. <ol><li visbl="pub" name="org.positronicnet.content.ContentValue#asConditionString" data-isabs="true">
  87. <a id="asConditionString:String"></a>
  88. <h4 class="signature">
  89. <span class="kind">def</span>
  90. <span class="symbol">
  91. <span class="name">asConditionString</span>
  92. <span class="result">: String</span>
  93. </span>
  94. </h4>
  95. <p class="shortcomment cmt">Represent this ContentValue as a string, for use in the
  96. <code>whereArgs</code> of various Android API calls.</p><div class="fullcomment"><div class="comment cmt"><p>Represent this ContentValue as a string, for use in the
  97. <code>whereArgs</code> of various Android API calls.
  98. </p></div><dl class="attributes block"> <dt>Attributes</dt><dd>abstract </dd></dl></div>
  99. </li><li visbl="pub" name="org.positronicnet.content.ContentValue#putContentValues" data-isabs="true">
  100. <a id="putContentValues(ContentValues,String):Unit"></a>
  101. <h4 class="signature">
  102. <span class="kind">def</span>
  103. <span class="symbol">
  104. <span class="name">putContentValues</span>
  105. <span class="params">(<span name="cv">cv: <span name="android.content.ContentValues" class="extype">ContentValues</span></span>, <span name="key">key: String</span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  106. </span>
  107. </h4>
  108. <p class="shortcomment cmt">Put this contentValue into an Android ContentValues object,
  109. as the value of the given key.</p><div class="fullcomment"><div class="comment cmt"><p>Put this contentValue into an Android ContentValues object,
  110. as the value of the given key.
  111. </p></div><dl class="attributes block"> <dt>Attributes</dt><dd>abstract </dd></dl></div>
  112. </li></ol>
  113. </div>
  114. <div class="values members" id="values">
  115. <h3>Concrete Value Members</h3>
  116. <ol><li visbl="pub" name="scala.AnyRef#!=" data-isabs="false">
  117. <a id="!=(AnyRef):Boolean"></a>
  118. <h4 class="signature">
  119. <span class="kind">def</span>
  120. <span class="symbol">
  121. <span class="name">!=</span>
  122. <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  123. </span>
  124. </h4>
  125. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  126. </li><li visbl="pub" name="scala.Any#!=" data-isabs="false">
  127. <a id="!=(Any):Boolean"></a>
  128. <h4 class="signature">
  129. <span class="kind">def</span>
  130. <span class="symbol">
  131. <span class="name">!=</span>
  132. <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  133. </span>
  134. </h4>
  135. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
  136. </li><li visbl="pub" name="scala.AnyRef###" data-isabs="false">
  137. <a id="##():Int"></a>
  138. <h4 class="signature">
  139. <span class="kind">def</span>
  140. <span class="symbol">
  141. <span class="name">##</span>
  142. <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
  143. </span>
  144. </h4>
  145. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef Any</dd></dl></div>
  146. </li><li visbl="pub" name="scala.AnyRef#==" data-isabs="false">
  147. <a id="==(AnyRef):Boolean"></a>
  148. <h4 class="signature">
  149. <span class="kind">def</span>
  150. <span class="symbol">
  151. <span class="name">==</span>
  152. <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  153. </span>
  154. </h4>
  155. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  156. </li><li visbl="pub" name="scala.Any#==" data-isabs="false">
  157. <a id="==(Any):Boolean"></a>
  158. <h4 class="signature">
  159. <span class="kind">def</span>
  160. <span class="symbol">
  161. <span class="name">==</span>
  162. <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  163. </span>
  164. </h4>
  165. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
  166. </li><li visbl="pub" name="scala.Any#asInstanceOf" data-isabs="false">
  167. <a id="asInstanceOf[T0]:T0"></a>
  168. <h4 class="signature">
  169. <span class="kind">def</span>
  170. <span class="symbol">
  171. <span class="name">asInstanceOf</span>
  172. <span class="tparams">[<span name="T0">T0</span>]</span>
  173. <span class="result">: T0</span>
  174. </span>
  175. </h4>
  176. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
  177. </li><li visbl="prt" name="scala.AnyRef#clone" data-isabs="false">
  178. <a id="clone():AnyRef"></a>
  179. <h4 class="signature">
  180. <span class="kind">def</span>
  181. <span class="symbol">
  182. <span class="name">clone</span>
  183. <span class="params">()</span><span class="result">: AnyRef</span>
  184. </span>
  185. </h4>
  186. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="java.lang" class="extype" href="../../../java/lang/package.html">lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
  187. <span class="name">@throws</span><span class="args">()</span>
  188. </dd></dl></div>
  189. </li><li visbl="pub" name="scala.AnyRef#eq" data-isabs="false">
  190. <a id="eq(AnyRef):Boolean"></a>
  191. <h4 class="signature">
  192. <span class="kind">def</span>
  193. <span class="symbol">
  194. <span class="name">eq</span>
  195. <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  196. </span>
  197. </h4>
  198. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  199. </li><li visbl="pub" name="scala.AnyRef#equals" data-isabs="false">
  200. <a id="equals(Any):Boolean"></a>
  201. <h4 class="signature">
  202. <span class="kind">def</span>
  203. <span class="symbol">
  204. <span class="name">equals</span>
  205. <span class="params">(<span name="arg0">arg0: <span name="scala.Any" class="extype">Any</span></span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  206. </span>
  207. </h4>
  208. <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef Any</dd></dl></div>
  209. </li><li visbl="prt" name="scala.AnyRef#finalize" data-isabs="false">
  210. <a id="finalize():Unit"></a>
  211. <h4 class="signature">
  212. <span class="kind">def</span>
  213. <span class="symbol">
  214. <span class="name">finalize</span>
  215. <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  216. </span>
  217. </h4>
  218. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a name="java.lang" class="extype" href="../../../java/lang/package.html">lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
  219. <span class="name">@throws</span><span class="args">()</span>
  220. </dd></dl></div>
  221. </li><li visbl="pub" name="scala.AnyRef#getClass" data-isabs="false">
  222. <a id="getClass():java.lang.Class[_]"></a>
  223. <h4 class="signature">
  224. <span class="kind">def</span>
  225. <span class="symbol">
  226. <span class="name">getClass</span>
  227. <span class="params">()</span><span class="result">: java.lang.Class[_]</span>
  228. </span>
  229. </h4>
  230. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  231. </li><li visbl="pub" name="scala.AnyRef#hashCode" data-isabs="false">
  232. <a id="hashCode():Int"></a>
  233. <h4 class="signature">
  234. <span class="kind">def</span>
  235. <span class="symbol">
  236. <span class="name">hashCode</span>
  237. <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
  238. </span>
  239. </h4>
  240. <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef Any</dd></dl></div>
  241. </li><li visbl="pub" name="scala.Any#isInstanceOf" data-isabs="false">
  242. <a id="isInstanceOf[T0]:Boolean"></a>
  243. <h4 class="signature">
  244. <span class="kind">def</span>
  245. <span class="symbol">
  246. <span class="name">isInstanceOf</span>
  247. <span class="tparams">[<span name="T0">T0</span>]</span>
  248. <span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  249. </span>
  250. </h4>
  251. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
  252. </li><li visbl="pub" name="scala.AnyRef#ne" data-isabs="false">
  253. <a id="ne(AnyRef):Boolean"></a>
  254. <h4 class="signature">
  255. <span class="kind">def</span>
  256. <span class="symbol">
  257. <span class="name">ne</span>
  258. <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  259. </span>
  260. </h4>
  261. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  262. </li><li visbl="pub" name="scala.AnyRef#notify" data-isabs="false">
  263. <a id="notify():Unit"></a>
  264. <h4 class="signature">
  265. <span class="kind">def</span>
  266. <span class="symbol">
  267. <span class="name">notify</span>
  268. <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  269. </span>
  270. </h4>
  271. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  272. </li><li visbl="pub" name="scala.AnyRef#notifyAll" data-isabs="false">
  273. <a id="notifyAll():Unit"></a>
  274. <h4 class="signature">
  275. <span class="kind">def</span>
  276. <span class="symbol">
  277. <span class="name">notifyAll</span>
  278. <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  279. </span>
  280. </h4>
  281. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  282. </li><li visbl="pub" name="scala.AnyRef#synchronized" data-isabs="false">
  283. <a id="synchronized[T0](⇒ T0):T0"></a>
  284. <h4 class="signature">
  285. <span class="kind">def</span>
  286. <span class="symbol">
  287. <span class="name">synchronized</span>
  288. <span class="tparams">[<span name="T0">T0</span>]</span>
  289. <span class="params">(<span name="arg0">arg0: T0</span>)</span><span class="result">: T0</span>
  290. </span>
  291. </h4>
  292. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  293. </li><li visbl="pub" name="scala.AnyRef#toString" data-isabs="false">
  294. <a id="toString():String"></a>
  295. <h4 class="signature">
  296. <span class="kind">def</span>
  297. <span class="symbol">
  298. <span class="name">toString</span>
  299. <span class="params">()</span><span class="result">: <span name="java.lang.String" class="extype">String</span></span>
  300. </span>
  301. </h4>
  302. <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef Any</dd></dl></div>
  303. </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
  304. <a id="wait():Unit"></a>
  305. <h4 class="signature">
  306. <span class="kind">def</span>
  307. <span class="symbol">
  308. <span class="name">wait</span>
  309. <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  310. </span>
  311. </h4>
  312. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
  313. <span class="name">@throws</span><span class="args">()</span>
  314. </dd></dl></div>
  315. </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
  316. <a id="wait(Long,Int):Unit"></a>
  317. <h4 class="signature">
  318. <span class="kind">def</span>
  319. <span class="symbol">
  320. <span class="name">wait</span>
  321. <span class="params">(<span name="arg0">arg0: <span name="scala.Long" class="extype">Long</span></span>, <span name="arg1">arg1: <span name="scala.Int" class="extype">Int</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  322. </span>
  323. </h4>
  324. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
  325. <span class="name">@throws</span><span class="args">()</span>
  326. </dd></dl></div>
  327. </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
  328. <a id="wait(Long):Unit"></a>
  329. <h4 class="signature">
  330. <span class="kind">def</span>
  331. <span class="symbol">
  332. <span class="name">wait</span>
  333. <span class="params">(<span name="arg0">arg0: <span name="scala.Long" class="extype">Long</span></span>)</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  334. </span>
  335. </h4>
  336. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
  337. <span class="name">@throws</span><span class="args">()</span>
  338. </dd></dl></div>
  339. </li></ol>
  340. </div>
  341. <div name="scala.AnyRef" class="parent">
  342. <h3>Inherited from AnyRef</h3>
  343. </div><div name="scala.Any" class="parent">
  344. <h3>Inherited from <span name="scala.Any" class="extype">Any</span></h3>
  345. </div>
  346. </div>
  347. <div id="tooltip"></div>
  348. </body>
  349. </html>