Package org.jongo.marshall

Examples of org.jongo.marshall.MarshallingException


        try {
            return (T) mapping.getReader(clazz).readValue(document.toByteArray(), 0, document.getSize());
        } catch (IOException e) {
            String message = String.format("Unable to unmarshall result to %s from content %s", clazz, document.toString());
            throw new MarshallingException(message, e);
        }
    }
View Full Code Here


        ByteArrayOutputStream output = new ByteArrayOutputStream();
        try {
            mapping.getWriter(pojo).writeValue(output, pojo);
        } catch (IOException e) {
            throw new MarshallingException("Unable to marshall " + pojo + " into bson", e);
        }
        return Bson.createDocument(output.toByteArray());
    }
View Full Code Here

                return marshallArray((Object[]) parameter);
            }
            return marshallDocument(parameter);
        } catch (Exception e) {
            String message = String.format("Unable to marshall parameter: %s", parameter);
            throw new MarshallingException(message, e);
        }
    }
View Full Code Here

TOP

Related Classes of org.jongo.marshall.MarshallingException

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.