Tabnine Logo
Context.put
Code IndexAdd Tabnine to your IDE (free)

How to use
put
method
in
sirius.kernel.commons.Context

Best Java code snippets using sirius.kernel.commons.Context.put (Showing top 4 results out of 315)

origin: com.scireum/sirius-db

/**
 * Adds a parameter.
 *
 * @param parameter the name of the parameter as referenced in the SQL statement (${name} or #{name}).
 * @param value     the value of the parameter
 * @return the query itself to support fluent calls
 */
public SQLQuery set(String parameter, Object value) {
  params.put(parameter, value);
  return this;
}
origin: com.scireum/sirius-kernel

/**
 * Returns all values defined in this extension as {@link Context}.
 *
 * @return a context containing all values defined by this extension or the <tt>default</tt> extension.
 */
@Nonnull
public Context getContext() {
  Context ctx = Context.create();
  for (Map.Entry<String, ConfigValue> entry : config.entrySet()) {
    ctx.put(entry.getKey(), get(entry.getKey()).get());
  }
  return ctx;
}
origin: com.scireum/sirius-kernel

@Override
@Nonnull
public Context getContext() {
  Context ctx = Context.create();
  if (defaultConfig != null) {
    for (String key : defaultConfig.keySet()) {
      ctx.put(key, get(key).get());
    }
  }
  for (String key : configObject.keySet()) {
    ctx.put(key, get(key).get());
  }
  ctx.put("id", id);
  return ctx;
}
origin: com.scireum/sirius-search

private Script computeUpdateScript(Entity parent, boolean updateParent) {
  sirius.kernel.commons.Context ctx = sirius.kernel.commons.Context.create();
  StringBuilder sb = new StringBuilder();
  for (Reference ref : references) {
    sb.append("ctx._source.");
    sb.append(ref.getLocalProperty().getName());
    sb.append("=params.");
    sb.append(ref.getLocalProperty().getName());
    sb.append(";");
    ctx.put(ref.getLocalProperty().getName(),
        parent == null ? null : ref.getRemoteProperty().writeToSource(parent));
  }
  if (updateParent) {
    sb.append("ctx._source.");
    sb.append(getName());
    sb.append("=params.");
    sb.append(getName());
    sb.append(";");
    ctx.put(getName(), parent != null ? parent.getId() : null);
  }
  return new Script(ScriptType.INLINE, LANGUAGE_PAINLESS, sb.toString(), ctx);
}
sirius.kernel.commonsContextput

Javadoc

Sets the given value (its string representation), mit limits this to limit characters.

Popular methods of Context

  • create
    Creates a new context
  • set
    Associates the given value to the given key, while returning this to permit fluent method chains
  • entrySet
  • get
  • putAll
  • <init>

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • setContentView (Activity)
  • putExtra (Intent)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • 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