Package org.hibernate.ogm.service.impl

Source Code of org.hibernate.ogm.service.impl.ConfigurationService

/*
* Hibernate OGM, Domain model persistence for NoSQL datastores
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.ogm.service.impl;

import java.util.Map;

import org.hibernate.ogm.cfg.impl.InternalProperties;
import org.hibernate.ogm.util.configurationreader.impl.ConfigurationPropertyReader;
import org.hibernate.service.Service;

/**
* @author Emmanuel Bernard &lt;emmanuel@hibernate.org&gt;
*/
public class ConfigurationService implements Service {

  private final boolean isOn;

  public ConfigurationService(Map config) {
    isOn = new ConfigurationPropertyReader( config )
      .property( InternalProperties.OGM_ON, boolean.class )
      .withDefault( false )
      .getValue();
  }

  public boolean isOgmOn() {
    return isOn;
  }
}
TOP

Related Classes of org.hibernate.ogm.service.impl.ConfigurationService

TOP
Copyright © 2018 www.massapi.com. 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.