Package com.mongodb

Examples of com.mongodb.DefaultDBDecoder$DefaultFactory


    final MyEntity entity = new MyEntity(1l, new A(2));
    final DBObject dbObject = morphia.toDBObject(entity);

    final byte[] data = new DefaultDBEncoder().encode(dbObject);

    final DBObject decoded = new DefaultDBDecoder().decode(data,
        (DBCollection) null);
    // fails with a
    // com.github.jmkgreen.morphia.mapping.MappingException: No usable
    // constructor
    // for InheritanceTest$A
View Full Code Here


        final MyEntity entity = new MyEntity(1L, new ValueObject(2L));
        final DBObject dbObject = getMorphia().toDBObject(entity);

        final byte[] data = new DefaultDBEncoder().encode(dbObject);

        final DBObject decoded = new DefaultDBDecoder().decode(data, (DBCollection) null);
        final MyEntity actual = getMorphia().fromDBObject(MyEntity.class, decoded);
        assertEquals(entity, actual);
    }
View Full Code Here

TOP

Related Classes of com.mongodb.DefaultDBDecoder$DefaultFactory

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.