gpt4 book ai didi

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

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

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

XMLChoiceCollectionMapping.getFields介绍

暂无

代码示例

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

private XMLField getFieldForName(String localName, String namespaceUri) {
  Iterator fields = getFields().iterator(); 
  while(fields.hasNext()) {
    XMLField nextField = (XMLField)fields.next();
    XPathFragment fragment = nextField.getXPathFragment();
    while(fragment != null && (!fragment.nameIsText())) {
      if(fragment.getNextFragment() == null || fragment.getHasText()) {
        if(fragment.getLocalName().equals(localName)) {
          String fragUri = fragment.getNamespaceURI();
          if((namespaceUri == null && fragUri == null) || (namespaceUri != null && fragUri != null && namespaceUri.equals(fragUri))) {
            return nextField;
          }
        }
      }
      fragment = fragment.getNextFragment();
    }
  }
  return null;
}    
public void writeSingleValue(Object value, Object parent, XMLRecord row, AbstractSession session) {

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

private XMLField getFieldForName(String localName, String namespaceUri) {
  Iterator fields = getFields().iterator(); 
  while(fields.hasNext()) {
    XMLField nextField = (XMLField)fields.next();
    XPathFragment fragment = nextField.getXPathFragment();
    while(fragment != null && (!fragment.nameIsText())) {
      if(fragment.getNextFragment() == null || fragment.getHasText()) {
        if(fragment.getLocalName().equals(localName)) {
          String fragUri = fragment.getNamespaceURI();
          if((namespaceUri == null && fragUri == null) || (namespaceUri != null && fragUri != null && namespaceUri.equals(fragUri))) {
            return nextField;
          }
        }
      }
      fragment = fragment.getNextFragment();
    }
  }
  return null;
}    
public void writeSingleValue(Object value, Object parent, XMLRecord row, AbstractSession session) {

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

private XMLField getFieldForName(String localName, String namespaceUri) {
  Iterator fields = getFields().iterator();
  while(fields.hasNext()) {
    XMLField nextField = (XMLField)fields.next();
    XPathFragment fragment = nextField.getXPathFragment();
    while(fragment != null && (!fragment.nameIsText())) {
      if(fragment.getNextFragment() == null || fragment.getHasText()) {
        if(fragment.getLocalName().equals(localName)) {
          String fragUri = fragment.getNamespaceURI();
          if((namespaceUri == null && fragUri == null) || (namespaceUri != null && fragUri != null && namespaceUri.equals(fragUri))) {
            return nextField;
          }
        }
      }
      fragment = fragment.getNextFragment();
    }
  }
  return null;
}
public void writeSingleValue(Object value, Object parent, XMLRecord row, AbstractSession session) {

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

((DOMRecord)row).put(getFields(), nestedRows);

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

((DOMRecord)row).put(getFields(), nestedRows);

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

public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed) throws DatabaseException {
  List<XMLEntry> values = ((DOMRecord)row).getValuesIndicatingNoEntry(this.getFields());
  Object container = getContainerPolicy().containerInstance(values.size());
  for(XMLEntry next:values) {
    Field valueField = next.getXMLField();
    DatabaseMapping nextMapping = (DatabaseMapping)this.choiceElementMappings.get(valueField);
    if(nextMapping.isAbstractCompositeCollectionMapping()) {
      XMLCompositeCollectionMapping xmlMapping = (XMLCompositeCollectionMapping)nextMapping;
      Object value = xmlMapping.buildObjectFromNestedRow((AbstractRecord)next.getValue(), joinManager, sourceQuery, executionSession, isTargetProtected);
      value = convertDataValueToObjectValue(value, executionSession, ((XMLRecord) row).getUnmarshaller());
      getContainerPolicy().addInto(value, container, executionSession);
    } else if(nextMapping instanceof XMLCompositeDirectCollectionMapping){
      XMLCompositeDirectCollectionMapping xmlMapping = (XMLCompositeDirectCollectionMapping)nextMapping;
      Object value = next.getValue();
      value = convertDataValueToObjectValue(value, executionSession, ((XMLRecord) row).getUnmarshaller());
      getContainerPolicy().addInto(value, container, executionSession);
    }
  }
  ArrayList<XMLMapping> processedMappings = new ArrayList<XMLMapping>();
  for(XMLMapping mapping:choiceElementMappings.values()) {
    if(((DatabaseMapping)mapping).isObjectReferenceMapping() && ((DatabaseMapping)mapping).isCollectionMapping() && !(processedMappings.contains(mapping))) {
      ((XMLCollectionReferenceMapping)mapping).readFromRowIntoObject(row, joinManager, ((XMLRecord)row).getCurrentObject(), cacheKey, sourceQuery, executionSession, isTargetProtected, container);
      processedMappings.add(mapping);
    }
  }
  return container;
}

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

public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed) throws DatabaseException {
  List<XMLEntry> values = ((DOMRecord)row).getValuesIndicatingNoEntry(this.getFields());
  Object container = getContainerPolicy().containerInstance(values.size());
  for(XMLEntry next:values) {
    Field valueField = next.getXMLField();
    DatabaseMapping nextMapping = (DatabaseMapping)this.choiceElementMappings.get(valueField);
    if(nextMapping.isAbstractCompositeCollectionMapping()) {
      XMLCompositeCollectionMapping xmlMapping = (XMLCompositeCollectionMapping)nextMapping;
      Object value = xmlMapping.buildObjectFromNestedRow((AbstractRecord)next.getValue(), joinManager, sourceQuery, executionSession, isTargetProtected);
      value = convertDataValueToObjectValue(value, executionSession, ((XMLRecord) row).getUnmarshaller());
      getContainerPolicy().addInto(value, container, executionSession);
    } else if(nextMapping instanceof XMLCompositeDirectCollectionMapping){
      XMLCompositeDirectCollectionMapping xmlMapping = (XMLCompositeDirectCollectionMapping)nextMapping;
      Object value = next.getValue();
      value = convertDataValueToObjectValue(value, executionSession, ((XMLRecord) row).getUnmarshaller());
      getContainerPolicy().addInto(value, container, executionSession);
    }
  }
  ArrayList<XMLMapping> processedMappings = new ArrayList<XMLMapping>();
  for(XMLMapping mapping:choiceElementMappings.values()) {
    if(((DatabaseMapping)mapping).isObjectReferenceMapping() && ((DatabaseMapping)mapping).isCollectionMapping() && !(processedMappings.contains(mapping))) {
      ((XMLCollectionReferenceMapping)mapping).readFromRowIntoObject(row, joinManager, ((XMLRecord)row).getCurrentObject(), cacheKey, sourceQuery, executionSession, isTargetProtected, container);
      processedMappings.add(mapping);
    }
  }
  return container;
}

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

nestedRows.add(entry);
((DOMRecord)row).put(getFields(), nestedRows);

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

public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession) throws DatabaseException {
  List<XMLEntry> values = ((DOMRecord)row).getValuesIndicatingNoEntry(this.getFields());
  Object container = getContainerPolicy().containerInstance(values.size());
  for(XMLEntry next:values) {

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