/**
 * Created on Jul 4, 2005
 * $id:  $
 */
package org.jvnet.lookout.core.model;

import java.util.HashMap;
import java.util.Map;

public class SearchQuery {

    public static enum Parameter {
    	
        /**
         * The keywords typed by the user. 
         */
        KEYWORDS,
        
        /**
         * A String containing the batch of results to get. 
         * For example, when the user 
         * clicks on the "next results" button, the batch number 
         * changes. When user first searches, the batch number is 1. 
         * As the user continues click on next the batch number 
         * increases. If the customer clicks on the "previous results" 
         * button the batch number decreases. 
         */
        BATCH
    }
    
    private Map<Parameter, String> parameters;    
        
    public SearchQuery() {
        parameters = new HashMap<Parameter, String>(); 
    }
    
    public Map<Parameter, String> getParameters() {
        return this.parameters;
    }

    public void setParameters(Map<Parameter, String> parameters) {
        this.parameters = parameters;
    }
    
    public void addParameter(Parameter parameter, String parameterValue) {
        parameters.put(parameter, parameterValue);
    }
    
    public void removeParameter(Parameter parameter, String parameterValue) {
        parameters.remove(parameter);
    }
}
