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

pro.foundev.cassandra.commons.test.FullTableName Maven / Gradle / Ivy

Go to download

Session reuse, database cleanup, and persistence methods for use with integration tests in Apache Cassandra

The newest version!
/*
 * Copyright 2015 Ryan Svihla
 *
 * 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
 *
 *     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 pro.foundev.cassandra.commons.test;

public class FullTableName {
    @Override
    public String toString() {
        return String.format("%s.%s",  keyspaceName, tableName);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        FullTableName that = (FullTableName) o;

        if (keyspaceName != null ? !keyspaceName.equals(that.keyspaceName) : that.keyspaceName != null) return false;
        return !(tableName != null ? !tableName.equals(that.tableName) : that.tableName != null);

    }

    @Override
    public int hashCode() {
        int result = keyspaceName != null ? keyspaceName.hashCode() : 0;
        result = 31 * result + (tableName != null ? tableName.hashCode() : 0);
        return result;
    }

    private String keyspaceName;
    private String tableName;

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getKeyspaceName() {
        return keyspaceName;
    }

    public void setKeyspaceName(String keyspaceName) {
        this.keyspaceName = keyspaceName;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy