/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with UDT * key and value types. * * <p>Example: * * <pre> * addUDTMapColumn("users", frozen("user"), frozen("address")); * </pre> * * @param columnName the name of the column to be added. * @param udtKeyType the key UDT type of the column to be added. Use {@link * SchemaBuilder#frozen(String)}. * @param udtValueType the value UDT type of the column to be added. Use {@link * SchemaBuilder#frozen(String)}. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, UDTType udtKeyType, UDTType udtValueType) { validateNotEmpty(columnName, "Column name"); validateNotNull(udtKeyType, "Map key UDT type"); validateNotNull(udtValueType, "Map value UDT type"); validateNotKeyWord( columnName, String.format( "The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTKeyAndValue(udtKeyType, udtValueType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with UDT key and value types. * <p/> * Example: * <pre> * addUDTMapColumn("users", frozen("user"), frozen("address")); * </pre> * * @param columnName the name of the column to be added. * @param udtKeyType the key UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @param udtValueType the value UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, UDTType udtKeyType, UDTType udtValueType) { validateNotEmpty(columnName, "Column name"); validateNotNull(udtKeyType, "Map key UDT type"); validateNotNull(udtValueType, "Map value UDT type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTKeyAndValue(udtKeyType, udtValueType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with UDT key and value types. * <p/> * Example: * <pre> * addUDTMapColumn("users", frozen("user"), frozen("address")); * </pre> * * @param columnName the name of the column to be added. * @param udtKeyType the key UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @param udtValueType the value UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, UDTType udtKeyType, UDTType udtValueType) { validateNotEmpty(columnName, "Column name"); validateNotNull(udtKeyType, "Map key UDT type"); validateNotNull(udtValueType, "Map value UDT type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTKeyAndValue(udtKeyType, udtValueType)); return self; }
/** * Shorthand to add a column definition to this CREATE statement, when the type is a map with UDT key and value types. * <p/> * Example: * <pre> * addUDTMapColumn("users", frozen("user"), frozen("address")); * </pre> * * @param columnName the name of the column to be added. * @param udtKeyType the key UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @param udtValueType the value UDT type of the column to be added. Use {@link SchemaBuilder#frozen(String)}. * @return this CREATE statement. */ public T addUDTMapColumn(String columnName, UDTType udtKeyType, UDTType udtValueType) { validateNotEmpty(columnName, "Column name"); validateNotNull(udtKeyType, "Map key UDT type"); validateNotNull(udtValueType, "Map value UDT type"); validateNotKeyWord(columnName, String.format("The column name '%s' is not allowed because it is a reserved keyword", columnName)); simpleColumns.put(columnName, UDTType.mapWithUDTKeyAndValue(udtKeyType, udtValueType)); return self; }