Examples of entityClass()


Examples of com.tll.model.IEntity.entityClass()

    e = dao.persist(e);
    getDbTrans().endTrans(); // rollback

    getDbTrans().startTrans();
    try {
      e = dao.load(e.entityClass(), e.getId());
      Assert.fail("Loaded entity that should not have been committed into the db due to trans rollback");
    }
    catch(final EntityNotFoundException ex) {
      // expected
    }
View Full Code Here

Examples of com.tll.model.IEntity.entityClass()

          "Created time stamp entity does not have a modify date");
    }

    // retrieve
    getDbTrans().startTrans();
    e = dao.load(e.entityClass(), e.getId());
    Assert.assertNotNull(e, "The loaded entity is null");
    entityHandler.verifyLoadedEntityState(e);
    getDbTrans().setComplete(); // we need to do this for JDO in order to ensure a detached copy is made
    getDbTrans().endTrans();
View Full Code Here

Examples of com.tll.model.IEntity.entityClass()

    getDbTrans().setComplete();
    getDbTrans().endTrans();

    // find (update verify)
    getDbTrans().startTrans();
    e = getEntityFromDb(e.entityClass(), e.getId());
    Assert.assertNotNull(e, "The retrieved entity for update check is null");
    getDbTrans().setComplete();
    getDbTrans().endTrans();
    entityHandler.verifyEntityAlteration(e);
View Full Code Here

Examples of com.tll.model.IEntity.entityClass()

    // verify purge
    getDbTrans().startTrans();
    getDbTrans().setComplete();
    try {
      e = getEntityFromDb(e.entityClass(), e.getId());
      Assert.assertNull(e, "The entity was not purged");
    }
    catch(final EntityNotFoundException ex) {
      // expected
    }
View Full Code Here

Examples of com.tll.model.IEntity.entityClass()

    getDbTrans().setComplete();
    getDbTrans().endTrans();
    getDbTrans().startTrans();

    // delete it (with key)
    dao.purge(e.entityClass(), pk);

    getDbTrans().setComplete();
    getDbTrans().endTrans();
    getDbTrans().startTrans();
View Full Code Here

Examples of com.tll.model.IEntity.entityClass()

    e = dao.persist(e);
    getDbTrans().setComplete();
    getDbTrans().endTrans();

    final Criteria<IEntity> c = new Criteria<IEntity>(entityHandler.entityClass());
    c.getPrimaryGroup().addCriterion(e.entityClass(), e.getId());
    getDbTrans().startTrans();
    final IEntity re = dao.findEntity(c);
    Assert.assertTrue(re != null);
    Assert.assertEquals(re, e);
  }
View Full Code Here

Examples of com.tll.model.IEntity.entityClass()

          final boolean reference = ri.isReference();
          if(shouldMarshalRelation(reference, depth, options)) {
            final IEntity e = (IEntity) obj;
            final Model m = e == null ? null : marshalEntity(e, options, visited, depth + 1);
            final IEntityType etype =
              ri.getRelatedType() == null ? null : etResolver.resolveEntityType(e == null ? ri.getRelatedType() : e
                  .entityClass());
            prop = new RelatedOneProperty(etype, m, pname, reference);
          }
        }
View Full Code Here

Examples of com.tll.model.INamedEntity.entityClass()

      getDbTrans().endTrans();

      getDbTrans().startTrans();
      final Criteria<IEntity> c = new Criteria<IEntity>(entityHandler.entityClass());
      c.getPrimaryGroup().addCriterion(
          new NameKey(e.entityClass(), e.getName(), entityHandler.getActualNameProperty()), true);
      final IEntity re = dao.findEntity(c);
      Assert.assertTrue(re != null);
      if(re != null) Assert.assertEquals(re, e);
    }
  }
View Full Code Here

Examples of com.tll.model.INamedEntity.entityClass()

      setComplete();
      endTransaction();

      startNewTransaction();
      final Criteria<IEntity> c = new Criteria<IEntity>(entityHandler.entityClass());
      c.getPrimaryGroup().addCriterion(new NameKey(e.entityClass(), e.getName()), true);
    }
  }

  @SuppressWarnings("unchecked")
  final void daoFindEntityByCriteria() throws Exception {
View Full Code Here

Examples of org.infinispan.loaders.jpa.configuration.JpaCacheStoreConfiguration.entityClass()

   
    CacheLoaderConfiguration cacheLoaderConfig = cacheConfig.loaders().cacheLoaders().get(0);
    assert cacheLoaderConfig instanceof JpaCacheStoreConfiguration;
    JpaCacheStoreConfiguration jpaCacheLoaderConfig = (JpaCacheStoreConfiguration) cacheLoaderConfig;
    assert jpaCacheLoaderConfig.persistenceUnitName().equals("org.infinispan.loaders.jpa.configurationTest");
    assert jpaCacheLoaderConfig.entityClass().equals(User.class);

    EmbeddedCacheManager cacheManager = new DefaultCacheManager(
        globalConfig);

    cacheManager.defineConfiguration("userCache", cacheConfig);
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.