Package org.ektorp.impl

Examples of org.ektorp.impl.StdCouchDbInstance


          .password("admin").url("http://localhost:5984").build();
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }

    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);

    CouchDbConnector db = null;

    db = dbInstance.createConnector("orders", false);
    OrderRepository or = new OrderRepository(db);

    List<Product> allProd = or.getAllProducts();

    Map<String,Integer> supps = new HashMap<>();
View Full Code Here


      .build();
    } catch (MalformedURLException e) {
      e.printStackTrace();
    }
   
    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);
   
    CouchDbConnector db = null;
   
    db = dbInstance.createConnector("orders", false);
    OrderRepository or = new OrderRepository(db)
    ViewResult result = null;
   
   
    System.out.println("getAvgTimePerYear");
View Full Code Here

                .username("admin")
                .password("admin")
                .url("http://localhost:5984")
                .build();
   
    CouchDbInstance dbInstance = new StdCouchDbInstance(couchClient);
    CouchDbConnector db = dbInstance.createConnector("testdb", true);
   
    DbInfo info = db.getDbInfo();
    DecimalFormat df = new DecimalFormat("#.##");

    logger.info("DB info : dbName=" + info.getDbName() + ", docCount="
View Full Code Here

        if (isConfigured()) {
            httpClient = new StdHttpClient.Builder().host(getHostname()).build();

            // set up a simple database
            couchDbInstance = new StdCouchDbInstance(httpClient);

            final String databaseName = getDatabaseName();
            if (couchDbInstance.getAllDatabases().contains(databaseName)) {
                throw new IllegalStateException("Couch DB instance already has a database called " + databaseName);
            }
View Full Code Here

        HttpClient httpClient = new StdHttpClient.Builder()
                            .host("localhost")
                            .port(5984)
                            .build();
        CouchDbInstance couch = new StdCouchDbInstance(httpClient);
        CouchDbConnector connector = couch.createConnector("test-choose", true);
        app2.setupReplication(couch, connector);



View Full Code Here

         HttpClient httpClient1 = new StdHttpClient.Builder()
                            .host("localhost")
                            .port(5984)
                            .build();
        CouchDbInstance couch1 = new StdCouchDbInstance(httpClient1);
        CouchDbConnector connector1 = couch1.createConnector("ecko-it", false);



        HttpClient httpClient2 = new StdHttpClient.Builder()
                            .host("localhost")
                            .port(5984)
                            .build();
        CouchDbInstance couch2 = new StdCouchDbInstance(httpClient2);
        try {
            couch2.deleteDatabase("eckoit-clone");
        } catch(Exception ignore) {}
       
        CouchDbConnector connector2 = couch2.createConnector("eckoit-clone", true);
        app2.copyDesignDocs(connector1, connector2);

        app2.setupReplication(couch2, connector2);

    }
View Full Code Here

            builder.password(src_password);
        }

        HttpClient httpClient = builder.build();

        CouchDbInstance dbInstance = new StdCouchDbInstance(httpClient);
        CouchDbConnector db = new StdCouchDbConnector(src_db, dbInstance);

        return db;
    }
View Full Code Here

             builder.password(password);
         }
        

         HttpClient httpClient = builder.build();
        return new StdCouchDbInstance(httpClient);
    }
View Full Code Here

        if (username != null) {
            builder.username(username);
            builder.password(password);
        }
        HttpClient httpClient  = builder.build();
        return new StdCouchDbInstance(httpClient);
    }
View Full Code Here

    public CouchDbDataContext(StdHttpClient.Builder httpClientBuilder) {
        this(httpClientBuilder.build());
    }

    public CouchDbDataContext(HttpClient httpClient, SimpleTableDef... tableDefs) {
        this(new StdCouchDbInstance(httpClient), tableDefs);
    }
View Full Code Here

TOP

Related Classes of org.ektorp.impl.StdCouchDbInstance

Copyright © 2018 www.massapicom. 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.