Examples of HibernateModule


Examples of com.codahale.shore.modules.HibernateModule

      properties.setProperty(Environment.SHOW_SQL, "true");
      properties.setProperty(Environment.HBM2DDL_AUTO, "create-drop");
    }
   
    protected HibernateModule createModule() throws Exception {
      return new HibernateModule(
        logger,
        properties,
        ImmutableList.of("com.codahale.shore.modules.test.fixtures")
      );
    }
View Full Code Here

Examples of com.codahale.shore.modules.HibernateModule

   
    try {
      final Logger silentLogger = Logger.getLogger(SchemaCommand.class.getCanonicalName());
      silentLogger.setLevel(Level.OFF);
     
      final HibernateModule module = new HibernateModule(silentLogger, properties, configuration.getEntityPackages());
      final AnnotationConfiguration hibernateConfig = module.getConfiguration();
      final Settings settings = hibernateConfig.buildSettings();
     
     
     
      if (migration) {
View Full Code Here

Examples of com.codahale.shore.modules.HibernateModule

      )
    );
  }

  private Module buildHibernateModule() {
    return new HibernateModule(LOGGER, properties, configuration.getEntityPackages());
  }
View Full Code Here

Examples of com.fasterxml.jackson.module.hibernate.HibernateModule

import com.fasterxml.jackson.module.hibernate.HibernateModule;

public class HibernateAwareObjectMapper extends ObjectMapper {
  public HibernateAwareObjectMapper() {
    HibernateModule hm = new HibernateModule();
    registerModule(hm);
    configure(Feature.FAIL_ON_EMPTY_BEANS, false);
  }
View Full Code Here

Examples of javango.contrib.hibernate.HibernateModule

import junit.framework.TestCase;

public class HibernateManagerTest extends TestCase {

  public void testManagerFactory() throws Exception {
      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
View Full Code Here

Examples of javango.contrib.hibernate.HibernateModule

     
      assertNotNull(poll);
  }
 
  public void testPk() throws Exception {
      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
View Full Code Here

Examples of javango.contrib.hibernate.HibernateModule

      assertEquals(Long.class, keyClasses[0]);
      assertEquals(1L, manager.getPk(poll));
  }
 
  public void testSearch() throws Exception {
      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
View Full Code Here

Examples of javango.contrib.hibernate.HibernateModule

      assertEquals(2, choiceManager.filter("poll__question", "What is this").count());

  }
 
  public void testPropertySearch() throws Exception {
    Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
View Full Code Here

Examples of javango.contrib.hibernate.HibernateModule

      assertEquals(2, choiceManager.filterByProperty("id__ne", "votes").count());
      assertEquals(2, choiceManager.filterByProperty("id__gt", "votes").count());
  }
 
  public void testMultipleJoinSearches() throws Exception {
      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
View Full Code Here

Examples of javango.contrib.hibernate.HibernateModule

      qs = qs.filter("poll__id__eq", 2L);
      assertEquals(0, qs.count());
  }
 
  public void testMultipleJoins() throws Exception {
      Injector injector = Guice.createInjector(new HibernateModule());
    AnnotationConfiguration cfg = injector.getInstance(HibernateUtil.class).getConfiguration();   
    new SchemaExport(cfg).drop(false, true);
    new SchemaExport(cfg).create(false, true);
   
      Managers managers = injector.getInstance(Managers.class);     
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.