Tabnine Logo
PartialList.size
Code IndexAdd Tabnine to your IDE (free)

How to use
size
method
in
org.nuxeo.ecm.core.api.PartialList

Best Java code snippets using org.nuxeo.ecm.core.api.PartialList.size (Showing top 4 results out of 315)

origin: org.nuxeo.ecm.routing/nuxeo-routing-core

@Override
public void run() {
  PartialList<Map<String, Serializable>> workflows = session.queryProjection(WORKFLOWS_QUERY, limit, 0);
  numberOfCleanedUpWorkflows = workflows.size();
  for (Map<String, Serializable> workflow : workflows) {
    String routeDocId = workflow.get(ECM_UUID).toString();
    final String associatedTaskQuery = String.format(TASKS_QUERY, routeDocId);
    session.queryProjection(associatedTaskQuery, 0, 0)
        .stream()
        .map(task -> new IdRef(task.get(ECM_UUID).toString()))
        .forEach(session::removeDocument);
    session.removeDocument(new IdRef(routeDocId));
  }
}
origin: org.nuxeo.ecm.platform/nuxeo-platform-comment

  protected void writeRepliesSummary(CoreSession session, Comment entity, JsonGenerator jg) throws IOException {
    PartialList<Comment> comments = commentManager.getComments(session, entity.getId(), 1L, 0L, false);
    jg.writeNumberField(COMMENT_NUMBER_OF_REPLIES, comments.totalSize());
    if (comments.size() > 0) {
      jg.writeStringField(COMMENT_LAST_REPLY_DATE, comments.get(0).getCreationDate().toString());
    }
  }
}
origin: org.nuxeo.ecm.platform/nuxeo-rest-api-server

protected boolean hasContent(DocumentModel document, String query) throws IOException {
  try (SessionWrapper wrapper = ctx.getSession(document)) {
    // Limit result set to 1 as we just want to know if there's at least one child
    return wrapper.getSession()
           .queryProjection(String.format(query, NXQL.escapeString(document.getId())), 1, 0)
           .size() > 0;
  }
}
origin: org.nuxeo.ecm.core/nuxeo-core

DocumentModelListImpl dms = new DocumentModelListImpl(pl.size());
dms.setTotalSize(pl.totalSize());
for (Document doc : pl) {
org.nuxeo.ecm.core.apiPartialListsize

Popular methods of PartialList

  • <init>
    Constructs a partial list.
  • totalSize
    Returns the total size of the bigger list this is a part of.
  • get
  • isEmpty
  • stream

Popular in Java

  • Updating database using SQL prepared statement
  • compareTo (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Notification (javax.management)
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top plugins for WebStorm
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