Examples of JPAPlugin


Examples of net.riccardocossu.autodoc.jpa.JPAPlugin

public class ClassParserTest {

  @Test
  public void testSimple() {
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    ClassParser parser = new ClassParser();
    AnnotatedClass res = parser.parse(AnnotatedTestEntity.class, factory);
    assertNotNull(res);
    assertEquals(1, res.getAnnotations().size());
    assertEquals(1, res.getFields().size());
View Full Code Here

Examples of net.riccardocossu.autodoc.jpa.JPAPlugin

  }

  @Test
  public void testEmbedded() {
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    ClassParser parser = new ClassParser();
    AnnotatedClass res = parser.parse(EntityWithEmbeddable.class, factory);
    assertNotNull(res);
    assertEquals(2, res.getAnnotations().size());
    assertEquals(1, res.getFields().size());
View Full Code Here

Examples of net.riccardocossu.autodoc.jpa.JPAPlugin

  }

  @Test
  public void testNonJpa() {
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    ClassParser parser = new ClassParser();
    AnnotatedClass res = parser.parse(NonJPATestEntity.class, factory);
    assertNull(res);
  }
View Full Code Here

Examples of net.riccardocossu.autodoc.jpa.JPAPlugin

  @Test
  public void testOutput() {
    PackageParser parser = new PackageParser();
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    PackageContainer pack = parser.parse(
        "net.riccardocossu.autodoc.test.model", factory);
    List<PackageContainer> packages = new ArrayList<PackageContainer>();
    packages.add(pack);
    HtmlOutputPlugin outPlugin = new HtmlOutputPlugin();
View Full Code Here

Examples of net.riccardocossu.autodoc.jpa.JPAPlugin

  @Test
  public void testJPAPlugin() {
    PackageParser parser = new PackageParser();
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new JPAPlugin());
    PackageContainer pack = parser.parse(
        "net.riccardocossu.autodoc.test.model", factory);
    assertEquals(6, pack.getClasses().size());
  }
View Full Code Here

Examples of net.riccardocossu.autodoc.jpa.JPAPlugin

  @Test
  public void testSimplestAndJPAPlugin() {
    PackageParser parser = new PackageParser();
    PluginFactory factory = new PluginFactory();
    factory.registerPlugin(new TestSimplestPlugin());
    factory.registerPlugin(new JPAPlugin());
    PackageContainer pack = parser.parse(
        "net.riccardocossu.autodoc.test.model", factory);
    assertEquals(7, pack.getClasses().size());
  }
View Full Code Here

Examples of play.db.jpa.JPAPlugin

    renderJSON(worlds);
  }

  @play.db.jpa.NoTransaction
  public static void setup() {
    JPAPlugin plugin = play.Play.plugin(JPAPlugin.class);
    plugin.startTx(true);

    // clean out the old
    World.deleteAll();
    System.out.println("DELETED");
    // in with the new
    for (long i = 0; i <= TEST_DATABASE_ROWS; i++) {
      int randomNumber = random.nextInt(TEST_DATABASE_ROWS) + 1;
      new World(i, randomNumber).save();
      if (i % 100 == 0) {

        World.em().flush();
        World.em().clear();
        System.out.println("FLUSHED : " + i + "/" + TEST_DATABASE_ROWS);

      }
    }
    System.out.println("ADDED");
    plugin.closeTx(false);
  }
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.