org.apache.openjpa.lib.conf.Value.isHidden()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(58)

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

Value.isHidden介绍

[英]Affirms if the value for this Value is visible. Certain sensitive value such as password can be made invisible so that it is not returned to the user code.
[中]

代码示例

代码示例来源:origin: org.apache.openjpa/openjpa-all

/**
 * Adds <code>o</code> to <code>map</code> under key for <code>val</code>.
 * Use this method instead of attempting to add the value directly because 
 * this will account for the property prefix.
 */
private void setValue(Map map, Value val) {
  Object key = val.getLoadKey();
  if (key == null) {
    List<String> keys = val.getPropertyKeys();
    for (String k : keys) {
      if (hasKnownPrefix(k)) {
        key = k;
        break;
      }
    }
    if (key == null) {
      key = "openjpa." + val.getProperty();
    }
  }
  Object external = val.isHidden() ? Value.INVISIBLE : 
    val instanceof ObjectValue ? val.getString() : val.get();
  map.put(key, external);
}

代码示例来源:origin: org.apache.openejb.patch/openjpa

/**
 * Adds <code>o</code> to <code>map</code> under key for <code>val</code>.
 * Use this method instead of attempting to add the value directly because 
 * this will account for the property prefix.
 */
private void setValue(Map map, Value val) {
  Object key = val.getLoadKey();
  if (key == null) {
    List<String> keys = val.getPropertyKeys();
    for (String k : keys) {
      if (hasKnownPrefix(k)) {
        key = k;
        break;
      }
    }
    if (key == null) {
      key = "openjpa." + val.getProperty();
    }
  }
  Object external = val.isHidden() ? Value.INVISIBLE : 
    val instanceof ObjectValue ? val.getString() : val.get();
  map.put(key, external);
}

代码示例来源:origin: org.apache.openjpa/openjpa-lib

/**
 * Adds <code>o</code> to <code>map</code> under key for <code>val</code>.
 * Use this method instead of attempting to add the value directly because 
 * this will account for the property prefix.
 */
private void setValue(Map map, Value val) {
  Object key = val.getLoadKey();
  if (key == null) {
    List<String> keys = val.getPropertyKeys();
    for (String k : keys) {
      if (hasKnownPrefix(k)) {
        key = k;
        break;
      }
    }
    if (key == null) {
      key = "openjpa." + val.getProperty();
    }
  }
  Object external = val.isHidden() ? Value.INVISIBLE : 
    val instanceof ObjectValue ? val.getString() : val.get();
  map.put(key, external);
}

相关文章