gpt4 book ai didi

org.eclipse.persistence.internal.oxm.XPathFragment.equals()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-26 03:07:05 24 4
gpt4 key购买 nike

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

XPathFragment.equals介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public boolean equals(Object object) {
  return equals(object, false);
}
public boolean equals(Object object, boolean ignorePredicate) {

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public boolean equals(Object object) {
  return equals(object, false);
}
public boolean equals(Object object, boolean ignorePredicate) {

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
public boolean equals(Object obj) {
  if(null == obj || obj.getClass() != XPathPredicate.class) {
    return false;
  }
  XPathPredicate test = (XPathPredicate) obj;
  if(!xPathFragment.equals(test.getXPathFragment())) {
    return false;
  }
  return value.equals(test.getValue());
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

@Override
public boolean equals(Object obj) {
  if(null == obj || obj.getClass() != XPathPredicate.class) {
    return false;
  }
  XPathPredicate test = (XPathPredicate) obj;
  if(!xPathFragment.equals(test.getXPathFragment())) {
    return false;
  }
  return value.equals(test.getValue());
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

public boolean equals(Object object) {
  try {
    XPathFragment perfNodeXPathFragment = ((XPathNode)object).getXPathFragment();
    if(xPathFragment == perfNodeXPathFragment) {
      return true;
    } else if(null == xPathFragment) {
      return false;
    } else if(null == perfNodeXPathFragment) {
      return false;
    }
    return xPathFragment.equals(perfNodeXPathFragment);
    // turn fix off for now until we re-enable XMLAnyObjectAndAnyCollectionTestCases
    //          } catch (NullPointerException npe) {
    // b5259059 all cases X0X1 (1mapping xpath=null, 2nd mapping xpath=filled
    // catch when object.getXPathFragment() == null
    // (this will also catch case where perfNode XPath is null)
    //          	return false;
  } catch (ClassCastException e) {
    return false;
  }
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

public boolean equals(Object object) {
  try {
    XPathFragment perfNodeXPathFragment = ((XPathNode)object).getXPathFragment();
    if(xPathFragment == perfNodeXPathFragment) {
      return true;
    } else if(null == xPathFragment) {
      return false;
    } else if(null == perfNodeXPathFragment) {
      return false;
    }
    return xPathFragment.equals(perfNodeXPathFragment);
    // turn fix off for now until we re-enable XMLAnyObjectAndAnyCollectionTestCases
    //          } catch (NullPointerException npe) {
    // b5259059 all cases X0X1 (1mapping xpath=null, 2nd mapping xpath=filled
    // catch when object.getXPathFragment() == null
    // (this will also catch case where perfNode XPath is null)
    //              return false;
  } catch (ClassCastException e) {
    return false;
  }
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

@Override
public boolean equals(Object object) {
  try {
    if(!isInitialized) {
      return super.equals(object);
    }
    if(this == object) {
      return true;
    }
    XMLField xmlField = (XMLField) object;
    if(!xPathFragment.equals(xmlField.getXPathFragment())) {
      return false;
    }
    XPathFragment xpf = xPathFragment;
    XPathFragment xpf2 = xmlField.getXPathFragment();
    while(xpf.getNextFragment() != null) {
      xpf = xpf.getNextFragment();
      xpf2 = xpf2.getNextFragment();
      if(!xpf.equals(xpf2)) {
        return false;
      }
    }
    return null == xpf2.getNextFragment();
  } catch(ClassCastException e) {
    return false;
  }
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

@Override
public boolean equals(Object object) {
  try {
    if(!isInitialized) {
      return super.equals(object);
    }
    if(this == object) {
      return true;
    }
    XMLField xmlField = (XMLField) object;
    if(!xPathFragment.equals(xmlField.getXPathFragment())) {
      return false;
    }
    XPathFragment xpf = xPathFragment;
    XPathFragment xpf2 = xmlField.getXPathFragment();
    while(xpf.getNextFragment() != null) {
      xpf = xpf.getNextFragment();
      xpf2 = xpf2.getNextFragment();
      if(!xpf.equals(xpf2)) {
        return false;
      }
    }
    return null == xpf2.getNextFragment();
  } catch(ClassCastException e) {
    return false;
  }
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

@Override
public boolean equals(Object object) {
  try {
    if(!isInitialized) {
      return super.equals(object);
    }
    if(this == object) {
      return true;
    }
    XMLField xmlField = (XMLField) object;
    if(!xPathFragment.equals(xmlField.getXPathFragment())) {
      return false;
    }
    XPathFragment xpf = xPathFragment;
    XPathFragment xpf2 = xmlField.getXPathFragment();
    while(xpf.getNextFragment() != null) {
      xpf = xpf.getNextFragment();
      xpf2 = xpf2.getNextFragment();
      if(!xpf.equals(xpf2)) {
        return false;
      }
    }
    return null == xpf2.getNextFragment();
  } catch(ClassCastException e) {
    return false;
  }
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

private XPathFragment getFragmentToCompare(XMLField field, XMLField context) {
  if (field == null) {
    return null;
  }
  if (context == null) {
    return field.getXPathFragment();
  }
  XPathFragment fieldFrag = field.getXPathFragment();
  XPathFragment contextFrag = context.getXPathFragment();
  while ((fieldFrag != null) && (contextFrag != null)) {
    if (fieldFrag.equals(contextFrag)) {
      if (contextFrag.getNextFragment() == null) {
        return fieldFrag.getNextFragment();
      } else {
        contextFrag = contextFrag.getNextFragment();
        fieldFrag = fieldFrag.getNextFragment();
      }
    } else {
      return null;
    }
  }
  return null;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

private XPathFragment getFragmentToCompare(XMLField field, XMLField context) {
  if (field == null) {
    return null;
  }
  if (context == null) {
    return field.getXPathFragment();
  }
  XPathFragment fieldFrag = field.getXPathFragment();
  XPathFragment contextFrag = context.getXPathFragment();
  while ((fieldFrag != null) && (contextFrag != null)) {
    if (fieldFrag.equals(contextFrag)) {
      if (contextFrag.getNextFragment() == null) {
        return fieldFrag.getNextFragment();
      } else {
        contextFrag = contextFrag.getNextFragment();
        fieldFrag = fieldFrag.getNextFragment();
      }
    } else {
      return null;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

private XPathFragment getFragmentToCompare(XMLField field, XMLField context) {
  if (field == null) {
    return null;
  }
  if (context == null) {
    return field.getXPathFragment();
  }
  XPathFragment fieldFrag = field.getXPathFragment();
  XPathFragment contextFrag = context.getXPathFragment();
  while ((fieldFrag != null) && (contextFrag != null)) {
    if (fieldFrag.equals(contextFrag)) {
      if (contextFrag.getNextFragment() == null) {
        return fieldFrag.getNextFragment();
      } else {
        contextFrag = contextFrag.getNextFragment();
        fieldFrag = fieldFrag.getNextFragment();
      }
    } else {
      return null;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

private XPathFragment getFragmentToCompare(XMLField field, XMLField context) {
  if (field == null) {
    return null;
  }
  if (context == null) {
    return field.getXPathFragment();
  }
  XPathFragment fieldFrag = field.getXPathFragment();
  XPathFragment contextFrag = context.getXPathFragment();
  while ((fieldFrag != null) && (contextFrag != null)) {
    if (fieldFrag.equals(contextFrag)) {
      if (contextFrag.getNextFragment() == null) {
        return fieldFrag.getNextFragment();
      } else {
        contextFrag = contextFrag.getNextFragment();
        fieldFrag = fieldFrag.getNextFragment();
      }
    } else {
      return null;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

private XPathFragment getFragmentToCompare(XMLField field, XMLField context) {
  if (field == null) {
    return null;
  }
  if (context == null) {
    return field.getXPathFragment();
  }
  XPathFragment fieldFrag = field.getXPathFragment();
  XPathFragment contextFrag = context.getXPathFragment();
  while ((fieldFrag != null) && (contextFrag != null)) {
    if (fieldFrag.equals(contextFrag)) {
      if (contextFrag.getNextFragment() == null) {
        return fieldFrag.getNextFragment();
      } else {
        contextFrag = contextFrag.getNextFragment();
        fieldFrag = fieldFrag.getNextFragment();
      }
    } else {
      return null;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

private XPathFragment getFragmentToCompare(XMLField field, XMLField context) {
  if (field == null) {
    return null;
  }
  if (context == null) {
    return field.getXPathFragment();
  }
  XPathFragment fieldFrag = field.getXPathFragment();
  XPathFragment contextFrag = context.getXPathFragment();
  while ((fieldFrag != null) && (contextFrag != null)) {
    if (fieldFrag.equals(contextFrag)) {
      if (contextFrag.getNextFragment() == null) {
        return fieldFrag.getNextFragment();
      } else {
        contextFrag = contextFrag.getNextFragment();
        fieldFrag = fieldFrag.getNextFragment();
      }
    } else {
      return null;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

public boolean equals(Object object) {
  try {
    XPathNode perfNode = (XPathNode)object;
    if ((getXPathFragment() == null) && (perfNode.getXPathFragment() != null)) {
      return false;
    }
    if ((getXPathFragment() != null) && (perfNode.getXPathFragment() == null)) {
      return false;
    }
    if (getXPathFragment() == perfNode.getXPathFragment()) {
      return true;
    }
    return this.getXPathFragment().equals(perfNode.getXPathFragment());
    // turn fix off for now until we re-enable XMLAnyObjectAndAnyCollectionTestCases
    //          } catch (NullPointerException npe) {
    // b5259059 all cases X0X1 (1mapping xpath=null, 2nd mapping xpath=filled
    // catch when object.getXPathFragment() == null
    // (this will also catch case where perfNode XPath is null)
    //          	return false;
  } catch (ClassCastException e) {
    return false;
  }
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord, Object value, XPathFragment xPathFragment, Object collection){
  if (!xmlAnyCollectionMapping.usesXMLRoot() || xPathFragment.getLocalName() == null || (xmlAnyCollectionMapping.isMixedContent() && unmarshalRecord.getTextWrapperFragment() != null && unmarshalRecord.getTextWrapperFragment().equals(xPathFragment))) {
    unmarshalRecord.addAttributeValue(this, value);
  } else {
    Root xmlRoot = unmarshalRecord.createRoot();
    xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());
    xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());
    xmlRoot.setLocalName(xPathFragment.getLocalName());
    xmlRoot.setObject(value);
    unmarshalRecord.addAttributeValue(this, xmlRoot);
  }
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

protected void setOrAddAttributeValue(UnmarshalRecord unmarshalRecord, Object value, XPathFragment xPathFragment, Object collection){
  if (!xmlAnyCollectionMapping.usesXMLRoot() || xPathFragment.getLocalName() == null || (xmlAnyCollectionMapping.isMixedContent() && unmarshalRecord.getTextWrapperFragment() != null && unmarshalRecord.getTextWrapperFragment().equals(xPathFragment))) {
    unmarshalRecord.addAttributeValue(this, value);
  } else {
    Root xmlRoot = unmarshalRecord.createRoot();
    xmlRoot.setNamespaceURI(xPathFragment.getNamespaceURI());
    xmlRoot.setSchemaType(unmarshalRecord.getTypeQName());
    xmlRoot.setLocalName(xPathFragment.getLocalName());
    xmlRoot.setObject(value);
    unmarshalRecord.addAttributeValue(this, xmlRoot);
  }
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

} else {
  SAXFragmentBuilder builder = unmarshalRecord.getFragmentBuilder();
  if(xmlAnyCollectionMapping.isMixedContent() && unmarshalRecord.getTextWrapperFragment() != null && unmarshalRecord.getTextWrapperFragment().equals(xPathFragment)){
    endElementProcessText(unmarshalRecord, xmlAnyCollectionMapping, xPathFragment, null);
    return;

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core

if(!(xmlAnyCollectionMapping.isMixedContent() && unmarshalRecord.getTextWrapperFragment() != null && unmarshalRecord.getTextWrapperFragment().equals(xPathFragment))){
  setupHandlerForKeepAsElementPolicy(unmarshalRecord, xPathFragment, atts);

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com