gpt4 book ai didi

org.eclipse.persistence.oxm.mappings.XMLObjectReferenceMapping.getFields()方法的使用及代码示例

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

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

XMLObjectReferenceMapping.getFields介绍

[英]INTERNAL: Return a list of XMLFields based on the source XPath values in the source-target key field associations list.
[中]内部:根据源-目标键字段关联列表中的源XPath值返回XMLFields列表。

代码示例

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

public void writeSingleValue(Object value, Object parent, XMLRecord row, AbstractSession session) {
  for (Iterator fieldIt = getFields().iterator(); fieldIt.hasNext();) {
    XMLField xmlField = (XMLField) fieldIt.next();
    Object fieldValue = buildFieldValue(value, xmlField, session);
    if (fieldValue != null) {
      QName schemaType = getSchemaType(xmlField, fieldValue, session);
      String stringValue = getValueToWrite(schemaType, fieldValue, session);
      row.put(xmlField, stringValue);
    }
  }
}

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

public void writeSingleValue(Object value, Object parent, XMLRecord row, AbstractSession session) {
  for (Iterator fieldIt = getFields().iterator(); fieldIt.hasNext();) {
    XMLField xmlField = (XMLField) fieldIt.next();
    Object fieldValue = buildFieldValue(value, xmlField, session);
    if (fieldValue != null) {
      QName schemaType = getSchemaType(xmlField, fieldValue, session);
      String stringValue = getValueToWrite(schemaType, fieldValue, session);
      row.put(xmlField, stringValue);
    }
  }
}

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

public void writeSingleValue(Object value, Object parent, XMLRecord row, AbstractSession session) {
  for (Iterator fieldIt = getFields().iterator(); fieldIt.hasNext();) {
    XMLField xmlField = (XMLField) fieldIt.next();
    Object fieldValue = buildFieldValue(value, xmlField, session);
    if (fieldValue != null) {
      QName schemaType = getSchemaType(xmlField, fieldValue, session);
      String stringValue = getValueToWrite(schemaType, fieldValue, session);
      row.put(xmlField, stringValue);
    }
  }
}

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

private Setting convertToSetting(DatabaseMapping mapping, Object value) {
  XMLDescriptor xmlDescriptor = (XMLDescriptor) mapping.getDescriptor();
  NamespaceResolver nsResolver = xmlDescriptor.getNamespaceResolver();
  Setting rootSetting = new Setting();
  XMLField xmlField = (XMLField) mapping.getField();
  if (xmlField == null) {
    if (mapping instanceof XMLObjectReferenceMapping) {
      xmlField = (XMLField) ((XMLObjectReferenceMapping) mapping).getFields().get(0);
    } else if (mapping instanceof XMLCollectionReferenceMapping) {
      xmlField = (XMLField) ((XMLCollectionReferenceMapping) mapping).getFields().get(0);
    }
  }
  Setting setting = rootSetting;
  if (xmlField != null) {
    XPathFragment xPathFragment = xmlField.getXPathFragment();
    rootSetting = convertToSetting(xPathFragment, nsResolver);
    setting = rootSetting;
    while (xPathFragment.getNextFragment() != null) {
      xPathFragment = xPathFragment.getNextFragment();
      Setting childSetting = convertToSetting(xPathFragment, nsResolver);
      setting.addChild(childSetting);
      setting = childSetting;
    }
  }
  setting.setObject(dataObject);
  setting.setMapping(mapping);
  setting.setValue(value, false);
  return rootSetting;
}

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

private Setting convertToSetting(DatabaseMapping mapping, Object value) {
  XMLDescriptor xmlDescriptor = (XMLDescriptor) mapping.getDescriptor();
  NamespaceResolver nsResolver = xmlDescriptor.getNamespaceResolver();
  Setting rootSetting = new Setting();
  XMLField xmlField = (XMLField) mapping.getField();
  if (xmlField == null) {
    if (mapping instanceof XMLObjectReferenceMapping) {
      xmlField = (XMLField) ((XMLObjectReferenceMapping) mapping).getFields().get(0);
    } else if (mapping instanceof XMLCollectionReferenceMapping) {
      xmlField = (XMLField) ((XMLCollectionReferenceMapping) mapping).getFields().get(0);
    }
  }
  Setting setting = rootSetting;
  if (xmlField != null) {
    XPathFragment xPathFragment = xmlField.getXPathFragment();
    rootSetting = convertToSetting(xPathFragment, nsResolver);
    setting = rootSetting;
    while (xPathFragment.getNextFragment() != null) {
      xPathFragment = xPathFragment.getNextFragment();
      Setting childSetting = convertToSetting(xPathFragment, nsResolver);
      setting.addChild(childSetting);
      setting = childSetting;
    }
  }
  setting.setObject(dataObject);
  setting.setMapping(mapping);
  setting.setValue(value, false);
  return rootSetting;
}

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

if (sdoMapping instanceof XMLObjectReferenceMapping) {
  XMLObjectReferenceMapping referenceMapping = (XMLObjectReferenceMapping) sdoMapping;
  field = (XMLField) referenceMapping.getFields().get(0);
} else {
  field = (XMLField) sdoMapping.getField();

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

if (sdoMapping instanceof XMLObjectReferenceMapping) {
  XMLObjectReferenceMapping referenceMapping = (XMLObjectReferenceMapping) sdoMapping;
  field = (XMLField) referenceMapping.getFields().get(0);
} else {
  field = (XMLField) sdoMapping.getField();

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

} else if (xmlMapping instanceof XMLObjectReferenceMapping) {
  XMLObjectReferenceMapping xmlORMapping = (XMLObjectReferenceMapping)xmlMapping;
  Iterator fieldIt = xmlORMapping.getFields().iterator();
  while (fieldIt.hasNext()) {
    XMLField xmlFld = (XMLField)fieldIt.next();

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