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

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

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

Value.isDefault介绍

暂无

代码示例

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

/**
 * Set this value as an object.
 * <br>
 * If this Value is being set to a non-default value for the first time
 * (as designated by <code>originalString</code> being null), then the
 * value is remembered as <em>original</em>. This original value is used
 * for equality and hashCode computation if this Value is
 * {@link #isDynamic() dynamic}. 
 * 
 */
public void setObject(Object obj) {
  // if setting to null set as string to get defaults into play
  if (obj == null && def != null)
    setString(null);
  else {
    try {
      setInternalObject(obj);
      if (originalValue == null && obj != null && !isDefault(obj)) {
        originalValue = getString();
      }
    } catch (ParseException pe) {
      throw pe;
    } catch (RuntimeException re) {
      throw new ParseException(prop + ": " + obj, re);
    }
  }
}

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

/**
 * Set this value as an object.
 * <br>
 * If this Value is being set to a non-default value for the first time
 * (as designated by <code>originalString</code> being null), then the
 * value is remembered as <em>original</em>. This original value is used
 * for equality and hashCode computation if this Value is
 * {@link #isDynamic() dynamic}. 
 * 
 */
public void setObject(Object obj) {
  // if setting to null set as string to get defaults into play
  if (obj == null && def != null)
    setString(null);
  else {
    try {
      setInternalObject(obj);
      if (originalValue == null && obj != null && !isDefault(obj)) {
        originalValue = getString();
      }
    } catch (ParseException pe) {
      throw pe;
    } catch (RuntimeException re) {
      throw new ParseException(prop + ": " + obj, re);
    }
  }
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Set this value as an object.
 * <br>
 * If this Value is being set to a non-default value for the first time
 * (as designated by <code>originalString</code> being null), then the
 * value is remembered as <em>original</em>. This original value is used
 * for equality and hashCode computation if this Value is
 * {@link #isDynamic() dynamic}. 
 * 
 */
public void setObject(Object obj) {
  // if setting to null set as string to get defaults into play
  if (obj == null && def != null)
    setString(null);
  else {
    try {
      setInternalObject(obj);
      if (originalValue == null && obj != null && !isDefault(obj)) {
        originalValue = getString();
      }
    } catch (ParseException pe) {
      throw pe;
    } catch (RuntimeException re) {
      throw new ParseException(prop + ": " + obj, re);
    }
  }
}

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

/**
 * Set this value as an object.
 * <br>
 * If this Value is being set to a non-default value for the first time
 * (as designated by <code>originalString</code> being null), then the
 * value is remembered as <em>original</em>. This original value is used
 * for equality and hashCode computation if this Value is
 * {@link #isDynamic() dynamic}. 
 * 
 */
public void setObject(Object obj) {
  // if setting to null set as string to get defaults into play
  if (obj == null && def != null)
    setString(null);
  else {
    try {
      setInternalObject(obj);
      if (originalValue == null && obj != null && !isDefault(obj)) {
        originalValue = getString();
      }
    } catch (ParseException pe) {
      throw pe;
    } catch (RuntimeException re) {
      throw new ParseException(prop + ": " + obj, re);
    }
  }
}

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

/**
 * Set this value from the given string. If the given string is null or
 * empty and a default is defined, the default is used. If the given
 * string(or default) is an alias key, it will be converted to the
 * corresponding value internally.
 * <br>
 * If this Value is being set to a non-default value for the first time
 * (as designated by <code>originalString</code> being null), then the
 * value is remembered as <em>original</em>. This original value is used
 * for equality and hashCode computation if this Value is
 * {@link #isDynamic() dynamic}. 
 *
 */
public void setString(String val) {
  assertChangeable();
  String str = unalias(val);
  try {
    setInternalString(str);
    if (originalValue == null && val != null && !isDefault(val)) {
      originalValue = getString();
    }
  } catch (ParseException pe) {
    throw pe;
  } catch (RuntimeException re) {
    throw new ParseException(prop + ": " + val, re);
  }
}

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

/**
 * Set this value from the given string. If the given string is null or
 * empty and a default is defined, the default is used. If the given
 * string(or default) is an alias key, it will be converted to the
 * corresponding value internally.
 * <br>
 * If this Value is being set to a non-default value for the first time
 * (as designated by <code>originalString</code> being null), then the
 * value is remembered as <em>original</em>. This original value is used
 * for equality and hashCode computation if this Value is
 * {@link #isDynamic() dynamic}. 
 *
 */
public void setString(String val) {
  assertChangeable();
  String str = unalias(val);
  try {
    setInternalString(str);
    if (originalValue == null && val != null && !isDefault(val)) {
      originalValue = getString();
    }
  } catch (ParseException pe) {
    throw pe;
  } catch (RuntimeException re) {
    throw new ParseException(prop + ": " + val, re);
  }
}

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

/**
 * Set this value from the given string. If the given string is null or
 * empty and a default is defined, the default is used. If the given
 * string(or default) is an alias key, it will be converted to the
 * corresponding value internally.
 * <br>
 * If this Value is being set to a non-default value for the first time
 * (as designated by <code>originalString</code> being null), then the
 * value is remembered as <em>original</em>. This original value is used
 * for equality and hashCode computation if this Value is
 * {@link #isDynamic() dynamic}. 
 *
 */
public void setString(String val) {
  assertChangeable();
  String str = unalias(val);
  try {
    setInternalString(str);
    if (originalValue == null && val != null && !isDefault(val)) {
      originalValue = getString();
    }
  } catch (ParseException pe) {
    throw pe;
  } catch (RuntimeException re) {
    throw new ParseException(prop + ": " + val, re);
  }
}

代码示例来源:origin: org.apache.openjpa/com.springsource.org.apache.openjpa

/**
 * Set this value from the given string. If the given string is null or
 * empty and a default is defined, the default is used. If the given
 * string(or default) is an alias key, it will be converted to the
 * corresponding value internally.
 * <br>
 * If this Value is being set to a non-default value for the first time
 * (as designated by <code>originalString</code> being null), then the
 * value is remembered as <em>original</em>. This original value is used
 * for equality and hashCode computation if this Value is
 * {@link #isDynamic() dynamic}. 
 *
 */
public void setString(String val) {
  assertChangeable();
  String str = unalias(val);
  try {
    setInternalString(str);
    if (originalValue == null && val != null && !isDefault(val)) {
      originalValue = getString();
    }
  } catch (ParseException pe) {
    throw pe;
  } catch (RuntimeException re) {
    throw new ParseException(prop + ": " + val, re);
  }
}

相关文章