Package org.castor.core.util

Examples of org.castor.core.util.AbstractProperties


   }
   
    protected void setUp() throws Exception {
        super.setUp();

        AbstractProperties properties = getProperties();
        boolean useProxies = properties.getBoolean(CPAProperties.USE_JDBC_PROXIES, true);

        AbstractConnectionFactory factory = null;
       
        JdoConf jdoConf = getJdoConf(DBNAME, MAPPING);
        if (jdoConf.getDatabase(0).getDatabaseChoice().getDriver() != null) {
View Full Code Here


            JDOConfAdapter adapt = new JDOConfAdapter(_jdoConf);
            String name = adapt.getName();
            String txm = adapt.getTransactionManager();
            Properties prop = adapt.getTransactionManagerParameters();
           
            AbstractProperties properties = CPAProperties.getInstance();
            TransactionManagerRegistry txr = new TransactionManagerRegistry(properties);
            try {
                txr.registerTransactionManager(name, txm, prop);
                _txManager = txr.getTransactionManager(name);
            } catch (TransactionManagerAcquireException ex) {
View Full Code Here

* UTF test case for {@see org.castor.jdo.drivers.PointbaseFactory}.
*/
public class TestMappingLoaderRegistry extends TestCase {

    public final void testGetInstance() throws Exception {
        AbstractProperties properties = new CoreProperties();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(properties);
        assertNotNull(registry);
    }
View Full Code Here

        MappingLoaderRegistry registry = new MappingLoaderRegistry(properties);
        assertNotNull(registry);
    }

    public final void testEnlistMappingLoaders() throws Exception {
        AbstractProperties properties = new CoreProperties();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(properties);
        assertNotNull(registry);

        Collection factories = registry.getMappingLoaderFactories();
        assertNotNull(factories);
View Full Code Here

        assertEquals("CastorXmlMapping", factory.getSourceType());

    }

    public final void testGetXMLMappingLoader() throws Exception {
        AbstractProperties properties = new CoreProperties();
        MappingLoaderRegistry registry = new MappingLoaderRegistry(properties);
        assertNotNull(registry);

        MappingLoader mappingLoader = registry.getMappingLoader(
                "CastorXmlMapping", BindingType.XML);
View Full Code Here

            final String baseURI,
            final JDOClassDescriptorResolver classDescriptorResolver)
            throws MappingException {
        // Do we need to initialize database now or should we
        // wait until we want to use it.
        AbstractProperties properties = CPAProperties.getInstance();
        boolean init = properties.getBoolean(CPAProperties.INITIALIZE_AT_LOAD, true);
       
        // Load the JDO configuration file from the specified input source.
        // databases = JDOConfLoader.getDatabases(baseURI, resolver);
        Database[] databases = jdoConf.getDatabase();
        AbstractConnectionFactory factory;
View Full Code Here

                "Domain class loader must not be null",
                _properties.getDomainClassLoader());
    }

    public void testNewInstanceClassLoaderClassLoader() {
        AbstractProperties properties = XMLProperties.newInstance(null, null);
        Assert.assertNotNull(
                "Properties must exist after call to newInstance()", properties);
//        Assert.assertNotNull(
//                "Application class loader must not be null",
//                properties.getApplicationClassLoader());
View Full Code Here

    }
   
    public void testDate() throws Exception {
        LOG.debug("user.timezone = " + System.getProperty("user.timezone"));
       
        AbstractProperties properties = CPAProperties.newInstance();
        String testTimezone = properties.getString(CPAProperties.DEFAULT_TIMEZONE, "CET");
        LOG.debug(CPAProperties.DEFAULT_TIMEZONE + " = " + testTimezone);
       
        Database database = _category.getDatabase();

        /*
 
View Full Code Here

    }

    public void testTime() throws Exception {
        LOG.debug("user.timezone = " + System.getProperty("user.timezone"));
       
        AbstractProperties properties = CPAProperties.newInstance();
        String testTimezone = properties.getString(CPAProperties.DEFAULT_TIMEZONE, "CET");
        LOG.debug(CPAProperties.DEFAULT_TIMEZONE + " = " + testTimezone);
       
        Database database = _category.getDatabase();

        /*
 
View Full Code Here

    }

    public void testTimestamp() throws Exception {
        LOG.debug("user.timezone = " + System.getProperty("user.timezone"));
       
        AbstractProperties properties = CPAProperties.newInstance();
        String testTimezone = properties.getString(CPAProperties.DEFAULT_TIMEZONE, "CET");
        LOG.debug(CPAProperties.DEFAULT_TIMEZONE + " = " + testTimezone);
       
        Database database = _category.getDatabase();

        /*
 
View Full Code Here

TOP

Related Classes of org.castor.core.util.AbstractProperties

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.