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

prerna.query.querystruct.selectors.AbstractQuerySelector Maven / Gradle / Ivy

The newest version!
package prerna.query.querystruct.selectors;

import java.io.Serializable;

public abstract class AbstractQuerySelector implements IQuerySelector, Serializable {

	protected String alias;
	
	/**
	 * Default constructor
	 */
	public AbstractQuerySelector() {
		// we want the alias to be an empty string
		// since we dont want to get null pointers 
		// when we to the equals when we merge selectors
		this.alias = "";
	}

	@Override
	public void setAlias(String alias) {
		// cannot have __ in the alias
		if (alias != null) {
			if (alias.contains("__")) {
				this.alias = alias.split("__")[1];
			} else {
				this.alias = alias;
			}
		}
	}
	
	@Override
	public String toString() {
		return this.getQueryStructName();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy