Package org.apache.tapestry5.hibernate

Examples of org.apache.tapestry5.hibernate.HibernateSessionSource


            {
                configuration.setProperty("foo", "bar");
                configuration.configure();
            }
        };
        HibernateSessionSource source = new HibernateSessionSourceImpl(log, Arrays.asList(configurer));

        Configuration config = source.getConfiguration();
        Assert.assertNotNull(config);
        Assert.assertEquals("bar", config.getProperty("foo"));

        // Configuration was immutable in 5.1, but Hibernate 3.6.0.Final made that impossible
    }
View Full Code Here


        List<HibernateConfigurer> filters = Arrays.asList(
                new DefaultHibernateConfigurer(),
                new PackageNameHibernateConfigurer(packageManager, new ClassNameLocatorImpl()));

        replay();
        HibernateSessionSource source = new HibernateSessionSourceImpl(log, filters);

        Session session = source.create();
        assertNotNull(session);

        // make sure it found the entity in the package
        ClassMetadata meta = session.getSessionFactory().getClassMetadata(User.class);
        assertEquals(meta.getEntityName(), "org.example.app0.entities.User");
View Full Code Here

            {
                configuration.setProperty("foo", "bar");
                configuration.configure();
            }
        };
        HibernateSessionSource source = new HibernateSessionSourceImpl(log, Arrays
                .asList(configurer));

        Configuration config = source.getConfiguration();
        assertNotNull(config);
        assertEquals("bar", config.getProperty("foo"));

        // configuration should be immutable
        try
View Full Code Here

                new DefaultHibernateConfigurer(true),
                new PackageNameHibernateConfigurer(packageManager,
                                                   new ClassNameLocatorImpl(new ClasspathURLConverterImpl())));

        replay();
        HibernateSessionSource source = new HibernateSessionSourceImpl(log, filters);

        Session session = source.create();
        assertNotNull(session);

        // make sure it found the entity in the package
        ClassMetadata meta = session.getSessionFactory().getClassMetadata(User.class);
        assertEquals(meta.getEntityName(), "org.example.app0.entities.User");
View Full Code Here

            {
                configuration.setProperty("foo", "bar");
                configuration.configure();
            }
        };
        HibernateSessionSource source = new HibernateSessionSourceImpl(log, Arrays
                .asList(configurer));

        Configuration config = source.getConfiguration();
        assertNotNull(config);
        assertEquals("bar", config.getProperty("foo"));

        // configuration should be immutable
        try
View Full Code Here

    {
        List<OptionModel> options = CollectionFactory.newList();

        for (Locale l : supportedLocales)
        {
            options.add(new OptionModelImpl(l.getDisplayName(l), l));
        }

        return new SelectModelImpl(null, options);
    }
View Full Code Here

        for (Locale l : supportedLocales)
        {
            options.add(new OptionModelImpl(l.getDisplayName(l), l));
        }

        return new SelectModelImpl(null, options);
    }
View Full Code Here

    {
        this.parent = parent;
        this.transformer = transformer;
        this.logger = logger;
        this.internalRequestGlobals = internalRequestGlobals;
        this.changeTracker = new URLChangeTracker(classpathURLConverter);

        initializeService();
    }
View Full Code Here

        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        Messages messages = mockMessages();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();
View Full Code Here

    {
        ValidationMessagesSource messagesSource = mockValidationMessagesSource();
        Validator validator = mockValidator();
        TypeCoercer coercer = mockTypeCoercer();
        FieldComponent field = newFieldComponent();
        MessageFormatter formatter = mockMessageFormatter();
        Object inputValue = new Object();
        ComponentResources resources = mockComponentResources();
        Messages containerMessages = mockMessages();
        FormSupport fs = mockFormSupport();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.hibernate.HibernateSessionSource

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.