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

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

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

origin: cn.leancloud.android/avoscloud-sdk

protected int count(boolean needsLock) {
 final int[] value = {0};
 countInBackground(true, new CountCallback() {
  @Override
  public void done(int count, AVException e) {
   value[0] = count;
  }
 });
 return value[0];
}
origin: cn.leancloud/leancloud-common

protected int count(boolean needsLock) {
 final int[] value = {0};
 countInBackground(true, new CountCallback() {
  @Override
  public void done(int count, AVException e) {
   value[0] = count;
  }
 });
 return value[0];
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Counts the number of objects that match this query in a background thread. This does not use
 * caching.
 *
 * @param callback callback.done(count, e) will be called when the count completes.
 */
public void countInBackground(CountCallback callback) {
 this.countInBackground(false, callback);
}
origin: cn.leancloud/leancloud-common

/**
 * Counts the number of objects that match this query in a background thread. This does not use
 * caching.
 *
 * @param callback callback.done(count, e) will be called when the count completes.
 */
public void countInBackground(CountCallback callback) {
 this.countInBackground(false, callback);
}
origin: cn.leancloud.android/avoscloud-sdk

/**
 * Counts the number of objects that match this query. This does not use caching.
 */
public int count() throws AVException {
 final int[] value = {0};
 countInBackground(true, new CountCallback() {
  @Override
  public void done(int count, AVException e) {
   if (e == null) {
    value[0] = count;
   } else {
    AVExceptionHolder.add(e);
   }
  }
  @Override
  protected boolean mustRunOnUIThread() {
   return false;
  }
 });
 if (AVExceptionHolder.exists()) {
  throw AVExceptionHolder.remove();
 }
 return value[0];
}
origin: cn.leancloud/leancloud-common

/**
 * Counts the number of objects that match this query. This does not use caching.
 */
public int count() throws AVException {
 final int[] value = {0};
 countInBackground(true, new CountCallback() {
  @Override
  public void done(int count, AVException e) {
   if (e == null) {
    value[0] = count;
   } else {
    AVExceptionHolder.add(e);
   }
  }
  @Override
  protected boolean mustRunOnUIThread() {
   return false;
  }
 });
 if (AVExceptionHolder.exists()) {
  throw AVExceptionHolder.remove();
 }
 return value[0];
}
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);
   }
  }
 });
}
com.avos.avoscloudAVQuerycountInBackground

Javadoc

Counts the number of objects that match this query in a background thread. This does not use caching.

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.
  • 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

  • Start an intent from android
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Path (java.nio.file)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Top Sublime Text plugins
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