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

x33g5p2x  于2022-02-03 转载在 其他  
字(8.5k)|赞(0)|评价(0)|浏览(103)

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

XMLChoiceCollectionMapping.getContainerPolicy介绍

暂无

代码示例

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

public ContainerPolicy getContainerPolicy() {
  return xmlChoiceCollectionMapping.getContainerPolicy();
}

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

public ContainerPolicy getContainerPolicy() {
  return xmlChoiceCollectionMapping.getContainerPolicy();
}

代码示例来源: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: org.eclipse.persistence/org.eclipse.persistence.core

((AbstractCompositeDirectCollectionMapping)nextMapping).setValueConverter(converter);
  ((AbstractCompositeDirectCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());
}else if(nextMapping.isAbstractCompositeCollectionMapping()){
  if(converter != null){
    ((AbstractCompositeCollectionMapping)nextMapping).setConverter(converter);
  ((AbstractCompositeCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());
} else if(nextMapping instanceof XMLBinaryDataCollectionMapping) {
  ((XMLBinaryDataCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());
  if(converter != null) {
    ((XMLBinaryDataCollectionMapping)nextMapping).setValueConverter(converter);
  ((XMLAnyCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());
  if(converter != null && converter instanceof XMLConverter) {
    ((XMLAnyCollectionMapping)nextMapping).setConverter((XMLConverter)converter);
  ((XMLCollectionReferenceMapping)nextMapping).setContainerPolicy(getContainerPolicy());
  ((XMLCollectionReferenceMapping)nextMapping).setReuseContainer(true);

代码示例来源: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: com.haulmont.thirdparty/eclipselink

((AbstractCompositeDirectCollectionMapping)nextMapping).setValueConverter(converter);
  ((AbstractCompositeDirectCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());                                               
}else if(nextMapping.isAbstractCompositeCollectionMapping()){
  if(converter != null){
    ((AbstractCompositeCollectionMapping)nextMapping).setConverter(converter);
  ((AbstractCompositeCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());
} else if(nextMapping instanceof XMLBinaryDataCollectionMapping) {
  ((XMLBinaryDataCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());
  if(converter != null) {
    ((XMLBinaryDataCollectionMapping)nextMapping).setValueConverter(converter);
  ((XMLAnyCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());
  if(converter != null && converter instanceof XMLConverter) {                        		 
    ((XMLAnyCollectionMapping)nextMapping).setConverter((XMLConverter)converter);
  ((XMLCollectionReferenceMapping)nextMapping).setContainerPolicy(getContainerPolicy());
  ((XMLCollectionReferenceMapping)nextMapping).setReuseContainer(true);

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

((AbstractCompositeDirectCollectionMapping)nextMapping).setValueConverter(converter);
  ((AbstractCompositeDirectCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());                                               
}else{
  if(converter != null){
    ((AbstractCompositeCollectionMapping)nextMapping).setConverter(converter);
  ((AbstractCompositeCollectionMapping)nextMapping).setContainerPolicy(getContainerPolicy());

代码示例来源: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) {
    XMLField valueField = next.getXMLField();
      getContainerPolicy().addInto(value, container, executionSession);
    } else {
      XMLCompositeDirectCollectionMapping xmlMapping = (XMLCompositeDirectCollectionMapping)nextMapping;
      getContainerPolicy().addInto(value, container, executionSession);

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

ContainerPolicy cp = getContainerPolicy();
Object iterator = cp.iteratorFor(attributeValue);
if(null != iterator) {

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

ContainerPolicy cp = getContainerPolicy();
Object iterator = cp.iteratorFor(attributeValue);
if(null != iterator) {

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

XMLRecord record = (XMLRecord)row;
ContainerPolicy cp = getContainerPolicy();
Object iterator = cp.iteratorFor(attributeValue);
while(cp.hasNext(iterator)) {

相关文章