@Test(expected = IllegalArgumentException.class) public void testAddingColumnWithEmptyStringForColumnName() { SchemaOperations.addColumn("users", "", varchar(255), NOT_NULL); }
AddColumn(String tableName, String columnName, ColumnType type, String defaultExpression, Hint... hints) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'"); checkArgument(!Strings.isNullOrEmpty(columnName), "You must specify a 'columnName'"); checkArgument(type != null, "You must specify a 'type'"); this.tableName = tableName; this.columnDefinition = new ColumnDefinition(columnName, type, defaultExpression, hints); }
AddColumn implements SchemaOperation { AddColumn(String tableName, String columnName, ColumnType type, String defaultExpression, Hint... hints) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'"); checkArgument(!Strings.isNullOrEmpty(columnName), "You must specify a 'columnName'"); checkArgument(type != null, "You must specify a 'type'"); this.tableName = tableName; this.columnDefinition = new ColumnDefinition(columnName, type, defaultExpression, hints); } }
AddColumn implements SchemaOperation { AddColumn(String tableName, String columnName, ColumnType type, String defaultExpression, Hint... hints) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'"); checkArgument(!Strings.isNullOrEmpty(columnName), "You must specify a 'columnName'"); checkArgument(type != null, "You must specify a 'type'"); this.tableName = tableName; this.columnDefinition = new ColumnDefinition(columnName, type, defaultExpression, hints); } AddColumn(String tableName, String columnName, ColumnType type, String defaultExpression, Hint... hints); }
AddColumn implements SchemaOperation { AddColumn(String tableName, String columnName, ColumnType type, String defaultExpression, Hint... hints) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'"); checkArgument(!Strings.isNullOrEmpty(columnName), "You must specify a 'columnName'"); checkArgument(type != null, "You must specify a 'type'"); this.tableName = tableName; this.columnDefinition = new ColumnDefinition(columnName, type, defaultExpression, hints); } AddColumn(String tableName, String columnName, ColumnType type, String defaultExpression, Hint... hints);  }
AddColumn implements SchemaOperation { AddColumn(String tableName, String columnName, ColumnType type, String defaultExpression, Hint... hints) { checkArgument(!Strings.isNullOrEmpty(tableName), "You must specify a 'tableName'"); checkArgument(!Strings.isNullOrEmpty(columnName), "You must specify a 'columnName'"); checkArgument(type != null, "You must specify a 'type'"); this.tableName = tableName; this.columnDefinition = new ColumnDefinition(columnName, type, defaultExpression, hints); } AddColumn(String tableName, String columnName, ColumnType type, String defaultExpression, Hint... hints);   }