com.jaxio.celerio.configuration.database.Index Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of celerio-engine Show documentation
Show all versions of celerio-engine Show documentation
Celerio Core Generation Engine
The newest version!
/*
* Copyright 2015 JAXIO http://www.jaxio.com
*
* 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 com.jaxio.celerio.configuration.database;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import lombok.Setter;
/*
* Description of the given table's indices and statistics
*/
public class Index {
@Setter
protected String columnName;
@Setter
protected String indexName;
@Setter
protected boolean nonUnique;
/*
* Column name
*/
public String getColumnName() {
return columnName;
}
/*
* Index name
*/
public String getIndexName() {
return indexName;
}
/*
* Can index values be non-unique
*/
public boolean isNonUnique() {
return nonUnique;
}
public static Predicate NON_UNIQUE = new Predicate() {
@Override
public boolean apply(Index input) {
return input.isNonUnique();
}
};
public static Predicate UNIQUE = Predicates.not(NON_UNIQUE);
}