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

org.flowstep.jdbc.model.JdbcEnvironment Maven / Gradle / Ivy

The newest version!
/*
 *
 *  Copyright 2022 the original author or authors.
 *
 *  Licensed 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
 *
 *       https://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.flowstep.jdbc.model;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.flowstep.core.model.environment.EnvironmentItemSettings;

public class JdbcEnvironment extends EnvironmentItemSettings {
    private String driver;

    private Integer timeout;

    public JdbcEnvironment() {
        super();
        timeout = 0;
    }

    public JdbcEnvironment(JdbcEnvironment environment) {
        super(environment);
        driver = environment.driver;
        timeout = environment.timeout;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public Integer getTimeout() {
        return timeout;
    }

    public void setTimeout(Integer timeout) {
        this.timeout = timeout;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;

        if (o == null || getClass() != o.getClass()) return false;

        JdbcEnvironment that = (JdbcEnvironment) o;

        return new EqualsBuilder().appendSuper(super.equals(o)).append(driver, that.driver).append(timeout, that.timeout).isEquals();
    }

    @Override
    public int hashCode() {
        return new HashCodeBuilder(17, 37).appendSuper(super.hashCode()).append(driver).append(timeout).toHashCode();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy