Tabnine Logo
AVQuery.addWhereItem
Code IndexAdd Tabnine to your IDE (free)

How to use
addWhereItem
method
in
com.avos.avoscloud.AVQuery

Best Java code snippets using com.avos.avoscloud.AVQuery.addWhereItem (Showing top 10 results out of 315)

origin: cn.leancloud/leancloud-common

/**
 * Add a constraint to the query that requires a particular key's value does not match another
 * AVQuery. This only works on keys whose values are AVObjects or lists of AVObjects.
 *
 * @param key The key to check.
 * @param query The query that the value should not match
 * @return Returns the query so you can chain this call.
 */
public AVQuery<T> whereDoesNotMatchQuery(String key, AVQuery<?> query) {
 Map<String, Object> map = AVUtils.createMap("className", query.className);
 map.put("where", query.conditions.compileWhereOperationMap());
 addWhereItem(key, "$notInQuery", map);
 return this;
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Add a constraint to the query that requires a particular key's value does not match another
 * AVQuery. This only works on keys whose values are AVObjects or lists of AVObjects.
 *
 * @param key The key to check.
 * @param query The query that the value should not match
 * @return Returns the query so you can chain this call.
 */
public AVQuery<T> whereDoesNotMatchQuery(String key, AVQuery<?> query) {
 Map<String, Object> map = AVUtils.createMap("className", query.className);
 map.put("where", query.conditions.compileWhereOperationMap());
 addWhereItem(key, "$notInQuery", map);
 return this;
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Add a constraint to the query that requires a particular key's value does not match any value
 * for a key in the results of another AVQuery.
 *
 * @param key The key whose value is being checked and excluded
 * @param keyInQuery The key in the objects from the sub query to look in
 * @param query The sub query to run
 * @return Returns the query so you can chain this call.
 */
public AVQuery<T> whereDoesNotMatchKeyInQuery(String key, String keyInQuery, AVQuery<?> query) {
 Map<String, Object> map = AVUtils.createMap("className", query.className);
 map.put("where", query.conditions.compileWhereOperationMap());
 Map<String, Object> queryMap = AVUtils.createMap("query", map);
 queryMap.put("key", keyInQuery);
 addWhereItem(key, "$dontSelect", queryMap);
 return this;
}
origin: cn.leancloud/leancloud-common

/**
 * Add a constraint to the query that requires a particular key's value does not match any value
 * for a key in the results of another AVQuery.
 *
 * @param key The key whose value is being checked and excluded
 * @param keyInQuery The key in the objects from the sub query to look in
 * @param query The sub query to run
 * @return Returns the query so you can chain this call.
 */
public AVQuery<T> whereDoesNotMatchKeyInQuery(String key, String keyInQuery, AVQuery<?> query) {
 Map<String, Object> map = AVUtils.createMap("className", query.className);
 map.put("where", query.conditions.compileWhereOperationMap());
 Map<String, Object> queryMap = AVUtils.createMap("query", map);
 queryMap.put("key", keyInQuery);
 addWhereItem(key, "$dontSelect", queryMap);
 return this;
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Add a constraint to the query that requires a particular key's value matches a value for a key
 * in the results of another AVQuery
 *
 * @param key The key whose value is being checked
 * @param keyInQuery The key in the objects from the sub query to look in
 * @param query The sub query to run
 * @return Returns the query so you can chain this call.
 */
public AVQuery<T> whereMatchesKeyInQuery(String key, String keyInQuery, AVQuery<?> query) {
 Map<String, Object> inner = new HashMap<String, Object>();
 inner.put("className", query.getClassName());
 inner.put("where", query.conditions.compileWhereOperationMap());
 if (query.conditions.getSkip() > 0) inner.put("skip", query.conditions.getSkip());
 if (query.conditions.getLimit() > 0) inner.put("limit", query.conditions.getLimit());
 if (!AVUtils.isBlankContent(query.getOrder())) inner.put("order", query.getOrder());
 Map<String, Object> queryMap = new HashMap<String, Object>();
 queryMap.put("query", inner);
 queryMap.put("key", keyInQuery);
 return addWhereItem(key, "$select", queryMap);
}
origin: cn.leancloud/leancloud-common

/**
 * Add a constraint to the query that requires a particular key's value matches a value for a key
 * in the results of another AVQuery
 *
 * @param key The key whose value is being checked
 * @param keyInQuery The key in the objects from the sub query to look in
 * @param query The sub query to run
 * @return Returns the query so you can chain this call.
 */
public AVQuery<T> whereMatchesKeyInQuery(String key, String keyInQuery, AVQuery<?> query) {
 Map<String, Object> inner = new HashMap<String, Object>();
 inner.put("className", query.getClassName());
 inner.put("where", query.conditions.compileWhereOperationMap());
 if (query.conditions.getSkip() > 0)
  inner.put("skip", query.conditions.getSkip());
 if (query.conditions.getLimit() > 0)
  inner.put("limit", query.conditions.getLimit());
 if (!AVUtils.isBlankContent(query.getOrder()))
  inner.put("order", query.getOrder());
 Map<String, Object> queryMap = new HashMap<String, Object>();
 queryMap.put("query", inner);
 queryMap.put("key", keyInQuery);
 return addWhereItem(key, "$select", queryMap);
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Add a constraint to the query that requires a particular key's value match another AVQuery.
 * This only works on keys whose values are AVObjects or lists of AVObjects.
 *
 * @param key The key to check.
 * @param query The query that the value should match
 * @return Returns the query so you can chain this call.
 */
public AVQuery<T> whereMatchesQuery(String key, AVQuery<?> query) {
 Map<String, Object> map =
   AVUtils.createMap("where", query.conditions.compileWhereOperationMap());
 map.put("className", query.className);
 if (query.conditions.getSkip() > 0) map.put("skip", query.conditions.getSkip());
 if (query.conditions.getLimit() > 0) map.put("limit", query.conditions.getLimit());
 if (!AVUtils.isBlankContent(query.getOrder())) map.put("order", query.getOrder());
 addWhereItem(key, "$inQuery", map);
 return this;
}
origin: cn.leancloud/leancloud-common

/**
 * Add a constraint to the query that requires a particular key's value match another AVQuery.
 * This only works on keys whose values are AVObjects or lists of AVObjects.
 *
 * @param key The key to check.
 * @param query The query that the value should match
 * @return Returns the query so you can chain this call.
 */
public AVQuery<T> whereMatchesQuery(String key, AVQuery<?> query) {
 Map<String, Object> map =
   AVUtils.createMap("where", query.conditions.compileWhereOperationMap());
 map.put("className", query.className);
 if (query.conditions.getSkip() > 0)
  map.put("skip", query.conditions.getSkip());
 if (query.conditions.getLimit() > 0)
  map.put("limit", query.conditions.getLimit());
 if (!AVUtils.isBlankContent(query.getOrder()))
  map.put("order", query.getOrder());
 addWhereItem(key, "$inQuery", map);
 return this;
}
origin: cn.leancloud/leancloud-common

/**
 * Gets a query that can be used to query the subclass objects in this relation.
 * 
 * @param clazz The AVObject subclass.
 * @return A AVQuery that restricts the results to objects in this relations.
 */
public AVQuery<T> getQuery(Class<T> clazz) {
 if (getParent() == null || AVUtils.isBlankString(getParent().getObjectId())) {
  throw new IllegalStateException("unable to encode an association with an unsaved AVObject");
 }
 Map<String, Object> map = new HashMap<String, Object>() {
  {
   put("object", AVUtils.mapFromPointerObject(AVRelation.this.getParent()));
   put("key", AVRelation.this.getKey());
  }
 };
 Map<String, Object> result = new HashMap<String, Object>();
 result.put("$relatedTo", map);
 String targetClassName = getTargetClass();
 if (AVUtils.isBlankString(getTargetClass())) {
  targetClassName = getParent().getClassName();
 }
 AVQuery<T> query = new AVQuery<T>(targetClassName, clazz);
 query.addWhereItem("$relatedTo", null, map);
 if (AVUtils.isBlankString(getTargetClass())) {
  query.getParameters().put("redirectClassNameForKey", this.getKey());
 }
 return query;
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Gets a query that can be used to query the subclass objects in this relation.
 * 
 * @param clazz The AVObject subclass.
 * @return A AVQuery that restricts the results to objects in this relations.
 */
public AVQuery<T> getQuery(Class<T> clazz) {
 if (getParent() == null || AVUtils.isBlankString(getParent().getObjectId())) {
  throw new IllegalStateException("unable to encode an association with an unsaved AVObject");
 }
 Map<String, Object> map = new HashMap<String, Object>() {
  {
   put("object", AVUtils.mapFromPointerObject(AVRelation.this.getParent()));
   put("key", AVRelation.this.getKey());
  }
 };
 Map<String, Object> result = new HashMap<String, Object>();
 result.put("$relatedTo", map);
 String targetClassName = getTargetClass();
 if (AVUtils.isBlankString(getTargetClass())) {
  targetClassName = getParent().getClassName();
 }
 AVQuery<T> query = new AVQuery<T>(targetClassName, clazz);
 query.addWhereItem("$relatedTo", null, map);
 if (AVUtils.isBlankString(getTargetClass())) {
  query.getParameters().put("redirectClassNameForKey", this.getKey());
 }
 return query;
}
com.avos.avoscloudAVQueryaddWhereItem

Popular methods of AVQuery

  • whereEqualTo
    Add a constraint to the query that requires a particular key's value to be equal to the provided val
  • <init>
  • findInBackground
    Retrieves a list of AVObjects that satisfy this query from the server in a background thread. This i
  • setLimit
    Controls the maximum number of results that are returned. Setting a negative limit denotes retrieval
  • assembleParameters
  • getClassName
    Accessor for the class name.
  • countInBackground
  • doCloudQueryInBackground
    通过cql查询对象
  • find
    Retrieves a list of AVObjects that satisfy this query. Uses the network and/or the cache, depending
  • whereNotContainedIn
    Add a constraint to the query that requires a particular key's value not be contained in the provide
  • addAndItems
  • addOrItems
  • addAndItems,
  • addOrItems,
  • doCloudQuery,
  • generateQueryPath,
  • get,
  • getFirstInBackground,
  • getInBackground,
  • getInclude,
  • getLimit

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • setRequestProperty (URLConnection)
  • Socket (java.net)
    Provides a client-side TCP socket.
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now