Package com.mysema.query.mongodb.domain

Examples of com.mysema.query.mongodb.domain.User


    @Before
    public void before() throws UnknownHostException, MongoException {
        ds.delete(ds.createQuery(User.class));

        User friend1 = new User("Max", null);
        User friend2 = new User("Jack", null);
        User friend3 = new User("Bob", null);
        ds.save(friend1, friend2, friend3);

        User user1 = new User("Jane", null, friend1);
        User user2 = new User("Mary", null, user1);
        User user3 = new User("Ann", null, friend3);
        ds.save(user1, user2, user3);

        User user4 = new User("Mike", null);
        user4.setFriend(user2);
        user4.setEnemy(user3);
        ds.save(user4);

        User user5 = new User("Bart", null);
        user5.addFriend(user2);
        user5.addFriend(user3);
        ds.save(user5);

    }
View Full Code Here

TOP

Related Classes of com.mysema.query.mongodb.domain.User

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.