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

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

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

Value.getOriginalValue介绍

[英]Gets the original value. Original value denotes the Stringified form of this Value, from which it has been set, if ever. If this Value has never been set to a non-default value, then returns the default value, which itself can be null.
[中]获取原始值。原始值表示该值的字符串化形式,如果有,它是从中设置的。如果该值从未设置为非默认值,则返回默认值,该值本身可以为空。

代码示例

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

/**
 * Use {@link #getOriginalValue() original value} instead of 
 * {@link #getString() current value} because they are one and the same 
 * for non-dynamic Values and ensures that modifying dynamic Values do not
 * impact equality or hashCode contract.   
 */
public int hashCode() {
  String str = (isDynamic()) ? getOriginalValue() : getString();
  int strHash = (str == null) ? 0 : str.hashCode();
  int propHash = (prop == null) ? 0 : prop.hashCode();
  return strHash ^ propHash;
}

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

/**
 * Use {@link #getOriginalValue() original value} instead of 
 * {@link #getString() current value} because they are one and the same 
 * for non-dynamic Values and ensures that modifying dynamic Values do not
 * impact equality or hashCode contract.   
 */
public int hashCode() {
  String str = (isDynamic()) ? getOriginalValue() : getString();
  int strHash = (str == null) ? 0 : str.hashCode();
  int propHash = (prop == null) ? 0 : prop.hashCode();
  return strHash ^ propHash;
}

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

/**
 * Use {@link #getOriginalValue() original value} instead of 
 * {@link #getString() current value} because they are one and the same 
 * for non-dynamic Values and ensures that modifying dynamic Values do not
 * impact equality or hashCode contract.   
 */
public int hashCode() {
  String str = (isDynamic()) ? getOriginalValue() : getString();
  int strHash = (str == null) ? 0 : str.hashCode();
  int propHash = (prop == null) ? 0 : prop.hashCode();
  return strHash ^ propHash;
}

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

/**
 * Use {@link #getOriginalValue() original value} instead of 
 * {@link #getString() current value} because they are one and the same 
 * for non-dynamic Values and ensures that modifying dynamic Values do not
 * impact equality or hashCode contract.   
 */
public int hashCode() {
  String str = (isDynamic()) ? getOriginalValue() : getString();
  int strHash = (str == null) ? 0 : str.hashCode();
  int propHash = (prop == null) ? 0 : prop.hashCode();
  return strHash ^ propHash;
}

代码示例来源:origin: riptano/hector-jpa

/**
 * Get the serializer configured
 * 
 * @return
 */
public EmbeddedSerializer getSerializer() {
 if (serializer != null) {
  return serializer;
 }
 String className = getValue(SERIALIZER_PROP).getOriginalValue();
 try {
  serializer = (EmbeddedSerializer) createInstance(className,
    JavaSerializer.class.getName());
 } catch (Exception e) {
  throw new UserException(String.format(
    "Unable to load class '%s' as an instance of %s", className,
    EmbeddedSerializer.class), e);
 }
 return serializer;
}

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

/**
 * Use {@link #getOriginalValue() original value} instead of 
 * {@link #getString() current value} because they are one and the same 
 * for non-dynamic Values and ensures that modifying dynamic Values do not
 * impact equality or hashCode contract.   
 */
public boolean equals(Object other) {
  if (other == this)
    return true;
  if (!(other instanceof Value))
    return false;
  Value o = (Value) other;
  String thisStr = (isDynamic()) ? getOriginalValue() : getString();
  String thatStr = (isDynamic()) ? o.getOriginalValue() : o.getString();
  return (isDynamic() == o.isDynamic())
    && Objects.equals(prop, o.getProperty())
    && Objects.equals(thisStr, thatStr);
}

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

/**
 * Use {@link #getOriginalValue() original value} instead of 
 * {@link #getString() current value} because they are one and the same 
 * for non-dynamic Values and ensures that modifying dynamic Values do not
 * impact equality or hashCode contract.   
 */
public boolean equals(Object other) {
  if (other == this)
    return true;
  if (!(other instanceof Value))
    return false;
  Value o = (Value) other;
  String thisStr = (isDynamic()) ? getOriginalValue() : getString();
  String thatStr = (isDynamic()) ? o.getOriginalValue() : o.getString();
  return (isDynamic() == o.isDynamic())
    && StringUtils.equals(prop, o.getProperty())
    && StringUtils.equals(thisStr, thatStr);
}

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

/**
 * Use {@link #getOriginalValue() original value} instead of 
 * {@link #getString() current value} because they are one and the same 
 * for non-dynamic Values and ensures that modifying dynamic Values do not
 * impact equality or hashCode contract.   
 */
public boolean equals(Object other) {
  if (other == this)
    return true;
  if (!(other instanceof Value))
    return false;
  Value o = (Value) other;
  String thisStr = (isDynamic()) ? getOriginalValue() : getString();
  String thatStr = (isDynamic()) ? o.getOriginalValue() : o.getString();
  return (isDynamic() == o.isDynamic())
    && Objects.equals(prop, o.getProperty())
    && Objects.equals(thisStr, thatStr);
}

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

/**
 * Use {@link #getOriginalValue() original value} instead of 
 * {@link #getString() current value} because they are one and the same 
 * for non-dynamic Values and ensures that modifying dynamic Values do not
 * impact equality or hashCode contract.   
 */
public boolean equals(Object other) {
  if (other == this)
    return true;
  if (!(other instanceof Value))
    return false;
  Value o = (Value) other;
  String thisStr = (isDynamic()) ? getOriginalValue() : getString();
  String thatStr = (isDynamic()) ? o.getOriginalValue() : o.getString();
  return (isDynamic() == o.isDynamic())
    && StringUtils.equals(prop, o.getProperty())
    && StringUtils.equals(thisStr, thatStr);
}

相关文章