Tabnine Logo
MultipleResult$Builder
Code IndexAdd Tabnine to your IDE (free)

How to use
MultipleResult$Builder
in
com.nexitia.emaginplatform.core.commons.bridge

Best Java code snippets using com.nexitia.emaginplatform.core.commons.bridge.MultipleResult$Builder (Showing top 4 results out of 315)

origin: com.nexitia.emaginplatform/emagin-corebusiness-offline-services

/**
 * @throws OperationException
 * @{inheritedDoc}
 */
@Override
public IOperationResult loadAllNotification(JsonObject query) throws OperationException {
 try {
  List<JsonObject> jsons = new ArrayList<JsonObject>();
  String status = query.get("status").getAsString();
  for (String key : allNotifications.keySet()) {
   JsonObject value = allNotifications.get(key);
   if (status != null) {
    String curStatus = value.get("status").getAsString();
    if (curStatus.equalsIgnoreCase(status)) {
     jsons.add(value);
    }
   }
   else {
    jsons.add(value);
   }
  }
  IOperationResult result = new MultipleResult.Builder().addMeta("total-pages", 1).addMeta("total-elements", jsons.size()).addMeta("current-page", 0).addMeta("current-elements", jsons.size())
    .data(toOperationData(jsons)).build();
  return result;
 }
 catch (Exception e) {
  e.printStackTrace();
  throw new OperationException(e);
 }
}
origin: com.nexitia.emaginplatform/emagin-corebusiness-cloud-operations

OperationData operationData = result.getData();
MultipleResult multipleResult = new MultipleResult.Builder()
  .addData(operationData)
  .addMeta(MultipleResult.hasPreviousPage, false)
  .addMeta(MultipleResult.hasNextPage, false)
  .addMeta(MultipleResult.totalPages, 1)
  .addMeta(MultipleResult.pageNumber, 0)
  .addMeta(MultipleResult.totalPages, 1)
  .addMeta(MultipleResult.pageElements, 1)
  .addMeta(MultipleResult.totalElements, 1).build();
origin: com.nexitia.emaginplatform/emagin-jfxcore-engine

 @Override
 protected Void call() throws Exception {
  if (contentConfiguration != null) {
   if (loadFirstPageData) {
    getItems().clear();
    if (dataProvider != null) {
     setLoading();
     // @formatter:off
     final MultipleResult zero =
       new MultipleResult.Builder()
       .addMeta(IOperationResult.pageSize, pagination != null ? pagination.getCurrentPageSize() : 5)
       .addMeta(IOperationResult.pageNumber, -1).build();
     // @formatter:on
     dataProvider.navigate(controller, zero, Direction.NEXT, e -> {
      model.set(null);
      model.set(e);
     });
    } else {
     setNoContent();
    }
   } else {
    setNoContent();
   }
  }
  return null;
 }
};
origin: com.nexitia.emaginplatform/emagin-coreui-cloud-services

 /**
  * @{inheritedDoc}
  */
 @Override
 public IOperationResult getUserDashboards(JsonObject query) {
  OperationData data = new OperationData.Builder().addAttribute("icon", "fa-bookmark:24").addAttribute("translatedLabel", "Test Dashboard1").build();
  OperationData data2 = new OperationData.Builder().addAttribute("icon", "fa-bookmark:24").addAttribute("translatedLabel", "Test Dashboard2").build();

  MultipleResult result = new MultipleResult.Builder().addData(data).addData(data2).build();
  result.addMetaData(IOperationResult.totalElements, 0);
  return result;
 }
}
com.nexitia.emaginplatform.core.commons.bridgeMultipleResult$Builder

Most used methods

  • <init>
  • build
  • addMeta
  • addData
  • data

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Reference (javax.naming)
  • JLabel (javax.swing)
  • Best IntelliJ 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