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.container.impl;
 
 import java.util.Map;
Provides the option values configured on a specific element such as an entity or property, through one org.hibernate.ogm.options.navigation.source.impl.OptionValueSource. Instances should preferably be immutable and be obtained via OptionsContainerBuilder.

Author(s):
Gunnar Morling
public interface OptionsContainer {
Returns the value of the given option with the given identifier, if present in this container. Note that for obtaining unique options preferably getUnique(java.lang.Class) should be used.

Parameters:
optionType the type of option to return the value of
identifier the identifier of the option to return the value of
<I> the option identifier type
<V> the option identifier value
Returns:
the value of the specified option or null if no value is present
	<I, V> V get(Class<? extends Option<I, V>> optionType, I identifier);

Returns the value of the unique option of the given type, if present in this container.

Parameters:
optionType the type of option to return
<V> the option identifier value
Returns:
the unique option with the given type or null if this option is not present in this container
	<V> V getUnique(Class<? extends UniqueOption<V>> optionType);

Returns all values of the specified option type, keyed by identifier. Note that unique options should preferably be obtained via getUnique(java.lang.Class).

Parameters:
optionType the type of option to return
<I> the option identifier type
<V> the option identifier value
<T> the type of the option
Returns:
a map with all values of the specified option, keyed by identifier. May be empty but never null
	<I, V, T extends Option<I, V>> Map<I, V> getAll(Class<T> optionType);
New to GrepCode? Check out our FAQ X