Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * 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.cfg.spi;
 
Provides access to properties common to different document datastores.

Author(s):
Gunnar Morling
public abstract class DocumentStoreConfiguration {

The default host to connect to in case the org.hibernate.ogm.cfg.OgmProperties.HOST property is not set
	private static final String DEFAULT_HOST = "localhost";
	private final Hosts hosts;
	private final String databaseName;
	private final String username;
	private final String password;
	private final boolean createDatabase;
	public DocumentStoreConfiguration(ConfigurationPropertyReader propertyReaderint defaultPort) {
		String host = propertyReader.property.String.class )
		Integer port =  propertyReader.property.Integer.class )
				.withDefaultnull )
		 = HostParser.parsehostportdefaultPort );
		this. = propertyReader.property.String.class )
		this. = propertyReader.property.String.class ).getValue();
		this. = propertyReader.property.String.class ).getValue();
		this. = propertyReader.property.boolean.class )
				.withDefaultfalse )
	}

Returns:
The host name of the data store instance
See also:
org.hibernate.ogm.cfg.OgmProperties.HOST
org.hibernate.ogm.cfg.OgmProperties.PORT
	public Hosts getHosts() {
		return ;
	}

Returns:
the name of the database to connect to
See also:
org.hibernate.ogm.cfg.OgmProperties.DATABASE
	public String getDatabaseName() {
		return ;
	}

Returns:
The user name to be used for connecting with the data store
See also:
org.hibernate.ogm.cfg.OgmProperties.USERNAME
	public String getUsername() {
		return ;
	}

Returns:
The password to be used for connecting with the data store
See also:
org.hibernate.ogm.cfg.OgmProperties.PASSWORD
	public String getPassword() {
		return ;
	}

Returns:
whether to create the database to connect to if not existent or not
See also:
org.hibernate.ogm.cfg.OgmProperties.CREATE_DATABASE
	public boolean isCreateDatabase() {
	}
New to GrepCode? Check out our FAQ X