Codota Logo
Context.set
Code IndexAdd Codota to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: com.scireum/sirius-kernel

@Override
public Object put(String key, Object value) {
  set(key, value);
  return value;
}
origin: com.scireum/sirius-search

  @Override
  @SuppressWarnings("unchecked")
  protected Object transformToSource(Object o) {
    List<Map<String, Object>> valueList = new ArrayList<>();

    if (o instanceof Map) {
      ((Map<String, List<String>>) o).forEach((key, value) -> valueList.add(Context.create()
                                             .set(KEY, key)
                                             .set(VALUE, value)));
    }
    return valueList;
  }
}
origin: com.scireum/sirius-search

@Override
@SuppressWarnings("unchecked")
protected Object transformToSource(Object o) {
  List<Map<String, Object>> valueList = new ArrayList<>();
  if (o instanceof Map) {
    ((Map<String, String>) o).forEach((key, value) -> valueList.add(Context.create()
                                        .set(KEY, key)
                                        .set(VALUE, value)));
  }
  return valueList;
}
origin: com.scireum/sirius-kernel

/**
 * Sets the given value (its string representation), mit limits this to <tt>limit</tt> characters.
 *
 * @param key   the key to which the value should be associated
 * @param value the value which string representation should be put into the context
 * @param limit the maximal number of characters to put into the map. Everything after that will be discarded
 */
public void putLimited(String key, Object value, int limit) {
  set(key, Strings.limit(value, limit));
}
origin: com.scireum/sirius-db

@Override
protected void createEntity(SQLEntity entity, EntityDescriptor ed) throws Exception {
  Context insertData = Context.create();
  for (Property p : ed.getProperties()) {
    if (!SQLEntity.ID.getName().equals(p.getName())) {
      insertData.set(p.getPropertyName(), p.getValueForDatasource(OMA.class, entity));
    }
  }
  if (ed.isVersioned()) {
    insertData.set(VERSION, 1);
  }
  Row keys = getDatabase(ed.getRealm()).insertRow(ed.getRelationName(), insertData);
  loadCreatedId(entity, keys);
  entity.setVersion(1);
}
sirius.kernel.commonsContextset

Javadoc

Associates the given value to the given key, while returning this to permit fluent method chains

Popular methods of Context

  • create
    Creates a new context
  • put
  • entrySet
  • get
  • putAll
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • runOnUiThread (Activity)
  • getExternalFilesDir (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JButton (javax.swing)
  • JFileChooser (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now