/** * Define a free-form option as a key/value pair. * * <p>This method is provided as a fallback if the SchemaBuilder is used with a more recent * version of Cassandra that has new, unsupported options. * * @param key the name of the option. * @param value the value of the option. If it's a {@code CharSequence}, it will be included in * single quotes, otherwise the result of invoking its {@code toString} method will be used * unquoted. * @return this object (for call chaining). */ public T freeformOption(String key, Object value) { if (Strings.isNullOrEmpty(key)) { throw new IllegalArgumentException("Key for custom option should not be null or blank"); } customOptions.add(buildCustomOption(key, value)); return self; }
/** * Define a free-form option as a key/value pair. * <p/> * This method is provided as a fallback if the SchemaBuilder is used with a more recent version of Cassandra that has new, unsupported options. * * @param key the name of the option. * @param value the value of the option. If it's a {@code CharSequence}, it will be included in single quotes, otherwise the result of invoking its * {@code toString} method will be used unquoted. * @return this object (for call chaining). */ public T freeformOption(String key, Object value) { if (Strings.isNullOrEmpty(key)) { throw new IllegalArgumentException("Key for custom option should not be null or blank"); } customOptions.add(buildCustomOption(key, value)); return self; }
/** * Define a free-form option as a key/value pair. * <p/> * This method is provided as a fallback if the SchemaBuilder is used with a more recent version of Cassandra that has new, unsupported options. * * @param key the name of the option. * @param value the value of the option. If it's a {@code CharSequence}, it will be included in single quotes, otherwise the result of invoking its * {@code toString} method will be used unquoted. * @return this object (for call chaining). */ public T freeformOption(String key, Object value) { if (Strings.isNullOrEmpty(key)) { throw new IllegalArgumentException("Key for custom option should not be null or blank"); } customOptions.add(buildCustomOption(key, value)); return self; }
/** * Define a free-form option as a key/value pair. * <p/> * This method is provided as a fallback if the SchemaBuilder is used with a more recent version of Cassandra that has new, unsupported options. * * @param key the name of the option. * @param value the value of the option. If it's a {@code CharSequence}, it will be included in single quotes, otherwise the result of invoking its * {@code toString} method will be used unquoted. * @return this object (for call chaining). */ public T freeformOption(String key, Object value) { if (Strings.isNullOrEmpty(key)) { throw new IllegalArgumentException("Key for custom option should not be null or blank"); } customOptions.add(buildCustomOption(key, value)); return self; }