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

jadex.bridge.service.search.QueryEvent Maven / Gradle / Ivy

Go to download

Jadex bridge is a base package for kernels and platforms, i.e., it is used by both and provides commonly used interfaces and classes for active components and their management.

There is a newer version: 4.0.267
Show newest version
package jadex.bridge.service.search;

/**
 *  Query event for signaling when a query is added or removed.
 */
public class QueryEvent
{
	/** Query was added event. */
	public static final int QUERY_ADDED = 0;
	
	/** Query was removed event. */
	public static final int QUERY_REMOVED = 1;
	
	/** Event type. */
	protected int type;
	
	/** The service. */
	protected ServiceQuery query;
	
	/** Bean constructor. */
	public QueryEvent()
	{
	}
	
	/**
	 *  Creates the query event.
	 *  @param query The affected query.
	 *  @param eventtype The event type.
	 */
	public QueryEvent(ServiceQuery query, int eventtype)
	{
		this.query = query;
		this.type = eventtype;
	}

	/**
	 *  Gets the event type.
	 *  @return The event type.
	 */
	public int getType()
	{
		return type;
	}

	/**
	 *  Sets the event type.
	 *  @param eventtype The event type.
	 */
	public void setType(int type)
	{
		this.type = type;
	}

	/**
	 *  Gets the query.
	 *  @return The query.
	 */
	public ServiceQuery getQuery()
	{
		return query;
	}

	/**
	 *  Sets the query.
	 *  @param query The query.
	 */
	public void setQuery(ServiceQuery query)
	{
		this.query = query;
	}

	/**
	 *  Get the string representation.
	 */
	public String toString()
	{
		return "QueryEvent [type=" + type + ", query=" + query + "]";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy