Package org.jugile.util

Examples of org.jugile.util.CsvTokenizer


 
  protected int readDeltasFromQueue(String node, int max) throws Exception {
    int count = 0;
    for (Msg m : DBQueue.getMessages(node, max)) {
      String delta = m.getMsg();
      CsvTokenizer t = CsvTokenizer.parseString(delta,Bo.CSVDELIMITER);
      modifyDomain(t);
      count++;
    }
    return count;
  }
View Full Code Here


  }

  // ========= domain core data modifiers ============
 
  protected int modifyDomain(String delta) {
    CsvTokenizer t = CsvTokenizer.parseString(delta,Bo.CSVDELIMITER)
    try {
      return cd().modifyDomain(t);
    } catch (Exception e) {
      log.fatal("could not modify domain", e);
      fail(e); return 0;
    } finally {
      t.close();
    }
  }
View Full Code Here

  }
 
  public int loadFromCsvZip(String fname) { return loadFromCsv(zipInputStream(fname));}
  public int loadFromCsv(String fname) { return loadFromCsv(inputStream(fname));}
  public int loadFromCsv(InputStream is) {
    CsvTokenizer t = new CsvTokenizer(is);
    t.setDelimiter(Bo.CSVDELIMITER)
    uow.get().startWriteTx();
    try {
      int count = cd().modifyDomain(t);
      HiLo.setNextid(count + 100L);
      log.info("loaded " + count + " items. updated HiLo, nextid now: " + HiLo.nextid());
View Full Code Here

TOP

Related Classes of org.jugile.util.CsvTokenizer

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.