Package contrib.org.hibernate.cfg

Examples of contrib.org.hibernate.cfg.DefaultNamingStrategy


  private ObjectToDocumentConverter<SimplePOJO> converter;

  @Before
  public void setUp() throws Exception {
    converter = MonjoConverterFactory.getInstance()
        .configure(new DefaultNamingStrategy())
        .getDefaultObjectConverter(SimplePOJO.class);
  }
View Full Code Here


    SimplePOJOWithStringId pojoWithStringId = new SimplePOJOWithStringId();
    pojoWithStringId.setId("abcd1234");
   
    ObjectToDocumentConverter<SimplePOJOWithStringId>
    converter = MonjoConverterFactory.getInstance()
    .configure(new DefaultNamingStrategy())
    .getDefaultObjectConverter(SimplePOJOWithStringId.class);

    DBObject document = converter.from(pojoWithStringId).toDocument();

    assertThat(document.containsField("_id"), is(true));
View Full Code Here

    SimplePOJOWithStringId pojoWithStringId = new SimplePOJOWithStringId();
    pojoWithStringId.setId("abcd1234");
   
    ObjectToDocumentConverter<SimplePOJOWithStringId>
    converter = MonjoConverterFactory.getInstance()
    .configure(new DefaultNamingStrategy())
    .getDefaultObjectConverter(SimplePOJOWithStringId.class);
   

    DBObject document = converter.from(pojoWithStringId).toDocument();
    saveToMongo(document);
View Full Code Here

    this.namingStrategy = namingStrategy;
    return this;
  }

  private MonjoConverterFactory(){
    this(new DefaultNamingStrategy());
  }
View Full Code Here

public class MonjoCursorTest extends MongoDBTest {

  @Before
  public void setUp() throws Exception {
    MonjoConverterFactory.getInstance().configure(new DefaultNamingStrategy());
    ConvertUtils.register(new StatusConverter(), Status.class);
  }
View Full Code Here

public class DirtWatcherImprovTest extends MongoDBTest {
 
  @Before
  public void setUp() throws Exception {
    MonjoConverterFactory.getInstance().configure(new DefaultNamingStrategy());
    ConvertUtils.register(new StatusConverter(), Status.class);
  }
View Full Code Here

  public DefaultDocumentToObjectConverter(Class<T> objectType) {
    this(null, objectType);
  }

  public DefaultDocumentToObjectConverter(NamingStrategy namingStrategy, Class<T> innerEntityClass) {
    this.namingStrategy=  (namingStrategy == null) ? new DefaultNamingStrategy() : namingStrategy;
    this.objectType = innerEntityClass;
  }
View Full Code Here

public class SimplePojoTest extends MongoDBTest {

  @Before
  public void setUp() throws Exception {
    MonjoConverterFactory.getInstance().configure(new DefaultNamingStrategy());
    ConvertUtils.register(new StatusConverter(), Status.class);
  }
View Full Code Here

public class UsingNonObjectIdTest extends MongoDBTest {

  @Before
  public void setUp() throws Exception {
    MonjoConverterFactory.getInstance().configure(new DefaultNamingStrategy());
    ConvertUtils.register(new StatusConverter(), Status.class);
  }
View Full Code Here

public class ComplexSaveTest extends MongoDBTest{
 
  @Before
  public void setUp() throws Exception {
    MonjoConverterFactory.getInstance()
        .configure(new DefaultNamingStrategy())
        .getDefaultObjectConverter(ListWithin.class);
  }
View Full Code Here

TOP

Related Classes of contrib.org.hibernate.cfg.DefaultNamingStrategy

Copyright © 2018 www.massapicom. 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.