Package org.lightfish.business.configuration.entity

Examples of org.lightfish.business.configuration.entity.Configuration


    @PersistenceContext
    EntityManager em;

    public Configuration retrieveConfiguration() {
        Configuration configuration = em.find(Configuration.class, Configuration.ID);
        if (configuration == null) {
            configuration = createDefault();
        }

        return configuration;
View Full Code Here


    public void save(Configuration configuration) {
        em.merge(configuration);
    }

    private Configuration createDefault() {
        Configuration configuration = new Configuration();
        configuration.put("location", "localhost:4848");
        configuration.put("jdbcPoolNames", "SamplePool");
        configuration.put("interval", "2");
        configuration.put("username", "");
        configuration.put("password", "");
        configuration.put("serverInstances", "server");
        configuration.put("maxParallelThreads", "0");
        configuration.put("collectionTimeout", "10");
        configuration.put("dataCollectionRetries", "1");
        configuration.put("defaultMaxLogResults", "40");
        configuration.put("collectLogs", "true");
        em.persist(configuration);
        return configuration;
    }
View Full Code Here

TOP

Related Classes of org.lightfish.business.configuration.entity.Configuration

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.