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

com.jn.sqlhelper.dialect.expression.PlaceholderExpression Maven / Gradle / Ivy

package com.jn.sqlhelper.dialect.expression;

import com.jn.langx.el.expression.BaseExpression;
import com.jn.langx.util.Objs;
import com.jn.langx.util.hash.HashCodeBuilder;

public final class PlaceholderExpression extends BaseExpression implements SQLExpression {
    public final String placeholder = "?";

    public PlaceholderExpression() {
    }

    @Override
    public SQLExpression execute() {
        return this;
    }

    @Override
    public String toString() {
        return placeholder;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj==null){
            return false;
        }
        if(obj.getClass()!= PlaceholderExpression.class){
            return false;
        }
        PlaceholderExpression that = (PlaceholderExpression)obj;
        if(!Objs.equals(this.toString(), that.toString())){
            return false;
        }
        return true;

    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder().with(placeholder).build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy