Package com.tll.model.egraph

Examples of com.tll.model.egraph.EntityGraph


  public void addData(EmbeddedObjectContainer dbSession) {
    if(populator == null) throw new IllegalStateException("No populator set");
    try {
      populator.populateEntityGraph();
      final EntityGraph eg = populator.getEntityGraph();
      final Iterator<Class<?>> itr = eg.getEntityTypes();
      while(itr.hasNext()) {
        final Class<?> et = itr.next();
        log.info("Storing entities of type: " + et.getSimpleName() + "...");
        final Collection<?> ec = eg.getEntitiesByType(et);
        for(final Object e : ec) {
          log.info("Storing entity: " + e + " ...");
          dbSession.store(e);
        }
      }
View Full Code Here


      BusinessKeyFactory bkf;

      @Override
      public EntityGraph get() {
        Collection<Address> addresses = ebf.getNEntityCopies(Address.class, 500);
        EntityGraph eg = new EntityGraph(emd, bkf);
        try {
          eg.setEntities(addresses, true);
        }
        catch(Exception e) {
          throw new RuntimeException(e);
        }
        return eg;
View Full Code Here

TOP

Related Classes of com.tll.model.egraph.EntityGraph

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.