All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nyla.solutions.global.patterns.command.commas.MapCommandFactsDAO Maven / Gradle / Ivy

Go to download

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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy