Examples of AshwoodEntitySorter


Examples of org.apache.cayenne.ashwood.AshwoodEntitySorter

                binder.bindList(Constants.SERVER_DEFAULT_TYPES_LIST);
                binder.bindList(Constants.SERVER_USER_TYPES_LIST);       
                binder.bindList(Constants.SERVER_TYPE_FACTORIES_LIST);
               
                binder.bind(EventManager.class).toInstance(eventManager);
                binder.bind(EntitySorter.class).toInstance(new AshwoodEntitySorter());
                binder.bind(ResourceLocator.class).toInstance(locator);
                binder.bind(ConfigurationNameMapper.class).to(
                        DefaultConfigurationNameMapper.class);
                binder.bind(DataChannelDescriptorMerger.class).to(
                        DefaultDataChannelDescriptorMerger.class);
View Full Code Here

Examples of org.apache.cayenne.ashwood.AshwoodEntitySorter

        Module testModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(EventManager.class).toInstance(eventManager);
                binder.bind(EntitySorter.class).toInstance(new AshwoodEntitySorter());
                binder.bind(ResourceLocator.class).toInstance(locator);
                binder.bind(RuntimeProperties.class).toInstance(testProperties);
                binder.bind(ConfigurationNameMapper.class).to(
                        DefaultConfigurationNameMapper.class);
                binder.bind(DataChannelDescriptorLoader.class).toInstance(testLoader);
View Full Code Here

Examples of org.apache.cayenne.ashwood.AshwoodEntitySorter

        this.dataSetFactory = dataSetFactory;
        this.resources = resources;
        this.domain = new UnitTestDomain("domain");
        domain.setEventManager(new DefaultEventManager(2));
        domain.setEntitySorter(new AshwoodEntitySorter());
       
        for (DataMap map : maps) {
            initNode(map);
        }
    }
View Full Code Here

Examples of org.apache.cayenne.ashwood.AshwoodEntitySorter

            maps[i] = new MapLoader().loadDataMap(in);
        }

        this.domain = new DataDomain("temp");
        domain.setEventManager(new DefaultEventManager(2));
        domain.setEntitySorter(new AshwoodEntitySorter());
        domain.setQueryCache(new MapQueryCache(50));

        try {
            for (DataMap map : maps) {
                initNode(map);
View Full Code Here

Examples of org.apache.cayenne.ashwood.AshwoodEntitySorter

            }
        }

        // sort table list
        if (tables.size() > 1) {
            EntitySorter sorter = new AshwoodEntitySorter();
            sorter.setEntityResolver(new EntityResolver(Collections.singleton(map)));
            sorter.sortDbEntities(tables, false);
        }

        this.dbEntitiesInInsertOrder = tables;
        this.dbEntitiesRequiringAutoPK = tablesWithAutoPk;
    }
View Full Code Here

Examples of org.apache.cayenne.ashwood.AshwoodEntitySorter

            return;
        }

        // sort entities for insertion
        List sorted = new ArrayList(entities);
        EntitySorter sorter = new AshwoodEntitySorter();
        sorter.setEntityResolver(new EntityResolver(destinationNode.getDataMaps()));
        sorter.sortDbEntities(sorted, false);

        if (cleaningDestination) {
            // reverse insertion order for deletion
            List entitiesInDeleteOrder = new ArrayList(sorted.size());
            entitiesInDeleteOrder.addAll(sorted);
View Full Code Here

Examples of org.apache.cayenne.ashwood.AshwoodEntitySorter

            maps[i] = new MapLoader().loadDataMap(in);
        }

        this.domain = new DataDomain("temp");
        domain.setEventManager(new DefaultEventManager(2));
        domain.setEntitySorter(new AshwoodEntitySorter());
        domain.setQueryCache(new MapQueryCache(50));

        try {
            for (DataMap map : maps) {
                initNode(map);
View Full Code Here

Examples of org.apache.cayenne.ashwood.AshwoodEntitySorter

                binder.bindList(Constants.SERVER_DEFAULT_TYPES_LIST);
                binder.bindList(Constants.SERVER_USER_TYPES_LIST);       
                binder.bindList(Constants.SERVER_TYPE_FACTORIES_LIST);
               
                binder.bind(EventManager.class).toInstance(eventManager);
                binder.bind(EntitySorter.class).toInstance(new AshwoodEntitySorter());
                binder.bind(ResourceLocator.class).toInstance(locator);
                binder.bind(ConfigurationNameMapper.class).to(
                        DefaultConfigurationNameMapper.class);
                binder.bind(DataChannelDescriptorMerger.class).to(
                        DefaultDataChannelDescriptorMerger.class);
View Full Code Here

Examples of org.apache.cayenne.map.AshwoodEntitySorter

                    // see TODO above
                    if (nodes.size() == 1) {
                        entitySorter = nodes.values().iterator().next().getEntitySorter();
                    }
                    else {
                        entitySorter = new AshwoodEntitySorter(getDataMaps());
                    }
                }
            }
        }
View Full Code Here

Examples of org.apache.cayenne.map.AshwoodEntitySorter

        this.readThroughDataSource = new TransactionDataSource();

        // since 1.2 we always implement entity sorting, regardless of the underlying DB
        // as the right order is needed for deferred PK propagation (and maybe other
        // things too?)
        this.entitySorter = new AshwoodEntitySorter(Collections.EMPTY_LIST);
    }
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.