Package org.monjo.core.conversion

Examples of org.monjo.core.conversion.MonjoConverterFactory


    this(mongoDb, clasz, null, command);
  }

  public Monjo(DB mongoDb, Class<T> clasz, String collectionName, Command<T> command2) {
    if (collectionName == null){
      MonjoConverterFactory factory = MonjoConverterFactory.getInstance();
      collectionName = findOutCollectionName(clasz, factory)
    }
    collection = mongoDb.getCollection(collectionName);
    this.clasz = clasz;
    this.command = command2;
View Full Code Here


  public DBObject createCriteriaByExample(T example) {
    return getConverter().from(example).action(Operation.Search).toDocument();
  }

  public MonjoConverter<T> getConverter() {
    MonjoConverterFactory converterFactory = MonjoConverterFactory.getInstance();
    MonjoConverter<T> monjoConverter = converterFactory.getDefaultMonjoConverter(clasz);
    return monjoConverter;
  }
View Full Code Here

TOP

Related Classes of org.monjo.core.conversion.MonjoConverterFactory

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.