Examples of createEntityManager()


Examples of com.alvazan.orm.api.base.NoSqlEntityManagerFactory.createEntityManager()

 
  public static void main(String[] args) {
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put(Bootstrap.AUTO_CREATE_KEY, "create");
    NoSqlEntityManagerFactory factory = Bootstrap.create(DbTypeEnum.IN_MEMORY, properties,null,null);
    mgr = factory.createEntityManager();
    createTestData();
    processSQL(args);
  }
  /**
     *
 
View Full Code Here

Examples of com.impetus.kundera.persistence.EntityManagerFactoryImpl.createEntityManager()

     */
    @Test
    public void test()
    {
        EntityManagerFactoryImpl emf = getEntityManagerFactory();
        EntityManager em = emf.createEntityManager();
        CassandraEntitySample entity = new CassandraEntitySample();
        entity.setKey("123");
        entity.setFull_name("kuldeep mishra");
        entity.setState("delhi");
        // birth_date is null
View Full Code Here

Examples of de.mhus.lib.jpa.JpaManager.createEntityManager()

    BookStoreSchema schema = new BookStoreSchema();
    prop.setSchema(schema);
   
    JpaManager manager = new JpaManager(prop);
   
    JpaEntityManager em = manager.createEntityManager();
   
    em.begin();
   
    Book book1 = new Book();
    book1.setName("Oh wie schoen ist Panama");
View Full Code Here

Examples of javax.persistence.EntityManagerFactory.createEntityManager()

          emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");
        }
          em = emf.createEntityManager();
      } else {
        EntityManagerFactory emf = (EntityManagerFactory) env.get(EnvironmentName.ENTITY_MANAGER_FACTORY);
        em = emf.createEntityManager()
      }
    } 
    return em;
  }
 
View Full Code Here

Examples of javax.persistence.EntityManagerFactory.createEntityManager()

  public void fill() throws JRException
  {
    long start = System.currentTimeMillis();
    // create entity manager factory for connection with database
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("pu1", new HashMap());
    EntityManager em = emf.createEntityManager();

    try
    {
      Map parameters = getParameters(em);
     
View Full Code Here

Examples of javax.persistence.EntityManagerFactory.createEntityManager()

    public boolean testEntityManagerFactory() {
        try {
            EntityManagerFactory entityManagerFactory = (EntityManagerFactory) new InitialContext().lookup("java:comp/env/jpa/testEMF");
            System.out.println("Accessed entity manager factory");
            EntityManager entityManager = entityManagerFactory.createEntityManager();
            AllFieldTypes allFieldTypes = new AllFieldTypes();
            entityManager.persist(allFieldTypes);
            System.out.println("saved object");
            entityManager.close();
            System.out.println("Closed entity manager");
View Full Code Here

Examples of javax.persistence.EntityManagerFactory.createEntityManager()

    final EntityManagerFactory emf = Persistence.createEntityManagerFactory( "jpajtastandalone", TestHelper.getEnvironmentProperties() );

    TransactionManager transactionManager = extractJBossTransactionManager( emf );

    transactionManager.begin();
    final EntityManager em = emf.createEntityManager();
    Poem poem = new Poem();
    poem.setName( "L'albatros" );
    em.persist( poem );
    transactionManager.commit();
View Full Code Here

Examples of javax.persistence.EntityManagerFactory.createEntityManager()

  @Test
  public void testJTAStandalone() throws Exception {
    final EntityManagerFactory emf = Persistence.createEntityManagerFactory( "jpajtastandalone", TestHelper.getEnvironmentProperties() );
    try {

      final EntityManager em = emf.createEntityManager();
      try {

        em.getTransaction().begin();
        Poem poem = new Poem();
        poem.setName( "L'albatros" );
View Full Code Here

Examples of javax.persistence.EntityManagerFactory.createEntityManager()

  @Test
  public void testWrappedStandalone() throws Exception {
    final EntityManagerFactory emf = Persistence.createEntityManagerFactory( "jpajtastandalone", TestHelper.getEnvironmentProperties() );
    assertThat( emf.getClass() ).isEqualTo( OgmEntityManagerFactory.class );

    EntityManager em = emf.createEntityManager();
    assertThat( em.getClass() ).isEqualTo( OgmEntityManager.class );
    em.close();

    em = emf.createEntityManager( new HashMap() );
    assertThat( em.getClass() ).isEqualTo( OgmEntityManager.class );
View Full Code Here

Examples of javax.persistence.EntityManagerFactory.createEntityManager()

    EntityManager em = emf.createEntityManager();
    assertThat( em.getClass() ).isEqualTo( OgmEntityManager.class );
    em.close();

    em = emf.createEntityManager( new HashMap() );
    assertThat( em.getClass() ).isEqualTo( OgmEntityManager.class );
    em.close();

    emf.close();
  }
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.