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

org.nlpcn.es4sql.domain.From Maven / Gradle / Ivy

There is a newer version: 7.8.0.1
Show newest version
package org.nlpcn.es4sql.domain;


/**
 * Represents the from clause.
 * Contains index and type which the
 * query refer to.
 */
public class From {
	private String index;
	private String type;
    private String alias;

	/**
 	 * Extract index and type from the 'from' string
	 * @param from The part after the FROM keyword.
	 */
	public From(String from) {
		String[] parts = from.split("/");
		this.index = parts[0].trim();
		if (parts.length == 2) {
			this.type = parts[1].trim();
		}
	}

    public From(String from,String alias){
        this(from);
        this.alias = alias;
    }

	public String getIndex() {
		return index ;
	}

	public void setIndex(String index) {
		this.index = index;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy