private void validateColumnsDeclaration() { this.intersection(partitionColumns.keySet(), clusteringColumns.keySet()); final Collection partitionAndSimpleColumns = this.intersection(partitionColumns.keySet(), simpleColumns.keySet()); final Collection clusteringAndSimpleColumns = this.intersection(clusteringColumns.keySet(), simpleColumns.keySet()); final Collection partitionAndStaticColumns = this.intersection(partitionColumns.keySet(), staticColumns.keySet()); final Collection clusteringAndStaticColumns = this.intersection(clusteringColumns.keySet(), staticColumns.keySet()); final Collection simpleAndStaticColumns = this.intersection(simpleColumns.keySet(), staticColumns.keySet());
private void validateColumnsDeclaration() { final Collection partitionAndClusteringColumns = this.intersection(partitionColumns.keySet(), clusteringColumns.keySet()); final Collection partitionAndSimpleColumns = this.intersection(partitionColumns.keySet(), simpleColumns.keySet()); final Collection clusteringAndSimpleColumns = this.intersection(clusteringColumns.keySet(), simpleColumns.keySet()); final Collection partitionAndStaticColumns = this.intersection(partitionColumns.keySet(), staticColumns.keySet()); final Collection clusteringAndStaticColumns = this.intersection(clusteringColumns.keySet(), staticColumns.keySet()); final Collection simpleAndStaticColumns = this.intersection(simpleColumns.keySet(), staticColumns.keySet()); if (!partitionAndClusteringColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and clustering keys at the same time", partitionAndClusteringColumns)); } if (!partitionAndSimpleColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and simple columns at the same time", partitionAndSimpleColumns)); } if (!clusteringAndSimpleColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as clustering keys and simple columns at the same time", clusteringAndSimpleColumns)); } if (!partitionAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and static columns at the same time", partitionAndStaticColumns)); } if (!clusteringAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as clustering keys and static columns at the same time", clusteringAndStaticColumns)); } if (!simpleAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as simple columns and static columns at the same time", simpleAndStaticColumns)); } if (!staticColumns.isEmpty() && clusteringColumns.isEmpty()) { throw new IllegalStateException(String.format("The table '%s' cannot declare static columns '%s' without clustering columns", tableName, staticColumns.keySet())); } }
private void validateColumnsDeclaration() { final Collection partitionAndClusteringColumns = this.intersection(partitionColumns.keySet(), clusteringColumns.keySet()); final Collection partitionAndSimpleColumns = this.intersection(partitionColumns.keySet(), simpleColumns.keySet()); final Collection clusteringAndSimpleColumns = this.intersection(clusteringColumns.keySet(), simpleColumns.keySet()); final Collection partitionAndStaticColumns = this.intersection(partitionColumns.keySet(), staticColumns.keySet()); final Collection clusteringAndStaticColumns = this.intersection(clusteringColumns.keySet(), staticColumns.keySet()); final Collection simpleAndStaticColumns = this.intersection(simpleColumns.keySet(), staticColumns.keySet()); if (!partitionAndClusteringColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and clustering keys at the same time", partitionAndClusteringColumns)); } if (!partitionAndSimpleColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and simple columns at the same time", partitionAndSimpleColumns)); } if (!clusteringAndSimpleColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as clustering keys and simple columns at the same time", clusteringAndSimpleColumns)); } if (!partitionAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and static columns at the same time", partitionAndStaticColumns)); } if (!clusteringAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as clustering keys and static columns at the same time", clusteringAndStaticColumns)); } if (!simpleAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as simple columns and static columns at the same time", simpleAndStaticColumns)); } if (!staticColumns.isEmpty() && clusteringColumns.isEmpty()) { throw new IllegalStateException(String.format("The table '%s' cannot declare static columns '%s' without clustering columns", tableName, staticColumns.keySet())); } }
private void validateColumnsDeclaration() { final Collection partitionAndClusteringColumns = this.intersection(partitionColumns.keySet(), clusteringColumns.keySet()); final Collection partitionAndSimpleColumns = this.intersection(partitionColumns.keySet(), simpleColumns.keySet()); final Collection clusteringAndSimpleColumns = this.intersection(clusteringColumns.keySet(), simpleColumns.keySet()); final Collection partitionAndStaticColumns = this.intersection(partitionColumns.keySet(), staticColumns.keySet()); final Collection clusteringAndStaticColumns = this.intersection(clusteringColumns.keySet(), staticColumns.keySet()); final Collection simpleAndStaticColumns = this.intersection(simpleColumns.keySet(), staticColumns.keySet()); if (!partitionAndClusteringColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and clustering keys at the same time", partitionAndClusteringColumns)); } if (!partitionAndSimpleColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and simple columns at the same time", partitionAndSimpleColumns)); } if (!clusteringAndSimpleColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as clustering keys and simple columns at the same time", clusteringAndSimpleColumns)); } if (!partitionAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as partition keys and static columns at the same time", partitionAndStaticColumns)); } if (!clusteringAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as clustering keys and static columns at the same time", clusteringAndStaticColumns)); } if (!simpleAndStaticColumns.isEmpty()) { throw new IllegalStateException(String.format("The '%s' columns can not be declared as simple columns and static columns at the same time", simpleAndStaticColumns)); } if (!staticColumns.isEmpty() && clusteringColumns.isEmpty()) { throw new IllegalStateException(String.format("The table '%s' cannot declare static columns '%s' without clustering columns", tableName, staticColumns.keySet())); } }