Package org.nxplanner

Examples of org.nxplanner.XPlannerProperties


        }
    }

    public static Configuration initializeConfiguration() throws HibernateException {
        Transformer transformer = null;
        Properties properties = new XPlannerProperties().get();
        try {
            if (properties.containsKey("xplanner.hibernate.mappingtransform")) {
                String transformerFileName = properties.getProperty("xplanner.hibernate.mappingtransform");
                log.info("Using Hibernate mapping transformer: " + transformerFileName);
                transformer = createTransformer(transformerFileName);
            }
            Configuration cfg = new Configuration();
            cfg.addInputStream(getMappingStream("mappings/Attribute.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Permission.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/RoleAssociation.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/DataSample.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Project.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Iteration.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/UserStory.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Task.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/TimeEntry.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Integration.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Note.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Role.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Person.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/HistoricalEvent.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/File.xml", transformer));
            cfg.addInputStream(getMappingStream("mappings/Directory.xml", transformer));
            cfg.addProperties(new XPlannerProperties().get());
            EHCacheHelper.configure(cfg);
            return cfg;
        } catch (Exception e) {
            throw new HibernateException(e);
        }
View Full Code Here

TOP

Related Classes of org.nxplanner.XPlannerProperties

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.