Package org.mongodb.morphia

Examples of org.mongodb.morphia.Morphia.createDatastore()


        mapper.getConverters().addConverter(new AxisListConverter());
        mapper.getConverters().addConverter(new ResultConverter());
        mapper.getOptions().setActLikeSerializer(true);
        mapper.getOptions().objectFactory = new CustomMorphiaObjectFactory(MongoRepository.class.getClassLoader());

        Datastore datastore = morphia.createDatastore(new Fongo(SetupConfig.get().getDbName()).getMongo(), SetupConfig.get().getDbName());

        Whitebox.setInternalState(MongoRepository.class, "datastore", datastore);
    }

    @After
View Full Code Here


        } catch (UnknownHostException e) {
            throw new RuntimeException(e.getMessage(), e);
        }
        String databaseName = SetupConfig.get().getDbName();

        return morphia.createDatastore(mongo, databaseName);
    }

}
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.