Package net.obvj.confectory.settings
Class ConfectorySettings
- java.lang.Object
-
- net.obvj.confectory.settings.ConfectorySettings
-
public class ConfectorySettings extends Object
An object that defines the global settings for theConfectoryproject.- Since:
- 0.1.0
- Author:
- oswaldo.bapvic.jr
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DataFetchStrategygetDataFetchStrategy()Returns theDataFetchStrategyto be applied by default when no specific strategy is defined.ObjectFactorygetObjectFactory()static ConfectorySettingsinstance()voidreset()ResetsConfectoryconfiguration.voidsetDataFetchStrategy(DataFetchStrategy strategy)Defines theDataFetchStrategyto be applied by default when no specific strategy is defined.voidsetObjectFactory(ObjectFactory objectFactory)Defines theObjectFactoryto produce new objects.
-
-
-
Method Detail
-
reset
public void reset()
ResetsConfectoryconfiguration.
-
instance
public static ConfectorySettings instance()
- Returns:
- a reference to the the current
ConfectorySettingsinstance.
-
getDataFetchStrategy
public DataFetchStrategy getDataFetchStrategy()
Returns theDataFetchStrategyto be applied by default when no specific strategy is defined.- Returns:
- the default
DataFetchStrategyto be applied
-
setDataFetchStrategy
public void setDataFetchStrategy(DataFetchStrategy strategy)
Defines theDataFetchStrategyto be applied by default when no specific strategy is defined.- Parameters:
strategy- the defaultDataFetchStrategyto set; not null- Throws:
NullPointerException- if the specified strategy is null
-
getObjectFactory
public ObjectFactory getObjectFactory()
- Returns:
- the
ObjectFactoryto be produce new objects - Since:
- 2.5.0
-
setObjectFactory
public void setObjectFactory(ObjectFactory objectFactory)
Defines theObjectFactoryto produce new objects.- Parameters:
objectFactory- theObjectFactoryto set; not null- Throws:
NullPointerException- if the specifiedObjectFactoryis null- Since:
- 2.5.0
-
-