Package net.obvj.confectory
Enum DataFetchStrategy
- java.lang.Object
-
- java.lang.Enum<DataFetchStrategy>
-
- net.obvj.confectory.DataFetchStrategy
-
- All Implemented Interfaces:
Serializable,Comparable<DataFetchStrategy>
public enum DataFetchStrategy extends Enum<DataFetchStrategy>
Enumerates the supported data-fetch strategies for use with aConfigurationContainer.- Since:
- 0.1.0
- Author:
- oswaldo.bapvic.jr (Oswaldo Junior), FernandoNSC (Fernando Tiannamen)
- See Also:
ConfigurationContainer
-
-
Enum Constant Summary
Enum Constants Enum Constant Description LENIENTRetrieves sorted data from allConfigurationobjects regardless of their namespaces when no namespace specified during data fetch.LENIENT_UNSORTEDRetrieves unsorted data from allConfigurationobjects regardless of their namespaces when no namespace specified during data fetch.STRICTRetrieves sorted data fromConfigurationobjects declared with a specific namespace.STRICT_UNSORTEDRetrieves unsorted data fromConfigurationobjects declared with a specific namespace.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DataFetchStrategyvalueOf(String name)Returns the enum constant of this type with the specified name.static DataFetchStrategy[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STRICT
public static final DataFetchStrategy STRICT
Retrieves sorted data fromConfigurationobjects declared with a specific namespace.If no namespace is specified during data fetch, only
Configurationobjects without a namespace defined will be searched.Configurationobjects are sorted from the highest to the lowest precedence attribute, as determined by theConfigurationComparator.
-
STRICT_UNSORTED
public static final DataFetchStrategy STRICT_UNSORTED
Retrieves unsorted data fromConfigurationobjects declared with a specific namespace.If no namespace is specified during data fetch, only
Configurationobjects without a namespace defined will be searched.- Since:
- 0.2.0
-
LENIENT
public static final DataFetchStrategy LENIENT
Retrieves sorted data from allConfigurationobjects regardless of their namespaces when no namespace specified during data fetch.Configurationobjects are sorted from the highest to the lowest precedence attribute, as determined by theConfigurationComparator.
-
LENIENT_UNSORTED
public static final DataFetchStrategy LENIENT_UNSORTED
Retrieves unsorted data from allConfigurationobjects regardless of their namespaces when no namespace specified during data fetch.- Since:
- 0.2.0
-
-
Method Detail
-
values
public static DataFetchStrategy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DataFetchStrategy c : DataFetchStrategy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DataFetchStrategy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-