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

org.cg.rooster.phoenix.PhoenixConditionOperator Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package org.cg.rooster.phoenix;

import org.cg.rooster.core.ConditionOperator;

/**
 * A Enum implements {@link ConditionOperator} that is supported by Apache Phoenix
 * @author WZ
 *
 */
public enum PhoenixConditionOperator implements ConditionOperator {
	
	EQUAL ("="),
    LESS ("<"),
    GREATER (">"),
	LESS_OR_EQUAL ("<="),
    GREATER_OR_EQUAL (">="),
    NOT_EQUAL ("!="),
    LIKE ("LIKE"),
    ILIKE ("ILIKE"),
    IS_NOT_NULL ("IS NOT NULL"),
    IS_NULL ("IS NULL"),
    AND("AND"),
    OR("OR");
    // BETWEEN_AND ("BETWEEN;AND"); not supported for now can be constructed using above operators
	
    private final String operator;       

    private PhoenixConditionOperator(String s) {
    	operator = s;
    }

    public boolean equals(String operator){
        return (operator == null)? false:operator.equals(operator);
    }

    public String toString(){
       return operator;
    }

	@Override
	public String getOperatorSQLStr() {
		return operator;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy