Package org.apache.cayenne.di

Examples of org.apache.cayenne.di.Module


                        ServerModule.CONFIGURATION_LOCATION,
                        testConfigName));

        final EventManager eventManager = new MockEventManager();

        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);
View Full Code Here


        final EventManager eventManager = new MockEventManager();
        final DataDomain domain = new DataDomain("d1");

        domain.setSharedCacheEnabled(false);

        Module testModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
                binder.bind(DataDomain.class).toInstance(domain);
                binder.bind(EventManager.class).toInstance(eventManager);
View Full Code Here

        final EventManager eventManager = new MockEventManager();
        final DataDomain domain = new DataDomain("d1");

        domain.setValidatingObjectsOnCommit(true);

        Module testModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(JdbcEventLogger.class).to(CommonsJdbcEventLogger.class);
                binder.bind(DataDomain.class).toInstance(domain);
                binder.bind(EventManager.class).toInstance(eventManager);
View Full Code Here

        DataNodeDescriptor nodeDescriptor = new DataNodeDescriptor();
        nodeDescriptor.setName("node1");
        nodeDescriptor.setDataSourceDescriptor(new DataSourceInfo());

        Module testModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
                binder.bind(ResourceLocator.class).to(MockResourceLocator.class);
            }
View Full Code Here

        DataNodeDescriptor nodeDescriptor = new DataNodeDescriptor();
        nodeDescriptor.setName("node1");
        nodeDescriptor.setDataSourceFactoryType(MockDataSourceFactory1.class.getName());

        Module testModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
                binder.bind(ResourceLocator.class).to(MockResourceLocator.class);
            }
View Full Code Here

        DataNodeDescriptor nodeDescriptor = new DataNodeDescriptor();
        nodeDescriptor.setName("node1");
        nodeDescriptor.setDataSourceFactoryType(MockDataSourceFactory1.class.getName());
        nodeDescriptor.setDataChannelDescriptor(channelDescriptor);

        Module testModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(AdhocObjectFactory.class).to(DefaultAdhocObjectFactory.class);
                binder.bind(ResourceLocator.class).to(MockResourceLocator.class);
            }
View Full Code Here

    @Override
    public void execute() throws BuildException {
        validateParameters();

        String projectFileLocation = projectFile.getName();
        Module dataPortModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(ResourceLocator.class).toInstance(
                        new FilesystemResourceLocator(projectFile));
            }
View Full Code Here

    @Override
    public void execute() throws BuildException {
        validateParameters();

        String projectFileLocation = projectFile.getName();
        Module dataPortModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(ResourceLocator.class).toInstance(
                        new FilesystemResourceLocator(projectFile));
            }
View Full Code Here

    public void testLoad() {

        DataChannelProjectLoader loader = new DataChannelProjectLoader();

        Module testModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(DataMapLoader.class).to(XMLDataMapLoader.class);
                binder.bind(DataChannelDescriptorLoader.class).to(
                        XMLDataChannelDescriptorLoader.class);
View Full Code Here

    public void testSaveAs_Sorted() throws Exception {

        File testFolder = setupTestDirectory("testSaveAs_Sorted");

        Module testModule = new Module() {

            public void configure(Binder binder) {
                binder.bind(ConfigurationNameMapper.class).to(
                        DefaultConfigurationNameMapper.class);
            }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.di.Module

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.