Package com.inspiresoftware.lib.dto.geda.adapter

Examples of com.inspiresoftware.lib.dto.geda.adapter.ExtensibleBeanFactory


    @Test
    public void testWithSameFieldsByClass() throws Exception {

        final IMocksControl ctrl = EasyMock.createControl();

        final ExtensibleBeanFactory bf = ctrl.createMock("bf", ExtensibleBeanFactory.class);

        final com.inspiresoftware.lib.dto.geda.dsl.Registry registry = new DefaultDSLRegistry(bf);

        ctrl.replay();
View Full Code Here


    @Test
    public void testWithSameFieldsByClassExcluding() throws Exception {

        final IMocksControl ctrl = EasyMock.createControl();

        final ExtensibleBeanFactory bf = ctrl.createMock("bf", ExtensibleBeanFactory.class);

        final com.inspiresoftware.lib.dto.geda.dsl.Registry registry = new DefaultDSLRegistry(bf);

        ctrl.replay();
View Full Code Here

    @Test
    public void testWithSameFieldsByClassInheritance() throws Exception {

        final IMocksControl ctrl = EasyMock.createControl();

        final ExtensibleBeanFactory bf = ctrl.createMock("bf", ExtensibleBeanFactory.class);

        final com.inspiresoftware.lib.dto.geda.dsl.Registry registry = new DefaultDSLRegistry(bf);

        ctrl.replay();
View Full Code Here

     * Example of how to use DSL where all references to DTO and Entity is via a string
     * key, which is resolved through extensible bean factory.
     */
    public void byReference() {

        final ExtensibleBeanFactory bf = new SimpleMapExtensibleBeanFactory();

        final com.inspiresoftware.lib.dto.geda.dsl.Registry registry = Registries.registry(bf);

        bf.registerDto("myDto", MyDtoClass.class.getCanonicalName());
        bf.registerEntity("myEntity", MyEntityClass.class.getCanonicalName(), MyEntity.class.getCanonicalName());
        bf.registerDto("myDtoField3Dto", MyDtoField3Class.class.getCanonicalName());
        bf.registerEntity("myEntityField3Entity", MyEntityField3Class.class.getCanonicalName(), MyEntityField3Class.class.getCanonicalName());
        bf.registerDto("field4ParentDto", MyDtoField4Class.class.getCanonicalName());
        bf.registerEntity("field4ParentEntity", MyEntityField4Class.class.getCanonicalName(), MyEntityField4Class.class.getCanonicalName());
        bf.registerEntity("field2", MyEntityField2Class.class.getCanonicalName(), MyEntityField2Class.class.getCanonicalName());

        registry
                // main mapping
                .dto("myDto").forEntity("myEntity")
                // field 1
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.adapter.ExtensibleBeanFactory

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.