Package com.orientechnologies.orient.object.db

Examples of com.orientechnologies.orient.object.db.OObjectDatabaseTx.open()


  }

  @Test(dependsOnMethods = "testDictionaryMassiveCreate")
  public void testDictionaryWithPOJOs() throws IOException {
    OObjectDatabaseTx database = new OObjectDatabaseTx(url);
    database.open("admin", "admin");
    database.getEntityManager().registerEntityClass(ObjectDictionaryTest.class);

    Assert.assertNull(database.getDictionary().get("testKey"));
    database.getDictionary().put("testKey", new ObjectDictionaryTest());
    Assert.assertNotNull(database.getDictionary().get("testKey"));
View Full Code Here


  }

  @Test
  public void queryProjectionObjectLevel() {
    OObjectDatabaseTx db = new OObjectDatabaseTx(url);
    db.open("admin", "admin");

    List<ODocument> result = db.getUnderlying().query(
        new OSQLSynchQuery<ODocument>(" select nick, followings, followers from Profile "));

    Assert.assertTrue(result.size() != 0);
View Full Code Here

          try {
            System.out.println("(" + getDbId(tx) + ") " + "Created");

            if (tx.isClosed()) {
              tx.open("admin", "admin");
            }
            tx.getEntityManager().registerEntityClass(DummyObject.class);

            long start = System.currentTimeMillis();
            for (int j = 0; j < operations_write; j++) {
View Full Code Here

  @SuppressWarnings("unused")
  @Test
  public void testRollbackWithRemove() {
    // check if the database exists and clean before running tests
    OObjectDatabaseTx database = new OObjectDatabaseTx(url);
    database.open("admin", "admin");

    try {
      Account account = new Account();
      account.setName("John Grisham");
      account = database.save(account);
View Full Code Here

      OServer server = OServerMain.create().startup().activate();
      // create database if does not exist
      OObjectDatabaseTx database = new OObjectDatabaseTx("plocal:" + System.getProperty("ORIENTDB_HOME") + "/test-db");
      if (!database.exists())
        database.create();
      database.open("admin", "admin");
      database.countClass("ouser");
      database.close();
      server.shutdown();
    }
  }
View Full Code Here

  }

  @Test
  public void testFetchedJson() {
    OObjectDatabaseTx database = new OObjectDatabaseTx(url);
    database.open("admin", "admin");
    try {
      database.getEntityManager().registerEntityClasses("com.orientechnologies.orient.test.domain.business");
      database.getEntityManager().registerEntityClasses("com.orientechnologies.orient.test.domain.whiz");
      database.getEntityManager().registerEntityClasses("com.orientechnologies.orient.test.domain.base");
View Full Code Here

    }

    private void registerEntityClasses() {
        String modelPackage = Play.configuration.getProperty("odb.entities.package", "models");
        OObjectDatabaseTx db = new OObjectDatabaseTx(url);
        db.open(user, passwd);

        info("Registering Entities");
        for (ApplicationClass appClass : Play.classes.all()) {
            Class<?> javaClass = appClass.javaClass;
            if (javaClass.getName().startsWith(modelPackage)) {
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.