io.debezium.config.Field.name()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中io.debezium.config.Field.name()方法的一些代码示例,展示了Field.name()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Field.name()方法的具体详情如下:
包路径:io.debezium.config.Field
类名称:Field
方法名:name

Field.name介绍

[英]Get the name of the field.
[中]获取字段的名称。

代码示例

代码示例来源:origin: debezium/debezium

private Set(Collection<Field> fields) {
  Map<String, Field> all = new LinkedHashMap<>();
  fields.forEach(field -> {
    if (field != null) {
      all.put(field.name(), field);
    }
  });
  this.fieldsByName = Collections.unmodifiableMap(all);
}

代码示例来源:origin: debezium/debezium

/**
 * Associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the value
 * @return this builder object so methods can be chained together; never null
 */
default B with(Field field, String value) {
  return with(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * Associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the value
 * @return this builder object so methods can be chained together; never null
 */
default B with(Field field, int value) {
  return with(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * Associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the value
 * @return this builder object so methods can be chained together; never null
 */
default B with(Field field, float value) {
  return with(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * Associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the value
 * @return this builder object so methods can be chained together; never null
 */
default B with(Field field, boolean value) {
  return with(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * Associate the given class name value with the specified field.
 *
 * @param field the predefined field for the key
 * @param value the Class value
 * @return this builder object so methods can be chained together; never null
 */
default B with(Field field, Class<?> value) {
  return with(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * If the field does not have a value, then associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the value
 * @return this builder object so methods can be chained together; never null
 */
default B withDefault(Field field, Object value) {
  return withDefault(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * Get the boolean value associated with the given key, using the given supplier to obtain a default value if there is no such
 * key-value pair.
 *
 * @param field the field
 * @param defaultValueSupplier the supplier of value that should be returned by default if there is no such key-value pair in
 *            the configuration; may be null and may return null
 * @return the configuration value, or the {@code defaultValue} if there is no such key-value pair in the configuration
 */
default String getString(Field field, Supplier<String> defaultValueSupplier) {
  return getString(field.name(), defaultValueSupplier);
}

代码示例来源:origin: debezium/debezium

/**
 * Associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the value
 * @return this builder object so methods can be chained together; never null
 */
default B with(Field field, Object value) {
  return with(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * Associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the value
 * @return this builder object so methods can be chained together; never null
 */
default B with(Field field, long value) {
  return with(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * If the field does not have a value, then associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the value
 * @return this builder object so methods can be chained together; never null
 */
default B withDefault(Field field, String value) {
  return withDefault(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * If the field does not have a value, then associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the default value
 * @return this builder object so methods can be chained together; never null
 */
default B withDefault(Field field, boolean value) {
  return withDefault(field.name(), value);
}

代码示例来源:origin: debezium/debezium

/**
 * If the field does not have a value, then associate the given value with the key of the specified field.
 *
 * @param field the predefined field for the key
 * @param value the default value
 * @return this builder object so methods can be chained together; never null
 */
default B withDefault(Field field, Class<?> value) {
  return withDefault(field.name(), value != null ? value.getName() : null);
}

代码示例来源:origin: debezium/debezium

private static String findAndReplace(String url, Properties props, Field... variables) {
  for (Field field : variables) {
    if ( field != null ) url = findAndReplace(url, field.name(), props);
  }
  for (Object key : new HashSet<>(props.keySet())) {
    if (key != null ) url = findAndReplace(url, key.toString(), props);
  }
  return url;
}

代码示例来源:origin: debezium/debezium

protected static int validateServerNameIsDifferentFromHistoryTopicName(Configuration config, Field field, ValidationOutput problems) {
  String serverName = config.getString(field);
  String historyTopicName = config.getString(KafkaDatabaseHistory.TOPIC);
  if (Objects.equals(serverName, historyTopicName)) {
    problems.accept(field, serverName, "Must not have the same value as " + KafkaDatabaseHistory.TOPIC.name());
    return 1;
  }
  return 0;
}

代码示例来源:origin: debezium/debezium

/**
 * @return the decoder plugin used for testing and configured by system property
 */
public static PostgresConnectorConfig.LogicalDecoder decoderPlugin() {
  final String s = System.getProperty(PostgresConnectorConfig.PLUGIN_NAME.name());
  return (s == null || s.length() == 0) ? PostgresConnectorConfig.LogicalDecoder.DECODERBUFS : PostgresConnectorConfig.LogicalDecoder.parse(s);
}

代码示例来源:origin: debezium/debezium

/**
 * Create and return a new Field instance that is a copy of this field but with the given default value.
 * 
 * @param defaultValueGenerator the supplier for the new default value for the new field, called whenever a default value
 *            is needed
 * @return the new field; never null
 */
public Field withDefault(BooleanSupplier defaultValueGenerator) {
  return new Field(name(), displayName(), type(), width, description(), importance(), dependents,
      defaultValueGenerator::getAsBoolean, validator, recommender);
}

代码示例来源:origin: debezium/debezium

/**
 * Create and return a new Field instance that is a copy of this field but with the given default value.
 * 
 * @param defaultValueGenerator the supplier for the new default value for the new field, called whenever a default value
 *            is needed
 * @return the new field; never null
 */
public Field withDefault(IntSupplier defaultValueGenerator) {
  return new Field(name(), displayName(), type(), width, description(), importance(), dependents,
      defaultValueGenerator::getAsInt, validator, recommender);
}

代码示例来源:origin: debezium/debezium

/**
 * Create and return a new Field instance that is a copy of this field but with the given default value.
 * 
 * @param defaultValueGenerator the supplier for the new default value for the new field, called whenever a default value
 *            is needed
 * @return the new field; never null
 */
public Field withDefault(LongSupplier defaultValueGenerator) {
  return new Field(name(), displayName(), type(), width, description(), importance(), dependents,
      defaultValueGenerator::getAsLong, validator, recommender);
}

代码示例来源:origin: debezium/debezium

/**
 * Create and return a new Field instance that is a copy of this field but that uses no validation.
 * 
 * @return the new field; never null
 */
public Field withNoValidation() {
  return new Field(name(), displayName(), type(), width, description(), importance(), dependents,
      defaultValueGenerator, null, recommender);
}

相关文章