Codota Logo
User$UserConfiguration.get
Code IndexAdd Codota to your IDE (free)

How to use
get
method
in
org.opencb.opencga.core.models.User$UserConfiguration

Best Java code snippets using org.opencb.opencga.core.models.User$UserConfiguration.get (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: opencb/opencga

public List<Filter> getFilters() {
  Object object = get(FILTERS);
  if (object == null) {
    return new LinkedList<>();
  }
  if (isListFilters(object)) {
    return (List<Filter>) object;
  } else {
    //convert with objectMapper
    List<Filter> filters = new ArrayList<>();
    try {
      if (objectMapper == null) {
        objectMapper = new ObjectMapper();
        objectReader = objectMapper.readerFor(Filter.class);
      }
      for (Object filterObject : ((List) object)) {
        filters.add(objectReader.readValue(objectMapper.writeValueAsString(filterObject)));
      }
      setFilters(filters);
      return filters;
    } catch (IOException e) {
      throw new UncheckedIOException(e);
    }
  }
}
origin: opencb/opencga

if (StringUtils.isNotEmpty(name) && configs.get(name) == null) {
  throw new CatalogException("Error: Cannot fetch configuration with name " + name + ". Configuration name not found.");
Map configMap = StringUtils.isEmpty(name) ? configs : (Map) configs.get(name);
origin: opencb/opencga

@Test
public void modifyUserTest() throws CatalogDBException {
  ObjectMap genomeMapsConfig = new ObjectMap("lastPosition", "4:1222222:1333333");
  genomeMapsConfig.put("otherConf", Arrays.asList(1, 2, 3, 4, 5));
  catalogUserDBAdaptor.setConfig(user1.getId(), "genomemaps", genomeMapsConfig);
  User user = catalogUserDBAdaptor.get(user1.getId(), null, null).first();
  assertNotNull(user.getConfigs().get("genomemaps"));
  Map<String, Object> genomemaps = (Map<String, Object>) user.getConfigs().get("genomemaps");
  assertNotNull(genomemaps.get("otherConf"));
  assertNotNull(genomemaps.get("lastPosition"));
}
origin: opencb/opencga

@Override
public QueryResult setConfig(String userId, String name, Map<String, Object> config) throws CatalogDBException {
  long startTime = startQuery();
  // Set the config
  Bson bsonQuery = Filters.eq(QueryParams.ID.key(), userId);
  Bson filterDocument = getMongoDBDocument(config, "Config");
  Bson update = Updates.set(QueryParams.CONFIGS.key() + "." + name, filterDocument);
  QueryResult<UpdateResult> queryResult = userCollection.update(bsonQuery, update, null);
  if (queryResult.first().getModifiedCount() == 0) {
    throw new CatalogDBException("Could not create " + name + " configuration ");
  }
  QueryResult<User> userQueryResult = get(userId, new QueryOptions(), "");
  if (userQueryResult.getNumResults() == 0) {
    throw new CatalogDBException("Internal error: Could not retrieve user " + userId + " information");
  }
  return endQuery("Set config", startTime, Arrays.asList(userQueryResult.first().getConfigs().get(name)));
}
origin: opencb/opencga

if (configs.get(name) == null) {
  throw new CatalogException("Error: Cannot delete configuration with name " + name + ". Configuration name not found.");
return new QueryResult("Delete configuration", queryResult.getDbTime(), 1, 1, "", "", Arrays.asList(configs.get(name)));
org.opencb.opencga.core.modelsUser$UserConfigurationget

Popular methods of User$UserConfiguration

  • getFilters
  • <init>
  • isListFilters
  • put
  • remove
  • setFilters

Popular in Java

  • Parsing JSON documents to java classes using gson
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • Menu (java.awt)
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JList (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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