Examples of PartAccount


Examples of com.alvazan.test.db.PartAccount

    Assert.assertEquals(1, tradeFromSecurityPartition.size());
  }
 
  @Test
  public void testPartitioning() {
    PartAccount acc = new PartAccount();
    acc.setBusinessName("biz");
    acc.setSomeNumber(5);
   
    PartAccount acc2 = new PartAccount();
    acc.setBusinessName("biz2");
    acc.setSomeNumber(6);
   
    PartitionedTrade trade = new PartitionedTrade();
    trade.setAccount(acc);
View Full Code Here

Examples of com.alvazan.test.db.PartAccount

  }
 
 
  @Test
  public void testIndexedButNotInNoSqlDatabaseList() {
    PartAccount acc = new PartAccount();
    acc.setBusinessName("dean");
    mgr.put(acc);
    PartAccount acc2 = new PartAccount();
    acc2.setBusinessName(acc.getBusinessName());
    mgr.put(acc2);
   
    mgr.flush();
   
    //Here we have to go raw and update the index ourselves with another fake PartAccount that does
    //not exist
    NoSqlSession session = mgr.getSession();
    DboTableMeta table = mgr.find(DboTableMeta.class, "PartAccount");
    DboColumnMeta colMeta = table.getColumnMeta("businessName");
    ScanInfo info = ScanInfo.createScanInfo(colMeta, null, null);
    IndexColumn col = new IndexColumn();
    col.setColumnName("businessName");
    String key = "nonexistpk";
    byte[] pk = StandardConverters.convertToBytes(key);
    byte[] value = StandardConverters.convertToBytes(acc.getBusinessName());
    col.setIndexedValue(value);
    col.setPrimaryKey(pk);
    session.persistIndex(table, info.getIndexColFamily(), info.getRowKey(), col);
   
    mgr.flush();
   
    Iterable<KeyValue<PartAccount>> all = PartAccount.findWithBizName(mgr, acc.getBusinessName());
    List keys = new ArrayList();
    KeyValue<PartAccount> kVal = null;
    for(KeyValue<PartAccount> k : all) {
      keys.add(k);
      if(k.getKey().equals(key))
        kVal = k;
    }
   
   
    PartAccount pa = kVal.getValue();
    Assert.assertNull(pa);
   
       
//    try {
//      kVal.getValue();
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.