Examples of toMongoObject()


Examples of com.github.jmkgreen.morphia.mapping.Mapper.toMongoObject()

        } catch (Exception e) {
            //Ignore these. It is likely they related to mapping validation that is unimportant for queries (the query will fail/return-empty anyway)
            log.debug("Error during mapping of filter criteria: ", e);
        }

        Object mappedValue = mapr.toMongoObject(mf, mc, value);

        Class<?> type = (mappedValue == null) ? null : mappedValue.getClass();

        //convert single values into lists for $in/$nin
        if (type != null && (op == FilterOperator.IN || op == FilterOperator.NOT_IN) && !type.isArray() && !Iterable.class.isAssignableFrom(type)) {
View Full Code Here

Examples of org.mongodb.morphia.mapping.Mapper.toMongoObject()

            //Ignore these. It is likely they related to mapping validation that is unimportant for queries (the query will
            // fail/return-empty anyway)
            LOG.debug("Error during mapping of filter criteria: ", e);
        }

        Object mappedValue = mapper.toMongoObject(mf, mc, value);

        final Class<?> type = (mappedValue == null) ? null : mappedValue.getClass();

        //convert single values into lists for $in/$nin
        if (type != null && (op == FilterOperator.IN || op == FilterOperator.NOT_IN)
View Full Code Here

Examples of org.mongodb.morphia.mapping.Mapper.toMongoObject()

        MappedClass mc = new MappedClass(User.class, mapper);
        MappedField mf = mc.getMappedField("userObject");

        // when
        Object dbValue = mapper.toMongoObject(mf, null, user.userObject);
        Class<byte[]> byteArrayClass = byte[].class;

        // then
        assertThat(dbValue, is(instanceOf(byteArrayClass)));
    }
View Full Code Here

Examples of org.mongodb.morphia.mapping.Mapper.toMongoObject()

        MappedClass mc = new MappedClass(ListEntity.class, mapper);
        MappedField mf = mc.getMappedField("list");

        // when
        Object dbValue = mapper.toMongoObject(mf, null, user.list);
        Class<byte[]> byteArrayClass = byte[].class;

        // then
        assertThat(dbValue, is(instanceOf(byteArrayClass)));
    }
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.