Examples of MongoDB


Examples of com.datasift.client.push.connectors.MongoDB

    public static Http http() {
        return new Http();
    }

    public static MongoDB mongoDB() {
        return new MongoDB();
    }
View Full Code Here

Examples of org.apache.jmeter.protocol.mongodb.mongo.MongoDB

     * @param login
     * @param password
     * @return {@link DB}
     */
    public static DB getDBFromSource(String varName, String dbName, String login, String password) {
        MongoDB mongodb = (MongoDB) JMeterContextService.getContext().getVariables().getObject(varName);
        return mongodb.getDB(dbName, login, password);
    }
View Full Code Here

Examples of org.apache.jmeter.protocol.mongodb.mongo.MongoDB

        else {
            if(log.isDebugEnabled()) {
                log.debug(getSource() + "  is being defined.");
            }
            try {
                getThreadContext().getVariables().putObject(getSource(), new MongoDB(MongoUtils.toServerAddresses(getConnection()), mongoOptions));
            } catch (UnknownHostException e) {
                throw new IllegalStateException(e);
            }
        }
    }
View Full Code Here

Examples of org.apache.jmeter.protocol.mongodb.mongo.MongoDB

        res.setDataType(SampleResult.TEXT);
        res.setContentType("text/plain"); // $NON-NLS-1$
        res.sampleStart();

        try {
            MongoDB mongoDB = MongoSourceElement.getMongoDB(getSource());
            MongoScriptRunner runner = new MongoScriptRunner();
            DB db = mongoDB.getDB(getDatabase(), getUsername(), getPassword());
            res.latencyEnd();
            Object result = runner.evaluate(db, data);
            EvalResultHandler handler = new EvalResultHandler();
            String resultAsString = handler.handle(result);
            res.setResponseData(resultAsString.getBytes());
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.MongoDB

  private AppendableConfigurationContext context;

  @Before
  public void setupBuilder() {
    context = new AppendableConfigurationContext();
    mongoOptions = new MongoDB().getConfigurationBuilder( new ConfigurationContextImpl( context ) );
  }
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.MongoDB

  public void setupConfigurationMapAndContexts() {
    cfg = new HashMap<String, Object>();
    cfg.put( OgmProperties.DATABASE, "database" );

    context = new AppendableConfigurationContext();
    configuration = new MongoDB().getConfigurationBuilder( new ConfigurationContextImpl( context ) );

    reader = new ConfigurationPropertyReader( cfg, new ClassLoaderServiceImpl() );
  }
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.MongoDB

  private AppendableConfigurationContext context;

  @Before
  public void setupBuilder() {
    context = new AppendableConfigurationContext();
    mongoOptions = new MongoDB().getConfigurationBuilder( new ConfigurationContextImpl( context ) );
  }
View Full Code Here

Examples of org.hibernate.ogm.datastore.mongodb.MongoDB

  @Test
  public void testAssociationStorageMappingOption() throws Exception {
    AppendableConfigurationContext context = new AppendableConfigurationContext();
    ConfigurationContext configurationContext = new ConfigurationContextImpl( context );

    new MongoDB().getConfigurationBuilder( configurationContext )
      .entity( ExampleForMongoDBMapping.class )
        .property( "content", ElementType.FIELD )
          .associationStorage( AssociationStorageType.ASSOCIATION_DOCUMENT );

    OptionsContainer options = new ProgrammaticOptionValueSource( context ).getPropertyOptions( ExampleForMongoDBMapping.class, "content" );
View Full Code Here

Examples of org.melonbrew.fe.database.databases.MongoDB

        Phrase.init(this);

        databases.add(new MySQLDB(this));
        databases.add(new SQLiteDB(this));
        databases.add(new MongoDB(this));

        for (Database database : databases) {
            String name = database.getConfigName();

            ConfigurationSection section = getConfig().getConfigurationSection(name);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.