Package com.impossibl.postgres.system
Class Setting.Group
- java.lang.Object
-
- com.impossibl.postgres.system.Setting.Group
-
public static class Setting.Group extends Object
Setting group. A group can be global or local. All settings in a global group are required to be unique system wide, while settings in a local group only need to be unique within the group. Nothing else is unique about local groups.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Setting.Group.Info
Group definition annotation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Setting<T>
add(Setting<T> setting)
Adds a previously declared setting to this group.static Setting.Group
declare()
Forward declare a group that will be initialized by annotation processing.static Map<String,Setting.Group>
getAll()
Name base map of all defined setting groupsMap<String,Setting<?>>
getAllNamedSettings()
Retrieves a names based map of all settings in the groupSet<Setting<?>>
getAllOwnedSettings()
Retrieves a unique set of all settings owned by the group.Set<Setting<?>>
getAllSettings()
Retrieves a unique set of all settings in the group.String
getDescription()
Get description of groupString
getName()
Get name of groupvoid
init(String name, String description, boolean global)
Initialize a previouslydeclared
group.String
toString()
-
-
-
Method Detail
-
declare
public static Setting.Group declare()
Forward declare a group that will be initialized by annotation processing.- Returns:
- Uninitialized group instance
- See Also:
Setting
-
getAll
public static Map<String,Setting.Group> getAll()
Name base map of all defined setting groups- Returns:
- Map of defined setting groups
-
init
public void init(String name, String description, boolean global)
Initialize a previouslydeclared
group.
-
add
public <T> Setting<T> add(Setting<T> setting)
Adds a previously declared setting to this group. Allows adding a setting with the same name to multiple global groups without conflict.
-
getName
public String getName()
Get name of group- Returns:
- Name of group
-
getDescription
public String getDescription()
Get description of group- Returns:
- Description of group
-
getAllNamedSettings
public Map<String,Setting<?>> getAllNamedSettings()
Retrieves a names based map of all settings in the group- Returns:
- Map of all settings.
-
getAllOwnedSettings
public Set<Setting<?>> getAllOwnedSettings()
Retrieves a unique set of all settings owned by the group.- Returns:
- Set of all settings.
-
getAllSettings
public Set<Setting<?>> getAllSettings()
Retrieves a unique set of all settings in the group.- Returns:
- Set of all settings.
-
-