Package com.google.code.morphia

Examples of com.google.code.morphia.DatastoreImpl


    protected MessagePack msgpack;

    private int tokenLength = 10;

    public PasteItemDaoImpl(Mongo mongo, Morphia morphia, String dbName, JedisPool jedisPool) {
        ds = new DatastoreImpl(morphia, mongo, dbName);
        ds.getMapper().addMappedClass(PasteItem.class);
        this.jedisPool = jedisPool;
        msgpack = new MessagePack();
    }
View Full Code Here


public class JpyBasicDao<T, K> extends BasicDAO<T, K> implements IJpyBasicDao {
 
  private static final Log log = LogFactory.getLog(JpyBasicDao.class);

  protected JpyBasicDao(Mongo mongo, Morphia morphia, String dbName, String username, String password, boolean isAuthenticated) {
    super(new DatastoreImpl(morphia, mongo, dbName));
    if (isAuthenticated) {
      if (!this.ds.getDB().isAuthenticated() && !this.ds.getDB().authenticate(username, password.toCharArray())) {
        throw new RuntimeException("MongoDB authentication failed: " + dbName);
      }
    }
View Full Code Here

TOP

Related Classes of com.google.code.morphia.DatastoreImpl

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.