Tabnine Logo
PageList.setTotalSize
Code IndexAdd Tabnine to your IDE (free)

How to use
setTotalSize
method
in
org.rhq.core.domain.util.PageList

Best Java code snippets using org.rhq.core.domain.util.PageList.setTotalSize (Showing top 1 results out of 315)

origin: org.rhq/rhq-enterprise-server

public PageList<Subject> findSubjectsByCriteria(Subject subject, SubjectCriteria criteria) {
  CriteriaQueryGenerator generator = new CriteriaQueryGenerator(subject, criteria);
  CriteriaQueryRunner<Subject> queryRunner = new CriteriaQueryRunner<Subject>(criteria, generator, entityManager);
  PageList<Subject> subjects = queryRunner.execute();
  boolean canViewUsers = (authorizationManager.isSystemSuperuser(subject)
    || authorizationManager.hasGlobalPermission(subject, Permission.MANAGE_SECURITY) || authorizationManager
    .hasGlobalPermission(subject, Permission.VIEW_USERS));
  if (!canViewUsers) {
    if (subjects.contains(subject)) {
      Subject attachedSubject = subjects.get(subjects.indexOf(subject));
      subjects.clear();
      subjects.add(attachedSubject);
    } else {
      subjects.clear();
    }
    subjects.setTotalSize(subjects.size());
  }
  return subjects;
}
org.rhq.core.domain.utilPageListsetTotalSize

Javadoc

Sets the total size of the "master list" that this page is a subset of.

Popular methods of PageList

  • size
  • <init>
    Using this constructor one obtains a PageList instance that contains no data but it has an associate
  • get
  • getTotalSize
    Returns the total size of the "master list" that this page is a subset of.Note: This method merely r
  • addAll
  • clear
  • getPageControl
  • isEmpty
  • add
  • contains
  • containsAll
  • indexOf
  • containsAll,
  • indexOf,
  • iterator,
  • remove

Popular in Java

  • Reactive rest calls using spring rest template
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • setContentView (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • BoxLayout (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • 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