@Test(expected = IllegalArgumentException.class) public void testRenamingColumnWithEmptyStringForColumnName() { new Column("id", bigint()).rename(""); }
public Column rename(String newName) { checkArgument(!Strings.isNullOrEmpty(newName), "You must specify a 'name'."); if (parent != null) { checkArgument(!parent.containsColumn(newName), "Table: " + parent.getName() + " already contains column with name: " + newName); } this.name = newName; return this; }
Column implements Copyable<Column> { public Column rename(String newName) { checkArgument(!Strings.isNullOrEmpty(newName), "You must specify a 'name'."); if (parent != null) { checkArgument(!parent.containsColumn(newName), "Table: " + parent.getName() + " already contains column with name: " + newName); } this.name = newName; return this; } }
Column implements Copyable<Column> { public Column rename(String newName) { checkArgument(!Strings.isNullOrEmpty(newName), "You must specify a 'name'."); if (parent != null) { checkArgument(!parent.containsColumn(newName), "Table: " + parent.getName() + " already contains column with name: " + newName); } this.name = newName; return this; } Column(String name, ColumnType type, Hint... hints);  Column(String name, ColumnType type, String defaultValue, Hint... hints);  Column(String name, ColumnType type, Sequence sequence, Hint... hints); private  Column(String name, ColumnType type, Sequence sequence, String defaultValueExpression, Hint... hints); }
Column implements Copyable<Column> { public Column rename(String newName) { checkArgument(!Strings.isNullOrEmpty(newName), "You must specify a 'name'."); if (parent != null) { checkArgument(!parent.containsColumn(newName), "Table: " + parent.getName() + " already contains column with name: " + newName); } this.name = newName; return this; } Column(String name, ColumnType type, Hint... hints);  Column(String name, ColumnType type, String defaultValue, Hint... hints);  Column(String name, ColumnType type, Sequence sequence, Hint... hints); private  Column(String name, ColumnType type, Sequence sequence, String defaultValueExpression, Hint... hints); void modifyType(ColumnType newColumnType); void dropDefaultValue(); void modifyDefaultValue(String defaultValue); void modifyDefaultValue(Sequence sequence); boolean isIdentity(); boolean isAutoIncrement(); boolean isNotNull(); void addHint(Hint hint); void dropHint(Hint hint); Column rename(String newName); @Override Column copy(); @Override String toString(); }
Column implements Copyable<Column> { public Column rename(String newName) { checkArgument(!Strings.isNullOrEmpty(newName), "You must specify a 'name'."); if (parent != null) { checkArgument(!parent.containsColumn(newName), "Table: " + parent.getName() + " already contains column with name: " + newName); } this.name = newName; return this; } Column(String name, ColumnType type, Hint... hints);  Column(String name, ColumnType type, String defaultValue, Hint... hints);  Column(String name, ColumnType type, Sequence sequence, Hint... hints); private  Column(String name, ColumnType type, Sequence sequence, String defaultValueExpression, Hint... hints); void modifyType(ColumnType newColumnType); void dropDefaultValue(); void modifyDefaultValue(String defaultValue); void modifyDefaultValue(Sequence sequence); boolean isIdentity(); boolean isAutoIncrement(); boolean isNotNull(); void addHint(Hint hint); void dropHint(Hint hint); Column rename(String newName); @Override Column copy(); @Override String toString();  }