Package org.mongojack

Examples of org.mongojack.MongoJsonMappingException


            String op, String field) {
        BsonObjectGenerator objectGenerator = new BsonObjectGenerator();
        try {
            serializer.serialize(value, objectGenerator, serializerProvider);
        } catch (IOException e) {
            throw new MongoJsonMappingException(
                    "Error serializing value in DBUpdate operation " + op
                            + " field " + field, e);
        }
        return objectGenerator.getValue();
    }
View Full Code Here


                        .writeValue(generator, jacksonDbObject.getObject());
                // The generator buffers everything so that it can write the
                // number of bytes to the stream
                generator.close();
            } catch (JsonMappingException e) {
                throw new MongoJsonMappingException(e);
            } catch (IOException e) {
                throw new MongoException("Error writing object out", e);
            }
            return stream.getCount();
        } else {
View Full Code Here

        }
        BsonObjectGenerator objectGenerator = new BsonObjectGenerator();
        try {
            serializer.serialize(value, objectGenerator, serializerProvider);
        } catch (IOException e) {
            throw new MongoJsonMappingException("Error serializing value "
                    + value + " in DBQuery operation " + op, e);
        }
        return objectGenerator.getValue();
    }
View Full Code Here

            // We don't know what it is, serialise it
            BsonObjectGenerator generator = new BsonObjectGenerator();
            try {
                objectMapper.writeValue(generator, value);
            } catch (JsonMappingException e) {
                throw new MongoJsonMappingException(e);
            } catch (IOException e) {
                throw new RuntimeException(
                        "Somehow got an IOException writing to memory", e);
            }
            return generator.getValue();
View Full Code Here

TOP

Related Classes of org.mongojack.MongoJsonMappingException

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.