com.scalar.db.sql.common.EmptyColumnDefinitions Maven / Gradle / Ivy
package com.scalar.db.sql.common;
import com.scalar.db.sql.ColumnDefinition;
import com.scalar.db.sql.ColumnDefinitions;
import java.util.Collections;
import java.util.Set;
public enum EmptyColumnDefinitions implements ColumnDefinitions {
INSTANCE;
@Override
public ColumnDefinition getColumnDefinition(String columnName) {
throw new IllegalArgumentException(SqlError.COLUMN_NOT_FOUND.buildMessage(columnName));
}
@Override
public ColumnDefinition getColumnDefinition(int i) {
throw new IndexOutOfBoundsException(SqlError.COLUMN_INDEX_OUT_OF_BOUNDS.buildMessage(i, 0));
}
@Override
public boolean contains(String columnName) {
return false;
}
@Override
public Set getColumnNames() {
return Collections.emptySet();
}
@Override
public int size() {
return 0;
}
}