PageRenderTime 146ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/api/org/positronicnet/content/ContentRepository.html

https://github.com/rst/rst.github.com
HTML | 408 lines | 363 code | 45 blank | 0 comment | 0 complexity | b4391ae831bf324f8193f77d9e017fe8 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.ContentRepository</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. <img src="../../../lib/trait_big.png" />
  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>ContentRepository</h1>
  18. </div>
  19. <h4 class="signature" id="signature">
  20. <span class="kind">trait</span>
  21. <span class="symbol">
  22. <span class="name">ContentRepository</span>
  23. <span class="tparams">[<span name="SourceType">SourceType</span>, <span name="IdType">IdType</span>]</span>
  24. <span class="result"> extends AnyRef</span>
  25. </span>
  26. </h4>
  27. <div class="fullcommenttop" id="comment"><div class="comment cmt"><p>Generic interface to &quot;content repositories&quot;, including databases
  28. and ContentResolvers. Each repository can host multiple &quot;sources&quot;
  29. (tables in a database, ContentProviders for the content resolver,
  30. etc.). Ordinarily these methods aren't invoked directly, but instead
  31. by means of a <a name="org.positronicnet.content.ContentQuery" class="extype" href="ContentQuery.html">ContentQuery</a> object, which
  32. provides a shorthand fluid interface to adding conditions, etc.</p><p>This trait, and the associated <a name="org.positronicnet.content.ContentQuery" class="extype" href="ContentQuery.html">ContentQuery</a>
  33. class, are intended as a shorthand, along the lines of the Positronic Net
  34. <a name="org.positronicnet.ui" class="extype" href="../ui/package.html">ui</a> shorthand, which allows easier use of the APIs,
  35. with less boilerplate code, but without changing any of the underlying
  36. semantics much.</p><p>The type parameters are the type of the handle to the underlying Android
  37. objects (e.g., a <code>SQLiteDatabase</code>) and the type of the row IDs returned
  38. by <code>insert</code>. (Note that most of the
  39. <a name="org.positronicnet.content.ContentRepository" class="extype" href="">ContentRepository</a> calls allow the
  40. specification of a String <code>where</code> argument which can name a source with
  41. more specificity, e.g., a table within a database.)</p><p>For use with the ORM, the latter must be <code>Long</code>; thus, for
  42. instance, the ORM can handle a
  43. <a name="org.positronicnet.content.LongIdContentResolverRepository" class="extype" href="LongIdContentResolverRepository.html">LongIdContentResolverRepository</a> (which
  44. assumes that the URIs returned by the underlying ContentResolver encode
  45. an ID according to the usual assumptions), but not a
  46. <a name="org.positronicnet.content.UriIdContentResolverRepository" class="extype" href="UriIdContentResolverRepository.html">UriIdContentResolverRepository</a> (which
  47. assumes nothing). See
  48. org.positronicnet.content.PositronicContentResolver for more.
  49. </p></div><div class="toggleContainer block">
  50. <span class="toggle">Linear Supertypes</span>
  51. <div class="superTypes hiddenContent">AnyRef, <span name="scala.Any" class="extype">Any</span></div>
  52. </div><div class="toggleContainer block">
  53. <span class="toggle">Known Subclasses</span>
  54. <div class="subClasses hiddenContent"><a name="org.positronicnet.content.LongIdContentResolverRepository" class="extype" href="LongIdContentResolverRepository.html">LongIdContentResolverRepository</a>, <a name="org.positronicnet.content.UriIdContentResolverRepository" class="extype" href="UriIdContentResolverRepository.html">UriIdContentResolverRepository</a></div>
  55. </div></div>
  56. <div id="template">
  57. <div id="mbrsel">
  58. <div id="textfilter"><span class="pre"></span><span class="input"><input accesskey="/" type="text" /></span><span class="post"></span></div>
  59. <div id="order">
  60. <span class="filtertype">Ordering</span>
  61. <ol><li class="alpha in"><span>Alphabetic</span></li><li class="inherit out"><span>By inheritance</span></li></ol>
  62. </div>
  63. <div id="ancestors">
  64. <span class="filtertype">Inherited</span>
  65. <ol><li class="hideall out"><span>Hide All</span></li>
  66. <li class="showall in"><span>Show all</span></li></ol>
  67. <ol id="linearization"><li name="org.positronicnet.content.ContentRepository" class="in"><span>ContentRepository</span></li><li name="scala.AnyRef" class="in"><span>AnyRef</span></li><li name="scala.Any" class="in"><span>Any</span></li></ol>
  68. </div>
  69. <div id="visbl">
  70. <span class="filtertype">Visibility</span>
  71. <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol>
  72. </div>
  73. </div>
  74. <div class="values members" id="values">
  75. <h3>Abstract Value Members</h3>
  76. <ol><li visbl="pub" name="org.positronicnet.content.ContentRepository#delete" data-isabs="true">
  77. <a id="delete(SourceType,String,Array[String]):Int"></a>
  78. <h4 class="signature">
  79. <span class="kind">def</span>
  80. <span class="symbol">
  81. <span class="name">delete</span>
  82. <span class="params">(<span name="whence">whence: SourceType</span>, <span name="where">where: String</span>, <span name="whereArgs">whereArgs: <span name="scala.Array" class="extype">Array</span>[String]</span>)</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
  83. </span>
  84. </h4>
  85. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>abstract </dd></dl></div>
  86. </li><li visbl="pub" name="org.positronicnet.content.ContentRepository#getLogTag" data-isabs="true">
  87. <a id="getLogTag:String"></a>
  88. <h4 class="signature">
  89. <span class="kind">def</span>
  90. <span class="symbol">
  91. <span class="name">getLogTag</span>
  92. <span class="result">: String</span>
  93. </span>
  94. </h4>
  95. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>abstract </dd></dl></div>
  96. </li><li visbl="pub" name="org.positronicnet.content.ContentRepository#insert" data-isabs="true">
  97. <a id="insert(SourceType,ContentValues):IdType"></a>
  98. <h4 class="signature">
  99. <span class="kind">def</span>
  100. <span class="symbol">
  101. <span class="name">insert</span>
  102. <span class="params">(<span name="where">where: SourceType</span>, <span name="vals">vals: <span name="android.content.ContentValues" class="extype">ContentValues</span></span>)</span><span class="result">: IdType</span>
  103. </span>
  104. </h4>
  105. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>abstract </dd></dl></div>
  106. </li><li visbl="pub" name="org.positronicnet.content.ContentRepository#query" data-isabs="true">
  107. <a id="query(SourceType,Array[String],String,Array[String],String,String,String,String):Cursor"></a>
  108. <h4 class="signature">
  109. <span class="kind">def</span>
  110. <span class="symbol">
  111. <span class="name">query</span>
  112. <span class="params">(<span name="whence">whence: SourceType</span>, <span name="cols">cols: <span name="scala.Array" class="extype">Array</span>[String]</span>, <span name="where">where: String</span>, <span name="whereArgs">whereArgs: <span name="scala.Array" class="extype">Array</span>[String]</span>, <span name="groupBy">groupBy: String</span>, <span name="having">having: String</span>, <span name="order">order: String</span>, <span name="limit">limit: String</span>)</span><span class="result">: <span name="android.database.Cursor" class="extype">Cursor</span></span>
  113. </span>
  114. </h4>
  115. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>abstract </dd></dl></div>
  116. </li><li visbl="pub" name="org.positronicnet.content.ContentRepository#update" data-isabs="true">
  117. <a id="update(SourceType,ContentValues,String,Array[String]):Int"></a>
  118. <h4 class="signature">
  119. <span class="kind">def</span>
  120. <span class="symbol">
  121. <span class="name">update</span>
  122. <span class="params">(<span name="whence">whence: SourceType</span>, <span name="vals">vals: <span name="android.content.ContentValues" class="extype">ContentValues</span></span>, <span name="where">where: String</span>, <span name="whereArgs">whereArgs: <span name="scala.Array" class="extype">Array</span>[String]</span>)</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
  123. </span>
  124. </h4>
  125. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>abstract </dd></dl></div>
  126. </li></ol>
  127. </div>
  128. <div class="values members" id="values">
  129. <h3>Concrete Value Members</h3>
  130. <ol><li visbl="pub" name="scala.AnyRef#!=" data-isabs="false">
  131. <a id="!=(AnyRef):Boolean"></a>
  132. <h4 class="signature">
  133. <span class="kind">def</span>
  134. <span class="symbol">
  135. <span class="name">!=</span>
  136. <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  137. </span>
  138. </h4>
  139. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  140. </li><li visbl="pub" name="scala.Any#!=" data-isabs="false">
  141. <a id="!=(Any):Boolean"></a>
  142. <h4 class="signature">
  143. <span class="kind">def</span>
  144. <span class="symbol">
  145. <span class="name">!=</span>
  146. <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>
  147. </span>
  148. </h4>
  149. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
  150. </li><li visbl="pub" name="scala.AnyRef###" data-isabs="false">
  151. <a id="##():Int"></a>
  152. <h4 class="signature">
  153. <span class="kind">def</span>
  154. <span class="symbol">
  155. <span class="name">##</span>
  156. <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
  157. </span>
  158. </h4>
  159. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef Any</dd></dl></div>
  160. </li><li visbl="pub" name="scala.AnyRef#==" data-isabs="false">
  161. <a id="==(AnyRef):Boolean"></a>
  162. <h4 class="signature">
  163. <span class="kind">def</span>
  164. <span class="symbol">
  165. <span class="name">==</span>
  166. <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  167. </span>
  168. </h4>
  169. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  170. </li><li visbl="pub" name="scala.Any#==" data-isabs="false">
  171. <a id="==(Any):Boolean"></a>
  172. <h4 class="signature">
  173. <span class="kind">def</span>
  174. <span class="symbol">
  175. <span class="name">==</span>
  176. <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>
  177. </span>
  178. </h4>
  179. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
  180. </li><li visbl="pub" name="scala.Any#asInstanceOf" data-isabs="false">
  181. <a id="asInstanceOf[T0]:T0"></a>
  182. <h4 class="signature">
  183. <span class="kind">def</span>
  184. <span class="symbol">
  185. <span class="name">asInstanceOf</span>
  186. <span class="tparams">[<span name="T0">T0</span>]</span>
  187. <span class="result">: T0</span>
  188. </span>
  189. </h4>
  190. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
  191. </li><li visbl="prt" name="scala.AnyRef#clone" data-isabs="false">
  192. <a id="clone():AnyRef"></a>
  193. <h4 class="signature">
  194. <span class="kind">def</span>
  195. <span class="symbol">
  196. <span class="name">clone</span>
  197. <span class="params">()</span><span class="result">: AnyRef</span>
  198. </span>
  199. </h4>
  200. <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>
  201. <span class="name">@throws</span><span class="args">()</span>
  202. </dd></dl></div>
  203. </li><li visbl="pub" name="scala.AnyRef#eq" data-isabs="false">
  204. <a id="eq(AnyRef):Boolean"></a>
  205. <h4 class="signature">
  206. <span class="kind">def</span>
  207. <span class="symbol">
  208. <span class="name">eq</span>
  209. <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  210. </span>
  211. </h4>
  212. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  213. </li><li visbl="pub" name="scala.AnyRef#equals" data-isabs="false">
  214. <a id="equals(Any):Boolean"></a>
  215. <h4 class="signature">
  216. <span class="kind">def</span>
  217. <span class="symbol">
  218. <span class="name">equals</span>
  219. <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>
  220. </span>
  221. </h4>
  222. <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef Any</dd></dl></div>
  223. </li><li visbl="prt" name="scala.AnyRef#finalize" data-isabs="false">
  224. <a id="finalize():Unit"></a>
  225. <h4 class="signature">
  226. <span class="kind">def</span>
  227. <span class="symbol">
  228. <span class="name">finalize</span>
  229. <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  230. </span>
  231. </h4>
  232. <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>
  233. <span class="name">@throws</span><span class="args">()</span>
  234. </dd></dl></div>
  235. </li><li visbl="pub" name="scala.AnyRef#getClass" data-isabs="false">
  236. <a id="getClass():java.lang.Class[_]"></a>
  237. <h4 class="signature">
  238. <span class="kind">def</span>
  239. <span class="symbol">
  240. <span class="name">getClass</span>
  241. <span class="params">()</span><span class="result">: java.lang.Class[_]</span>
  242. </span>
  243. </h4>
  244. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  245. </li><li visbl="pub" name="scala.AnyRef#hashCode" data-isabs="false">
  246. <a id="hashCode():Int"></a>
  247. <h4 class="signature">
  248. <span class="kind">def</span>
  249. <span class="symbol">
  250. <span class="name">hashCode</span>
  251. <span class="params">()</span><span class="result">: <span name="scala.Int" class="extype">Int</span></span>
  252. </span>
  253. </h4>
  254. <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef Any</dd></dl></div>
  255. </li><li visbl="pub" name="scala.Any#isInstanceOf" data-isabs="false">
  256. <a id="isInstanceOf[T0]:Boolean"></a>
  257. <h4 class="signature">
  258. <span class="kind">def</span>
  259. <span class="symbol">
  260. <span class="name">isInstanceOf</span>
  261. <span class="tparams">[<span name="T0">T0</span>]</span>
  262. <span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  263. </span>
  264. </h4>
  265. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>Any</dd></dl></div>
  266. </li><li visbl="pub" name="scala.AnyRef#ne" data-isabs="false">
  267. <a id="ne(AnyRef):Boolean"></a>
  268. <h4 class="signature">
  269. <span class="kind">def</span>
  270. <span class="symbol">
  271. <span class="name">ne</span>
  272. <span class="params">(<span name="arg0">arg0: AnyRef</span>)</span><span class="result">: <span name="scala.Boolean" class="extype">Boolean</span></span>
  273. </span>
  274. </h4>
  275. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  276. </li><li visbl="pub" name="scala.AnyRef#notify" data-isabs="false">
  277. <a id="notify():Unit"></a>
  278. <h4 class="signature">
  279. <span class="kind">def</span>
  280. <span class="symbol">
  281. <span class="name">notify</span>
  282. <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  283. </span>
  284. </h4>
  285. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  286. </li><li visbl="pub" name="scala.AnyRef#notifyAll" data-isabs="false">
  287. <a id="notifyAll():Unit"></a>
  288. <h4 class="signature">
  289. <span class="kind">def</span>
  290. <span class="symbol">
  291. <span class="name">notifyAll</span>
  292. <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  293. </span>
  294. </h4>
  295. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  296. </li><li visbl="pub" name="scala.AnyRef#synchronized" data-isabs="false">
  297. <a id="synchronized[T0](⇒ T0):T0"></a>
  298. <h4 class="signature">
  299. <span class="kind">def</span>
  300. <span class="symbol">
  301. <span class="name">synchronized</span>
  302. <span class="tparams">[<span name="T0">T0</span>]</span>
  303. <span class="params">(<span name="arg0">arg0: T0</span>)</span><span class="result">: T0</span>
  304. </span>
  305. </h4>
  306. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd></dl></div>
  307. </li><li visbl="pub" name="scala.AnyRef#toString" data-isabs="false">
  308. <a id="toString():String"></a>
  309. <h4 class="signature">
  310. <span class="kind">def</span>
  311. <span class="symbol">
  312. <span class="name">toString</span>
  313. <span class="params">()</span><span class="result">: <span name="java.lang.String" class="extype">String</span></span>
  314. </span>
  315. </h4>
  316. <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef Any</dd></dl></div>
  317. </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
  318. <a id="wait():Unit"></a>
  319. <h4 class="signature">
  320. <span class="kind">def</span>
  321. <span class="symbol">
  322. <span class="name">wait</span>
  323. <span class="params">()</span><span class="result">: <span name="scala.Unit" class="extype">Unit</span></span>
  324. </span>
  325. </h4>
  326. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
  327. <span class="name">@throws</span><span class="args">()</span>
  328. </dd></dl></div>
  329. </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
  330. <a id="wait(Long,Int):Unit"></a>
  331. <h4 class="signature">
  332. <span class="kind">def</span>
  333. <span class="symbol">
  334. <span class="name">wait</span>
  335. <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>
  336. </span>
  337. </h4>
  338. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
  339. <span class="name">@throws</span><span class="args">()</span>
  340. </dd></dl></div>
  341. </li><li visbl="pub" name="scala.AnyRef#wait" data-isabs="false">
  342. <a id="wait(Long):Unit"></a>
  343. <h4 class="signature">
  344. <span class="kind">def</span>
  345. <span class="symbol">
  346. <span class="name">wait</span>
  347. <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>
  348. </span>
  349. </h4>
  350. <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>final </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd>
  351. <span class="name">@throws</span><span class="args">()</span>
  352. </dd></dl></div>
  353. </li></ol>
  354. </div>
  355. <div name="scala.AnyRef" class="parent">
  356. <h3>Inherited from AnyRef</h3>
  357. </div><div name="scala.Any" class="parent">
  358. <h3>Inherited from <span name="scala.Any" class="extype">Any</span></h3>
  359. </div>
  360. </div>
  361. <div id="tooltip"></div>
  362. </body>
  363. </html>