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

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

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

Value.getLoadKey介绍

[英]The key under which this value was loaded, or null.
[中]加载此值的键,或null。

代码示例

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.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 put(Map map, Value val, Object o) {
  Object key = val.getLoadKey();
  if (key == null)
    key = "openjpa." + val.getProperty();
  map.put(key, o);
}

代码示例来源: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);
}

相关文章