public class MappingSetManager
extends java.lang.Object
MappingSet objects for the application.| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
log
Used for logging.
|
| Constructor and Description |
|---|
MappingSetManager()
Constructs an empty mapping set manager.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addMappingSet(MappingSet mappingSet)
Adds a
MappingSet to the local collection. |
void |
deleteMappingSet(java.lang.String setName)
Deletes a set identified by the given name.
|
static MappingSetManager |
getInstance()
Returns the singleton instance of the class.
|
MappingSet |
getMappingSet(java.lang.String name)
Gets the
MappingSet corresponding to the given name. |
MappingSet |
getMappingSetByID(int mappingSetID)
Gets a
MappingSet based on its database ID. |
MappingSet |
getMappingSetByName(java.lang.String name)
Gets a
MappingSet based on its name. |
MappingSet |
getMappingSetBySequence(int index)
Gets the
MappingSet at the given position. |
java.util.Iterator |
getMappingSetIterator()
Reterns an
Iterator over which the MappingSet
objects can be iterated. |
int |
getNumMappingSets()
Gets the number of
MappingSet objects in the manager. |
void |
removeMappingSet(java.lang.String setName)
Removes a set identified by the given name.
|
void |
save()
Saves the various sets to the database.
|
public MappingSetManager()
@Nullable public static MappingSetManager getInstance()
MappingSetManager@NotNull public java.util.Iterator getMappingSetIterator()
Iterator over which the MappingSet
objects can be iterated.Iterator.public boolean addMappingSet(@Nullable MappingSet mappingSet)
MappingSet to the local collection.mappingSet - The MappingSet to add.public int getNumMappingSets()
MappingSet objects in the manager.@Nullable public MappingSet getMappingSet(@Nullable java.lang.String name)
MappingSet corresponding to the given name.name - The name of the set.MappingSet if found; null,
otherwise.@Nullable public MappingSet getMappingSetBySequence(int index)
MappingSet at the given position.index - The zero-based index of the position.MappingSet if the position is valid; null,
otherwise.@Nullable public MappingSet getMappingSetByID(int mappingSetID)
MappingSet based on its database ID.mappingSetID - The database ID of the mapping set.MappingSet, if found.@Nullable public MappingSet getMappingSetByName(@NotNull java.lang.String name)
MappingSet based on its name.name - The name of the mapping set.MappingSet, if found.public void removeMappingSet(@Nullable java.lang.String setName)
setName - The name of the set to delete.public void deleteMappingSet(@Nullable java.lang.String setName)
setName - The name of the set to delete.public void save()