1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { paramMock } from '../utils'; 17 18export const RdbPredicatesClass = class RdbPredicates { 19 constructor(...args) { 20 console.warn('data.rdb.RdbPredicates.constructor interface mocked in the Previewer. How this interface works on the' + 21 ' Previewer may be different from that on a real device.'); 22 this.equalTo = function (...args) { 23 console.warn("RdbPredicates.equalTo interface mocked in the Previewer. How this interface works on the" + 24 " Previewer may be different from that on a real device.") 25 return new RdbPredicatesClass(); 26 }; 27 this.notEqualTo = function (...args) { 28 console.warn("RdbPredicates.notEqualTo interface mocked in the Previewer. How this interface works on the" + 29 " Previewer may be different from that on a real device.") 30 return new RdbPredicatesClass(); 31 }; 32 this.beginWrap = function (...args) { 33 console.warn("RdbPredicates.beginWrap interface mocked in the Previewer. How this interface works on the" + 34 " Previewer may be different from that on a real device.") 35 return new RdbPredicatesClass(); 36 }; 37 this.endWrap = function (...args) { 38 console.warn("RdbPredicates.endWrap interface mocked in the Previewer. How this interface works on the" + 39 " Previewer may be different from that on a real device.") 40 return new RdbPredicatesClass(); 41 }; 42 this.or = function (...args) { 43 console.warn("RdbPredicates.or interface mocked in the Previewer. How this interface works on the" + 44 " Previewer may be different from that on a real device.") 45 return new RdbPredicatesClass(); 46 }; 47 this.and = function (...args) { 48 console.warn("RdbPredicates.and interface mocked in the Previewer. How this interface works on the" + 49 " Previewer may be different from that on a real device.") 50 return new RdbPredicatesClass(); 51 }; 52 this.contains = function (...args) { 53 console.warn("RdbPredicates.contains interface mocked in the Previewer. How this interface works on the" + 54 " Previewer may be different from that on a real device.") 55 return new RdbPredicatesClass(); 56 }; 57 this.beginsWith = function (...args) { 58 console.warn("RdbPredicates.beginsWith interface mocked in the Previewer. How this interface works on the" + 59 " Previewer may be different from that on a real device.") 60 return new RdbPredicatesClass(); 61 }; 62 this.endsWith = function (...args) { 63 console.warn("RdbPredicates.endsWith interface mocked in the Previewer. How this interface works on the" + 64 " Previewer may be different from that on a real device.") 65 return new RdbPredicatesClass(); 66 }; 67 this.isNull = function (...args) { 68 console.warn("RdbPredicates.isNull interface mocked in the Previewer. How this interface works on the" + 69 " Previewer may be different from that on a real device.") 70 return new RdbPredicatesClass(); 71 }; 72 this.isNotNull = function (...args) { 73 console.warn("RdbPredicates.isNotNull interface mocked in the Previewer. How this interface works on the" + 74 " Previewer may be different from that on a real device.") 75 return new RdbPredicatesClass(); 76 }; 77 this.like = function (...args) { 78 console.warn("RdbPredicates.like interface mocked in the Previewer. How this interface works on the" + 79 " Previewer may be different from that on a real device.") 80 return new RdbPredicatesClass(); 81 }; 82 this.glob = function (...args) { 83 console.warn("RdbPredicates.glob interface mocked in the Previewer. How this interface works on the" + 84 " Previewer may be different from that on a real device.") 85 return new RdbPredicatesClass(); 86 }; 87 this.between = function (...args) { 88 console.warn("RdbPredicates.between interface mocked in the Previewer. How this interface works on the" + 89 " Previewer may be different from that on a real device.") 90 return new RdbPredicatesClass(); 91 }; 92 this.notBetween = function (...args) { 93 console.warn("RdbPredicates.notBetween interface mocked in the Previewer. How this interface works on the" + 94 " Previewer may be different from that on a real device.") 95 return new RdbPredicatesClass(); 96 }; 97 this.greaterThan = function (...args) { 98 console.warn("RdbPredicates.greaterThan interface mocked in the Previewer. How this interface works on the" + 99 " Previewer may be different from that on a real device.") 100 return new RdbPredicatesClass(); 101 }; 102 this.lessThan = function (...args) { 103 console.warn("RdbPredicates.lessThan interface mocked in the Previewer. How this interface works on the" + 104 " Previewer may be different from that on a real device.") 105 return new RdbPredicatesClass(); 106 }; 107 this.greaterThanOrEqualTo = function (...args) { 108 console.warn("RdbPredicates.greaterThanOrEqualTo interface mocked in the Previewer. How this interface works on the" + 109 " Previewer may be different from that on a real device.") 110 return new RdbPredicatesClass(); 111 }; 112 this.lessThanOrEqualTo = function (...args) { 113 console.warn("RdbPredicates.lessThanOrEqualTo interface mocked in the Previewer. How this interface works on the" + 114 " Previewer may be different from that on a real device.") 115 return new RdbPredicatesClass(); 116 }; 117 this.orderByAsc = function (...args) { 118 console.warn("RdbPredicates.orderByAsc interface mocked in the Previewer. How this interface works on the" + 119 " Previewer may be different from that on a real device.") 120 return new RdbPredicatesClass(); 121 }; 122 this.orderByDesc = function (...args) { 123 console.warn("RdbPredicates.orderByDesc interface mocked in the Previewer. How this interface works on the" + 124 " Previewer may be different from that on a real device.") 125 return new RdbPredicatesClass(); 126 }; 127 this.distinct = function (...args) { 128 console.warn("RdbPredicates.distinct interface mocked in the Previewer. How this interface works on the" + 129 " Previewer may be different from that on a real device.") 130 return new RdbPredicatesClass(); 131 }; 132 this.limitAs = function (...args) { 133 console.warn("RdbPredicates.limitAs interface mocked in the Previewer. How this interface works on the" + 134 " Previewer may be different from that on a real device.") 135 return new RdbPredicatesClass(); 136 }; 137 this.offsetAs = function (...args) { 138 console.warn("RdbPredicates.offsetAs interface mocked in the Previewer. How this interface works on the" + 139 " Previewer may be different from that on a real device.") 140 return new RdbPredicatesClass(); 141 }; 142 this.groupBy = function (...args) { 143 console.warn("RdbPredicates.groupBy interface mocked in the Previewer. How this interface works on the" + 144 " Previewer may be different from that on a real device.") 145 return new RdbPredicatesClass(); 146 }; 147 this.indexedBy = function (...args) { 148 console.warn("RdbPredicates.indexedBy interface mocked in the Previewer. How this interface works on the" + 149 " Previewer may be different from that on a real device.") 150 return new RdbPredicatesClass(); 151 }; 152 this.in = function (...args) { 153 console.warn("RdbPredicates.in interface mocked in the Previewer. How this interface works on the" + 154 " Previewer may be different from that on a real device.") 155 return new RdbPredicatesClass(); 156 }; 157 this.notIn = function (...args) { 158 console.warn("RdbPredicates.notIn interface mocked in the Previewer. How this interface works on the" + 159 " Previewer may be different from that on a real device.") 160 return new RdbPredicatesClass(); 161 }; 162 this.inDevices = function (...args) { 163 console.warn("RdbPredicates.inDevices interface mocked in the Previewer. How this interface works on the" + 164 " Previewer may be different from that on a real device.") 165 return new RdbPredicatesClass(); 166 }; 167 this.inAllDevices = function (...args) { 168 console.warn("RdbPredicates.inAllDevices interface mocked in the Previewer. How this interface works on the" + 169 " Previewer may be different from that on a real device.") 170 return new RdbPredicatesClass(); 171 }; 172 } 173}; 174 175export function mockDataAbility() { 176 const DataAbilityPredicatesClass = class DataAbilityPredicates { 177 constructor() { 178 console.warn('DataAbility.DataAbilityPredicates.constructor interface mocked in the Previewer. How this interface works on' + 179 ' the Previewer may be different from that on a real device.'); 180 this.equalTo = function (...args) { 181 console.warn('DataAbilityPredicates.equalTo interface mocked in the Previewer. How this interface works on the' + 182 ' Previewer may be different from that on a real device.'); 183 return new DataAbilityPredicatesClass(); 184 }; 185 this.notEqualTo = function (...args) { 186 console.warn('DataAbilityPredicates.notEqualTo interface mocked in the Previewer. How this interface works on the' + 187 ' Previewer may be different from that on a real device.'); 188 return new DataAbilityPredicatesClass(); 189 }; 190 this.beginWrap = function (...args) { 191 console.warn('DataAbilityPredicates.beginWrap interface mocked in the Previewer. How this interface works on the' + 192 ' Previewer may be different from that on a real device.'); 193 return new DataAbilityPredicatesClass(); 194 }; 195 this.endWrap = function (...args) { 196 console.warn('DataAbilityPredicates.endWrap interface mocked in the Previewer. How this interface works on the' + 197 ' Previewer may be different from that on a real device.'); 198 return new DataAbilityPredicatesClass(); 199 }; 200 this.or = function (...args) { 201 console.warn('DataAbilityPredicates.or interface mocked in the Previewer. How this interface works on the' + 202 ' Previewer may be different from that on a real device.'); 203 return new DataAbilityPredicatesClass(); 204 }; 205 this.and = function (...args) { 206 console.warn('DataAbilityPredicates.and interface mocked in the Previewer. How this interface works on the' + 207 ' Previewer may be different from that on a real device.'); 208 return new DataAbilityPredicatesClass(); 209 }; 210 this.contains = function (...args) { 211 console.warn('DataAbilityPredicates.contains interface mocked in the Previewer. How this interface works on the' + 212 ' Previewer may be different from that on a real device.'); 213 return new DataAbilityPredicatesClass(); 214 }; 215 this.beginsWith = function (...args) { 216 console.warn('DataAbilityPredicates.beginsWith interface mocked in the Previewer. How this interface works on the' + 217 ' Previewer may be different from that on a real device.'); 218 return new DataAbilityPredicatesClass(); 219 }; 220 this.endsWith = function (...args) { 221 console.warn('DataAbilityPredicates.endsWith interface mocked in the Previewer. How this interface works on the' + 222 ' Previewer may be different from that on a real device.'); 223 return new DataAbilityPredicatesClass(); 224 }; 225 this.isNull = function (...args) { 226 console.warn('DataAbilityPredicates.isNull interface mocked in the Previewer. How this interface works on the' + 227 ' Previewer may be different from that on a real device.'); 228 return new DataAbilityPredicatesClass(); 229 }; 230 this.isNotNull = function (...args) { 231 console.warn('DataAbilityPredicates.isNotNull interface mocked in the Previewer. How this interface works on the' + 232 ' Previewer may be different from that on a real device.'); 233 return new DataAbilityPredicatesClass(); 234 }; 235 this.like = function (...args) { 236 console.warn('DataAbilityPredicates.like interface mocked in the Previewer. How this interface works on the' + 237 ' Previewer may be different from that on a real device.'); 238 return new DataAbilityPredicatesClass(); 239 }; 240 this.glob = function (...args) { 241 console.warn('DataAbilityPredicates.glob interface mocked in the Previewer. How this interface works on the' + 242 ' Previewer may be different from that on a real device.'); 243 return new DataAbilityPredicatesClass(); 244 }; 245 this.between = function (...args) { 246 console.warn('DataAbilityPredicates.between interface mocked in the Previewer. How this interface works on the' + 247 ' Previewer may be different from that on a real device.'); 248 return new DataAbilityPredicatesClass(); 249 }; 250 this.notBetween = function (...args) { 251 console.warn('DataAbilityPredicates.notBetween interface mocked in the Previewer. How this interface works on the' + 252 ' Previewer may be different from that on a real device.'); 253 return new DataAbilityPredicatesClass(); 254 }; 255 this.greaterThan = function (...args) { 256 console.warn('DataAbilityPredicates.greaterThan interface mocked in the Previewer. How this interface works on the' + 257 ' Previewer may be different from that on a real device.'); 258 return new DataAbilityPredicatesClass(); 259 }; 260 this.lessThan = function (...args) { 261 console.warn('DataAbilityPredicates.lessThan interface mocked in the Previewer. How this interface works on the' + 262 ' Previewer may be different from that on a real device.'); 263 return new DataAbilityPredicatesClass(); 264 }; 265 this.greaterThanOrEqualTo = function (...args) { 266 console.warn('DataAbilityPredicates.greaterThanOrEqualTo interface mocked in the Previewer. How this interface works on the' + 267 ' Previewer may be different from that on a real device.'); 268 return new DataAbilityPredicatesClass(); 269 }; 270 this.lessThanOrEqualTo = function (...args) { 271 console.warn('DataAbilityPredicates.lessThanOrEqualTo interface mocked in the Previewer. How this interface works on the' + 272 ' Previewer may be different from that on a real device.'); 273 return new DataAbilityPredicatesClass(); 274 }; 275 this.orderByAsc = function (...args) { 276 console.warn('DataAbilityPredicates.orderByAsc interface mocked in the Previewer. How this interface works on the' + 277 ' Previewer may be different from that on a real device.'); 278 return new DataAbilityPredicatesClass(); 279 }; 280 this.orderByDesc = function (...args) { 281 console.warn('DataAbilityPredicates.orderByDesc interface mocked in the Previewer. How this interface works on the' + 282 ' Previewer may be different from that on a real device.'); 283 return new DataAbilityPredicatesClass(); 284 }; 285 this.distinct = function (...args) { 286 console.warn('DataAbilityPredicates.distinct interface mocked in the Previewer. How this interface works on the' + 287 ' Previewer may be different from that on a real device.'); 288 return new DataAbilityPredicatesClass(); 289 }; 290 this.limitAs = function (...args) { 291 console.warn('DataAbilityPredicates.limitAs interface mocked in the Previewer. How this interface works on the' + 292 ' Previewer may be different from that on a real device.'); 293 return new DataAbilityPredicatesClass(); 294 }; 295 this.offsetAs = function (...args) { 296 console.warn('DataAbilityPredicates.offsetAs interface mocked in the Previewer. How this interface works on the' + 297 ' Previewer may be different from that on a real device.'); 298 return new DataAbilityPredicatesClass(); 299 }; 300 this.groupBy = function (...args) { 301 console.warn('DataAbilityPredicates.groupBy interface mocked in the Previewer. How this interface works on the' + 302 ' Previewer may be different from that on a real device.'); 303 return new DataAbilityPredicatesClass(); 304 }; 305 this.indexedBy = function (...args) { 306 console.warn('DataAbilityPredicates.indexedBy interface mocked in the Previewer. How this interface works on the' + 307 ' Previewer may be different from that on a real device.'); 308 return new DataAbilityPredicatesClass(); 309 }; 310 this.in = function (...args) { 311 console.warn('DataAbilityPredicates.in interface mocked in the Previewer. How this interface works on the' + 312 ' Previewer may be different from that on a real device.'); 313 return new DataAbilityPredicatesClass(); 314 }; 315 this.notIn = function (...args) { 316 console.warn('DataAbilityPredicates.notIn interface mocked in the Previewer. How this interface works on the' + 317 ' Previewer may be different from that on a real device.'); 318 return new DataAbilityPredicatesClass(); 319 }; 320 } 321 }; 322 const dataAbilityMock = { 323 createRdbPredicates: function (...args) { 324 console.warn('DataAbility.createRdbPredicates.constructor interface mocked in the Previewer. How this interface works on' + 325 ' the Previewer may be different from that on a real device.'); 326 return new RdbPredicatesClass(); 327 }, 328 DataAbilityPredicates: DataAbilityPredicatesClass 329 }; 330 return dataAbilityMock; 331} 332