/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
*/

package org.apache.kylin.rest.request;

/**
 * @author xduo
 * 
 */
public class PrepareSqlRequest extends SQLRequest {

    public PrepareSqlRequest() {
        super();
    }

    private StateParam[] params;

    public StateParam[] getParams() {
        return params;
    }

    public void setParams(StateParam[] params) {
        this.params = params;
    }

    public static class StateParam {
        private String className;
        private String value;

        public StateParam() {
        }

        public String getClassName() {
            return className;
        }

        public void setClassName(String className) {
            this.className = className;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }
}

@@ -841,16 +841,42 @@
 quest;%0A%0A
+import java.util.Arrays;%0A%0A
 /**%0A * @
@@ -1678,16 +1678,1735 @@
        %7D
+%0A%0A        @Override%0A        public int hashCode() %7B%0A            final int prime = 31;%0A            int result = 1;%0A            result = prime * result + ((className == null) ? 0 : className.hashCode());%0A            result = prime * result + ((value == null) ? 0 : value.hashCode());%0A            return result;%0A        %7D%0A%0A        @Override%0A        public boolean equals(Object obj) %7B%0A            if (this == obj)%0A                return true;%0A            if (obj == null)%0A                return false;%0A            if (getClass() != obj.getClass())%0A                return false;%0A            StateParam other = (StateParam)obj;%0A            if (className == null) %7B%0A                if (other.className != null)%0A                    return false;%0A            %7D else if (!className.equals(other.className))%0A                return false;%0A            if (value == null) %7B%0A                if (other.value != null)%0A                    return false;%0A            %7D else if (!value.equals(other.value))%0A                return false;%0A            return true;%0A        %7D%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        final int prime = 31;%0A        int result = super.hashCode();%0A        result = prime * result + ((params == null) ? 0 : Arrays.hashCode(params));%0A        return result;%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object obj) %7B%0A        if (this == obj)%0A            return true;%0A        if (obj == null)%0A            return false;%0A        if (getClass() != obj.getClass())%0A            return false;%0A        if (!super.equals(obj))%0A            return false;%0A        PrepareSqlRequest other = (PrepareSqlRequest)obj;%0A        if (!Arrays.equals(params, other.params))%0A            return false;%0A        return true;
 %0A    %7D%0A%7D

Fix KYLIN-949 by adding hashCode() and equals() method in PrepareSqlRequest