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

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

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

origin: WuXiaolong/WoChat

  public static void queryUser(String username, FindCallback<LeanchatUser> findCallback) {
    final long a = System.currentTimeMillis();
//        AVQuery<LeanchatUser> query = new AVQuery<>("_User");
    AVQuery<LeanchatUser> query = AVObject.getQuery(LeanchatUser.class);
    query.whereEqualTo(LeanchatUser.USERNAME, username);
    query.findInBackground(findCallback);
  }

origin: cn.leancloud.android/avoscloud-sdk

public void getRolesInBackground(final AVCallback<List<AVRole>> callback) {
 AVQuery<AVRole> roleQuery = new AVQuery<AVRole>(AVRole.className);
 roleQuery.whereEqualTo(AVUSER_ENDPOINT, this);
 roleQuery.findInBackground(new FindCallback<AVRole>() {
  @Override
  public void done(List<AVRole> list, AVException e) {
   callback.internalDone(list, e);
  }
 });
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Create a query that can be used to query the parent objects in this relation.
 * 
 * @param parentClassName The parent class name
 * @param relationKey The relation field key in parent
 * @param child The child object.
 * @return A AVQuery that restricts the results to parent objects in this relations.
 */
public static <M extends AVObject> AVQuery<M> reverseQuery(String parentClassName,
  String relationKey, AVObject child) {
 AVQuery<M> query = new AVQuery<M>(parentClassName);
 query.whereEqualTo(relationKey, AVUtils.mapFromPointerObject(child));
 return query;
}
origin: cn.leancloud/leancloud-common

/**
 * Create a query that can be used to query the parent objects in this relation.
 * 
 * @param parentClassName The parent class name
 * @param relationKey The relation field key in parent
 * @param child The child object.
 * @return A AVQuery that restricts the results to parent objects in this relations.
 */
public static <M extends AVObject> AVQuery<M> reverseQuery(String parentClassName,
  String relationKey, AVObject child) {
 AVQuery<M> query = new AVQuery<M>(parentClassName);
 query.whereEqualTo(relationKey, AVUtils.mapFromPointerObject(child));
 return query;
}
origin: BaaSBeginner/leanchat-android

/**
 * 从 server 获取未读消息的数量
 */
public void countUnreadRequests(final CountCallback countCallback) {
 AVQuery<AddRequest> addRequestAVQuery = AVObject.getQuery(AddRequest.class);
 addRequestAVQuery.setCachePolicy(AVQuery.CachePolicy.NETWORK_ONLY);
 addRequestAVQuery.whereEqualTo(AddRequest.TO_USER, LeanchatUser.getCurrentUser());
 addRequestAVQuery.whereEqualTo(AddRequest.IS_READ, false);
 addRequestAVQuery.countInBackground(new CountCallback() {
  @Override
  public void done(int i, AVException e) {
   if (null != countCallback) {
    unreadAddRequestsCount = i;
    countCallback.done(i, e);
   }
  }
 });
}
origin: cn.leancloud.android/avoscloud-sdk

@JSONField(serialize = false)
public List<AVRole> getRoles() throws AVException {
 AVQuery<AVRole> roleQuery = new AVQuery<AVRole>(AVRole.className);
 roleQuery.whereEqualTo(AVUser.AVUSER_ENDPOINT, this);
 return roleQuery.find();
}
origin: cn.leancloud.android/avoscloud-push

 pushQuery.whereNotContainedIn(deviceTypeTag, DEVICE_TYPES);
} else if (pushTarget.size() == 1) {
 pushQuery.whereEqualTo(deviceTypeTag, pushTarget.toArray()[0]);
origin: cn.leancloud/java-sdk

 pushQuery.whereNotContainedIn(deviceTypeTag, DEVICE_TYPES);
} else if (pushTarget.size() == 1) {
 pushQuery.whereEqualTo(deviceTypeTag, pushTarget.toArray()[0]);
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Create a query that can be used to query the parent objects in this relation.
 * 
 * @param theParentClazz The parent subclass.
 * @param relationKey The relation field key in parent
 * @param child The child object.
 * @return A AVQuery that restricts the results to parent objects in this relations.
 */
public static <M extends AVObject> AVQuery<M> reverseQuery(Class<M> theParentClazz,
  String relationKey, AVObject child) {
 AVQuery<M> query = new AVQuery<M>(AVObject.getSubClassName(theParentClazz), theParentClazz);
 query.whereEqualTo(relationKey, AVUtils.mapFromPointerObject(child));
 return query;
}
origin: cn.leancloud/leancloud-common

/**
 * Create a query that can be used to query the parent objects in this relation.
 * 
 * @param theParentClazz The parent subclass.
 * @param relationKey The relation field key in parent
 * @param child The child object.
 * @return A AVQuery that restricts the results to parent objects in this relations.
 */
public static <M extends AVObject> AVQuery<M> reverseQuery(Class<M> theParentClazz,
  String relationKey, AVObject child) {
 AVQuery<M> query = new AVQuery<M>(AVObject.getSubClassName(theParentClazz), theParentClazz);
 query.whereEqualTo(relationKey, AVUtils.mapFromPointerObject(child));
 return query;
}
origin: BaaSBeginner/leanchat-android

private void createAddRequest(LeanchatUser toUser) throws Exception {
 LeanchatUser curUser = LeanchatUser.getCurrentUser();
 AVQuery<AddRequest> q = AVObject.getQuery(AddRequest.class);
 q.whereEqualTo(AddRequest.FROM_USER, curUser);
 q.whereEqualTo(AddRequest.TO_USER, toUser);
 q.whereEqualTo(AddRequest.STATUS, AddRequest.STATUS_WAIT);
 int count = 0;
 try {
  count = q.count();
 } catch (AVException e) {
  LogUtils.logException(e);
  if (e.getCode() == AVException.OBJECT_NOT_FOUND) {
   count = 0;
  } else {
   throw e;
  }
 }
 if (count > 0) {
  // 抛出异常,然后提示用户
  throw new IllegalStateException(App.ctx.getString(R.string.contact_alreadyCreateAddRequest));
 } else {
  AddRequest add = new AddRequest();
  add.setFromUser(curUser);
  add.setToUser(toUser);
  add.setStatus(AddRequest.STATUS_WAIT);
  add.setIsRead(false);
  add.save();
 }
}
origin: BaaSBeginner/leanchat-android

public void findAddRequests(int skip, int limit, FindCallback findCallback) {
 LeanchatUser user = LeanchatUser.getCurrentUser();
 AVQuery<AddRequest> q = AVObject.getQuery(AddRequest.class);
 q.include(AddRequest.FROM_USER);
 q.skip(skip);
 q.limit(limit);
 q.whereEqualTo(AddRequest.TO_USER, user);
 q.orderByDescending(AVObject.CREATED_AT);
 q.setCachePolicy(AVQuery.CachePolicy.NETWORK_ELSE_CACHE);
 q.findInBackground(findCallback);
}
origin: fanturbo/Kanzhibo

} else {
  AVQuery<AVObject> query = new AVQuery<>("LiveUser");
  query.whereEqualTo("uid", liveUser.getUid());
  query.findInBackground(new FindCallback<AVObject>() {
    @Override
com.avos.avoscloudAVQuerywhereEqualTo

Javadoc

Add a constraint to the query that requires a particular key's value to be equal to the provided value.

Popular methods of AVQuery

  • <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
  • addWhereItem
  • addOrItems,
  • addWhereItem,
  • doCloudQuery,
  • generateQueryPath,
  • get,
  • getFirstInBackground,
  • getInBackground,
  • getInclude,
  • getLimit

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • Permission (java.security)
    Legacy security code; do not use.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 12 Jupyter Notebook extensions
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