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.options.navigation.spi;
 
Keeps track of the entities and properties configured using the fluent configuration API.

There is one instance of this context per invocation of this API (beginning with the creation of a org.hibernate.ogm.options.navigation.GlobalContext). This instance is passed between the individual context types created in the course of using the fluent API.

Author(s):
Gunnar Morling
public interface ConfigurationContext {

Add an option to the global context

Parameters:
option the option to add to the context
value the value of the option
<V> the type of the option value
	<V> void addGlobalOption(Option<?, V> option, V value);

Add an option to the global context

Parameters:
option the option to add to the context
value the value of the option
<V> the type of the option value
	<V> void addEntityOption(Option<?, V> option, V value);

Add an option to the global context

Parameters:
option the option to add to the context
value the value of the option
<V> the type of the option value
	<V> void addPropertyOption(Option<?, V> option, V value);

Creates a new org.hibernate.ogm.options.navigation.GlobalContext object based on the given context implementation types. All implementation types must declare a public or protected constructor with a single parameter, accepting ConfigurationContext.

Each context implementation type must provide an implementation of the method(s) declared on the particular provider-specific context interface. All methods declared on context super interfaces - entity() and property() - are implemented following the dynamic proxy pattern, the implementation types therefore can be declared abstract, avoiding the need to implement these methods themselves.

By convention, the implementation types should directly or indirectly extend BaseContext.

Parameters:
globalContextImplType the provider-specific global context implementation type
entityContextImplType the provider-specific entity context implementation type
propertyContextImplType the provider-specific property context implementation type
<G> the org.hibernate.ogm.options.navigation.GlobalContext type
Returns:
a new org.hibernate.ogm.options.navigation.GlobalContext object based on the given context implementation types
	<G extends GlobalContext<?, ?>> G createGlobalContext(
			Class<? extends G> globalContextImplType,
			Class<? extends EntityContext<?, ?>> entityContextImplType,
			Class<? extends PropertyContext<?, ?>> propertyContextImplType
	);
New to GrepCode? Check out our FAQ X