nyla.solutions.global.patterns.command.commas.MapCommandFactsDAO Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nyla.solutions.global Show documentation
Show all versions of nyla.solutions.global Show documentation
Nyla Solutions Global Java API provides support for basic application
utilities (application configuration, data encryption, debugger and text
processing).
The newest version!
package nyla.solutions.global.patterns.command.commas;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
/**
* Default implementation of a CommasDAO
* @author Gregory Green
*
*/
public class MapCommandFactsDAO implements CommandFactsDAO
{
/**
*
* @see nyla.solutions.global.patterns.command.commas.CommandFactsDAO#findCommandByKey(java.lang.String)
*/
public CommandFacts findFactsByKey(String key)
{
return mapCommandFacts.get(key);
}// --------------------------------------------------------
/**
*
* @see nyla.solutions.global.patterns.command.commas.CommandFactsDAO#saveByKey(java.lang.String, nyla.solutions.global.patterns.command.Command)
*/
public CommandFacts saveByKey(String key, CommandFacts value)
{
return mapCommandFacts.put(key, value);
}// --------------------------------------------------------
@Override
public Set selectFactKeys()
{
return mapCommandFacts.keySet();
}
private Map mapCommandFacts = new HashMap();
}