Package com.alvazan.orm.api.base

Examples of com.alvazan.orm.api.base.NoSqlEntityManager


    row2.addColumn("boolean", true);
   
    s.put("Owner", row2);
    s.flush();
   
    NoSqlEntityManager mgr2 = factory.createEntityManager();
    NoSqlTypedSession s2 = mgr2.getTypedSession();
   
    TypedRow result = s2.find("Owner", row2.getRowKey());
    byte[] unknowResult = row2.getColumn("unknown").getValueRaw();
    Assert.assertEquals(temp[1], unknowResult[1]);
    BigDecimal dec1 = row2.getColumn("decimal").getValueAsBigDecimal();
View Full Code Here


   
    s.put("MyRaceCar", row);
   
    s.flush();
   
    NoSqlEntityManager mgr2 = factory.createEntityManager();
    NoSqlTypedSession s2 = mgr2.getTypedSession();
   
    s2.remove("Owner", row2);
    s2.flush();
   
    TypedRow result = s2.find("MyRaceCar", row.getRowKey());
View Full Code Here

    //to really TEST this out, we remove the trade row to make sure we still have the Activity
    //row
    mgr.remove(trade);
    mgr.flush();
   
    NoSqlEntityManager mgr2 = factory.createEntityManager();
   
    PartitionedSingleTrade r = mgr2.find(PartitionedSingleTrade.class, trade.getId());
    Assert.assertNull(r);
   
    Activity act = mgr2.find(Activity.class, act1.getId());
    Assert.assertNotNull(act);
    Assert.assertEquals(act1.getName(), act.getName());
   
    TimeSeriesData d2 = mgr2.find(TimeSeriesData.class, d.getKey());
    Assert.assertEquals(d.getSomeName(), d2.getSomeName());
  }
View Full Code Here

  public void createEntityManager() {
    mgr = factory.createEntityManager();
  }
  @After
  public void clearDatabase() {
    NoSqlEntityManager other = factory.createEntityManager();
    other.clearDatabase(true);
  }
View Full Code Here

    mgr = factory.createEntityManager();
    setupRecords();
  }
  @After
  public void clearDatabase() {
    NoSqlEntityManager other = factory.createEntityManager();
    other.clearDatabase(true);
  }
View Full Code Here

  public void createEntityManager() {
    mgr = factory.createEntityManager();
  }
  @After
  public void clearDatabase() {
    NoSqlEntityManager other = factory.createEntityManager();
    other.clearDatabase(true);
  }
View Full Code Here

    mgr = factory.createEntityManager();
    setupRecords();
  }
  @After
  public void clearDatabase() {
    NoSqlEntityManager other = factory.createEntityManager();
    other.clearDatabase(true);
  }
View Full Code Here

    mgr = factory.createEntityManager();
  }
 
  @After
  public void clearDatabase() {
    NoSqlEntityManager other = factory.createEntityManager();
    other.clearDatabase(true);
  }
View Full Code Here

    mgr = factory.createEntityManager();
    setupRecords();
  }
  @After
  public void clearDatabase() {
    NoSqlEntityManager other = factory.createEntityManager();
    other.clearDatabase(true);
  }
View Full Code Here

  }
  public void runImpl() {
    if(listener == null)
      return; //no need to do anything
   
    NoSqlEntityManager mgr = factory.createEntityManager();
    Cursor<KeyValue<WebNodeDbo>> cursor = WebNodeDbo.findAllNodes(mgr);
    List<WebNodeDbo> all = new ArrayList<WebNodeDbo>();
    List<WebNodeDbo> servers = new ArrayList<WebNodeDbo>();
    while(cursor.next()) {
      KeyValue<WebNodeDbo> kv = cursor.getCurrent();
      WebNodeDbo val = kv.getValue();
      all.add(val);
      if(log.isDebugEnabled())
        log.debug("checking node="+val.getWebServerName());
      if(isServerUp(mgr, val)) {
        if(log.isDebugEnabled())
          log.debug("server is up="+val.getWebServerName());
        servers.add(val);
      }
      if(val.getWebServerName().equals(config.getHostName())) {
        if(log.isDebugEnabled())
          log.debug("saving our node to be up="+val.getWebServerName());
        saveNodeIsUp(mgr, val);
      }
    }

    mgr.clear();
   
    Collections.sort(servers, new ServerComparator());
    int serverNumber = -1;
    for(int i = 0; i < servers.size(); i++) {
      WebNodeDbo node = servers.get(i);
View Full Code Here

TOP

Related Classes of com.alvazan.orm.api.base.NoSqlEntityManager

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.