Package com.inspiresoftware.lib.dto.geda.dsl

Examples of com.inspiresoftware.lib.dto.geda.dsl.Registry


                bundleContext.getService(facadeReference);
        assertNotNull(facade);

        final ExtensibleBeanFactory beanFactory = facade.createBeanFactory(this.getClass().getClassLoader());
        final DTOSupportDSLService dslService = facade.getDSLService(this.getClass().getClassLoader());
        Registry basic = dslService.getRegistry("basic");
        if (basic == null) {
            basic = dslService.createRegistry("basic", beanFactory);
            basic.dto(SimpleDTOClass.class).alias("SimpleDTO").forEntityGeneric()
                    .withField("string").and().withField("decimal").and().withField("integer");
        }

        final SimpleEntity entity = new SimpleEntityClass();
        entity.setString("aether");
View Full Code Here


                bundleContext.getService(facadeReference);
        assertNotNull(facade);

        final ExtensibleBeanFactory beanFactory = facade.createBeanFactory(this.getClass().getClassLoader());
        final DTOSupportDSLService dslService = facade.getDSLService(this.getClass().getClassLoader());
        Registry basic = dslService.getRegistry("basic");
        if (basic == null) {

            beanFactory.registerEntity("SimpleEntity",
                    "com.inspiresoftware.lib.dto.geda.osgi.test.SimpleEntityClass",
                    "com.inspiresoftware.lib.dto.geda.osgi.test.SimpleEntity");

            basic = dslService.createRegistry("basic", beanFactory);
            basic.dto(SimpleDTOClass.class).alias("SimpleDTO").forEntityGeneric()
                    .withField("string").and().withField("decimal").and().withField("integer");
            basic.dto(ComplexDTOClass.class).alias("ComplexDTO").forEntityGeneric()
                    .withField("name").and()
                    .withField("inner")
                        .dtoBeanKey("SimpleDTO")
                        .entityBeanKeys("SimpleEntity").and()
                    .withCollection("collection")
View Full Code Here

    /** {@inheritDoc} */
    public Registry createRegistry(final String namespace, final ExtensibleBeanFactory beanFactory) {
        if (registryRepository.containsKey(namespace)) {
            throw new IllegalArgumentException("DSL namespace [" + namespace + "] already used");
        }
        final Registry registry = Registries.registry(beanFactory);
        registryRepository.put(namespace, registry);
        return registry;
    }
View Full Code Here

TOP

Related Classes of com.inspiresoftware.lib.dto.geda.dsl.Registry

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.