/**
 * Copyright © 2013 by Data Virtuality GmbH
 */
package com.datavirtuality.dv.core.interfaces;

/**
 * Additional interface to give to an optimizer rule an ability to get an original sql command.
 * 
 * @author Salvatore Raunich
 * @date 10.08.2012
 */
public interface MyOptimizerRule {

	/**
	 * set the original command expressed as a org.teiid.query.sql.lang.Command
	 * 
	 * @param command
	 *            a Teiid Command
	 * @param context
	 *            the command context
	 */
	public void setCommand(Object command, Object context);

	/**
	 * get the original command expressed as a org.teiid.query.sql.lang.Command
	 *
	 * @param context
	 *            the command context
	 * 
	 * @return the original Command
	 */
	public Object getCommand(Object context);

	public void setCurrentCommand(Object command, Object context);
	
	
	/**
	 * get a DV rule associated to the current context. If it does not exist, a new one will be created.
	 *
	 * @param context
	 *            the command context
	 * 
	 * @return a DV optimizer rule
	 */
	public Object getRule(Object context);
}
