Examples of EntityGraph


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

Examples of com.tll.model.egraph.EntityGraph

      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

Examples of com.tll.model.test.EntityGraph

      @Inject
      IEntityGraphPopulator builder;

      @Override
      public EntityGraph get() {
        final EntityGraph graph = new EntityGraph();
        builder.setEntityGraph(graph);
        // builder.populateEntityGraph();
        return graph;
      }
    }).asEagerSingleton();
View Full Code Here

Examples of com.tll.model.test.EntityGraph

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

Examples of com.tll.model.test.EntityGraph

   * @throws Exception Upon failure
   */
  public void testCircularEntity() throws Exception {
    final TestPersistenceUnitEntityGraphBuilder entityGraphBuilder =
      new TestPersistenceUnitEntityGraphBuilder(getEntityBeanFactory());
    final EntityGraph entityGraph = new EntityGraph();
    entityGraphBuilder.setEntityGraph(entityGraph);
    entityGraphBuilder.populateEntityGraph();
    final Marshaler marshaler = getMarshaler();

    // wire up a circular entity
    final Collection<Account> accounts = entityGraph.getEntitiesByType(Account.class);
    // NOTE: we expect 3 of them per test-persistence-unit jar
    final Iterator<Account> aitr = accounts.iterator();
    final Account account = aitr.next(), parent = aitr.next();
    account.setParent(parent);
    parent.setParent(account);
View Full Code Here

Examples of org.apache.falcon.entity.v0.EntityGraph

        }

        // Is actually an update. Need to iterate over all the processes
        // depending on this feed and see if they are valid with the new
        // feed reference
        EntityGraph graph = EntityGraph.get();
        Set<Entity> referenced = graph.getDependents(oldFeed);
        Set<Process> processes = findProcesses(referenced);
        if (processes.isEmpty()) {
            return;
        }
View Full Code Here

Examples of org.apache.falcon.entity.v0.EntityGraph

        }

        // Is actually an update. Need to iterate over all the processes
        // depending on this feed and see if they are valid with the new
        // feed reference
        EntityGraph graph = EntityGraph.get();
        Set<Entity> referenced = graph.getDependents(oldFeed);
        Set<Process> processes = findProcesses(referenced);
        if (processes.isEmpty()) {
            return;
        }
View Full Code Here

Examples of org.apache.falcon.entity.v0.EntityGraph

        }

        // Is actually an update. Need to iterate over all the processes
        // depending on this feed and see if they are valid with the new
        // feed reference
        EntityGraph graph = EntityGraph.get();
        Set<Entity> referenced = graph.getDependents(oldFeed);
        Set<Process> processes = findProcesses(referenced);
        if (processes.isEmpty()) {
            return;
        }
View Full Code Here

Examples of org.apache.ivory.entity.v0.EntityGraph

            return; // Not an update case

        // Is actually an update. Need to iterate over all the processes
        // depending on this feed and see if they are valid with the new
        // feed reference
        EntityGraph graph = EntityGraph.get();
        Set<Entity> referenced = graph.getDependents(oldFeed);
        Set<Process> processes = findProcesses(referenced);
        if (processes.isEmpty())
            return;

        ensureValidityFor(feed, processes);
View Full Code Here

Examples of org.glassfish.jersey.message.filtering.spi.EntityGraph

    @Override
    public Result process(final EntityProcessorContext context) {
        switch (context.getType()) {
            case CLASS_READER:
            case CLASS_WRITER:
                final EntityGraph graph = context.getEntityGraph();
                if (graph.getFilteringScopes().isEmpty()) {
                    graph.addFilteringScopes(FilteringHelper.getDefaultFilteringScope());
                }
                return Result.APPLY;

            case PROPERTY_READER:
            case PROPERTY_WRITER:
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.