Examples of buildMapper()


Examples of org.mongolink.test.inheritanceMapping.FakeAggregateWithSubclassMapping.buildMapper()

    public void before() {
        db = new Fongo("test").getDB("test");
        FakeAggregateWithSubclassMapping mapping = new FakeAggregateWithSubclassMapping();
        session = new MongoSessionImpl(db, new CriteriaFactory());
        MapperContext context = new MapperContext();
        mapping.buildMapper(context);
        session.setMappingContext(context);
        session.start();
    }

    @Test
View Full Code Here

Examples of org.mongolink.test.simpleMapping.CommentMapping.buildMapper()

    @Test
    public void canGetConverterForComponent() {
        final MapperContext context = new MapperContext();
        final CommentMapping mapping = new CommentMapping();
        mapping.buildMapper(context);

        final Converter converter = context.converterFor(Comment.class);

        assertThat(converter, notNullValue());
        assertThat(converter, instanceOf(ComponentMapper.class));
View Full Code Here

Examples of org.mongolink.test.simpleMapping.CommentMapping.buildMapper()

    }

    public PropertyMapper propertyMapperForComponent() throws NoSuchMethodException {
        MapperContext context = new MapperContext();
        CommentMapping mapping = new CommentMapping();
        mapping.buildMapper(context);
        final ClassMapper classMapper = mock(ClassMapper.class);
        when(classMapper.getContext()).thenReturn(context);
        when(classMapper.getPersistentType()).thenReturn(FakeAggregate.class);
        final Method method = FakeAggregate.class.getMethod("getComment", null);
        FieldContainer fieldContainer = new FieldContainer(method);
View Full Code Here

Examples of org.mongolink.test.simpleMapping.CommentMapping.buildMapper()

    @Before
    public void before() throws UnknownHostException {
        CommentMapping commentMapping = new CommentMapping();
        MapperContext context = new MapperContext();
        commentMapping.buildMapper(context);
        mapper = (ComponentMapper<Comment>) context.mapperFor(Comment.class);
    }

    @Test
    public void canSaveProperties() {
View Full Code Here

Examples of org.mongolink.test.simpleMapping.FakeAggregateMapping.buildMapper()

        };

        FakeAggregateMapping fakeEntityMapping = new FakeAggregateMapping();
        fakeEntityMapping.subclass(subclassMap);
        context = new MapperContext();
        fakeEntityMapping.buildMapper(context);
        parrentMapper = fakeEntityMapping.getMapper();
    }

    private MapperContext context;
    private AggregateMapper<FakeAggregate> parrentMapper;
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.