gpt4 book ai didi

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

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

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

XMLCompositeObjectMapping.getField介绍

暂无

代码示例

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

/**
 * Get the XPath String
 * @return String the XPath String associated with this Mapping
 */
public String getXPath() {
  return getField().getName();
}

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

/**
 * Get the XPath String
 * @return String the XPath String associated with this Mapping
 */
public String getXPath() {
  return getField().getName();
}

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

/**
 * Get the XPath String
 * @return String the XPath String associated with this Mapping
 */
public String getXPath() {
  return getField().getName();
}

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

public boolean isNullCapableValue() {
  XMLField xmlField = (XMLField)xmlCompositeObjectMapping.getField();
  if (xmlField.getLastXPathFragment().isSelfFragment) {
    return false;
  }
  return xmlCompositeObjectMapping.getNullPolicy().getIsSetPerformedForAbsentNode();
}

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

protected AbstractRecord buildCompositeRowForDescriptor(ClassDescriptor classDesc, Object attributeValue, AbstractSession session, XMLRecord parentRow, WriteType writeType) {
   XMLObjectBuilder objectBuilder = (XMLObjectBuilder) classDesc.getObjectBuilder();
   XMLRecord child = (XMLRecord) objectBuilder.createRecordFor(attributeValue, (XMLField) getField(), parentRow, this);
   child.setNamespaceResolver(parentRow.getNamespaceResolver());
   child.setSession(session);
   objectBuilder.buildIntoNestedRow(child, attributeValue, session, (XMLDescriptor)getReferenceDescriptor(), (XMLField) getField());
   return child;
}

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

protected AbstractRecord buildCompositeRowForDescriptor(ClassDescriptor classDesc, Object attributeValue, AbstractSession session, XMLRecord parentRow, WriteType writeType) {
   XMLObjectBuilder objectBuilder = (XMLObjectBuilder) classDesc.getObjectBuilder();
      XMLRecord child = (XMLRecord) objectBuilder.createRecordFor(attributeValue, (XMLField) getField(), parentRow, this);            
   child.setNamespaceResolver(parentRow.getNamespaceResolver());
   child.setSession(session);
   objectBuilder.buildIntoNestedRow(child, attributeValue, session, (XMLDescriptor)getReferenceDescriptor(), (XMLField) getField());
   return child;
}

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

public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, AbstractSession executionSession) throws DatabaseException {
  Object fieldValue = row.get(this.getField());
  // BUG#2667762 there could be whitespace in the row instead of null
  if ((fieldValue == null) || (fieldValue instanceof String)) {
    return null;
  }
  XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue);
  // Check the policy to see if this DOM record represents null
  if (getNullPolicy().valueIsNull((Element) nestedRow.getDOM())) {
    return null;
  }
  return valueFromRow(fieldValue, nestedRow, joinManager, sourceQuery, executionSession);
}

代码示例来源: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 {
  Object fieldValue = row.get(this.getField());
  // BUG#2667762 there could be whitespace in the row instead of null
  if ((fieldValue == null) || (fieldValue instanceof String)) {
    return null;
  }
  XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue);
  // Check the policy to see if this DOM record represents null
  if (getNullPolicy().valueIsNull((Element) nestedRow.getDOM())) {
    return null;
  }
  return valueFromRow(fieldValue, nestedRow, joinManager, sourceQuery, executionSession, isTargetProtected);
}

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

public Object valueFromRow(AbstractRecord row, JoinedAttributeManager joinManager, ObjectBuildingQuery sourceQuery, CacheKey cacheKey, AbstractSession executionSession, boolean isTargetProtected, Boolean[] wasCacheUsed) throws DatabaseException {
  Object fieldValue = row.get(this.getField());
  // BUG#2667762 there could be whitespace in the row instead of null
  if ((fieldValue == null) || (fieldValue instanceof String)) {
    return null;
  }
  XMLRecord nestedRow = (XMLRecord) this.getDescriptor().buildNestedRowFromFieldValue(fieldValue);
  // Check the policy to see if this DOM record represents null
  if (getNullPolicy().valueIsNull((Element) nestedRow.getDOM())) {
    return null;
  }
  return valueFromRow(fieldValue, nestedRow, joinManager, sourceQuery, executionSession, isTargetProtected);
}

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

/**
 * INTERNAL:
 * Create an empty object to be used by empty, complex or simple events.
 * A childRecord is created on the parent UnmarshalRecord.
 */
private void createEmptyObject() {
  try {
    // Instantiate a new object
    XMLField xmlFld = (XMLField)mapping.getField();
    if (xmlFld.hasLastXPathFragment()) {
      getParent().setLeafElementType(xmlFld.getLastXPathFragment().getLeafElementType());
    }
    // Create a childRecord on the parent UnmarshalRecord
    nodeValue.processChild(xPathFragment, getParent(), attributes, xmlDescriptor, mapping);
  } catch (SAXException e) {
    throw XMLMarshalException.unmarshalException(e);
  }
}

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

protected ClassDescriptor buildXMLAnyObjectMappingDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(XMLAnyObjectMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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

protected ClassDescriptor buildXMLAnyObjectMappingDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(XMLAnyObjectMapping.class);
  descriptor.getInheritancePolicy().setParentClass(DatabaseMapping.class);
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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

protected ClassDescriptor buildReferenceMappingDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(ReferenceMapping.class);
  descriptor.getInheritancePolicy().setParentClass(ObjectReferenceMapping.class);
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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

protected ClassDescriptor buildReferenceMappingDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(ReferenceMapping.class);
  descriptor.getInheritancePolicy().setParentClass(ObjectReferenceMapping.class);
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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

protected ClassDescriptor buildAbstractCompositeObjectMappingDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(AbstractCompositeObjectMapping.class);
  descriptor.getInheritancePolicy().setParentClass(AggregateMapping.class);
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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

protected ClassDescriptor buildDirectQueryKeyDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(DirectQueryKey.class);
  descriptor.getInheritancePolicy().setParentClass(QueryKey.class);
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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

protected ClassDescriptor buildAbstractCompositeObjectMappingDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(AbstractCompositeObjectMapping.class);
  descriptor.getInheritancePolicy().setParentClass(AggregateMapping.class);
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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

protected ClassDescriptor buildDirectQueryKeyDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(DirectQueryKey.class);
  descriptor.getInheritancePolicy().setParentClass(QueryKey.class);
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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

protected ClassDescriptor buildFieldExpressionDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(FieldExpression.class);
  descriptor.setDefaultRootElement("field-expression");
  descriptor.getInheritancePolicy().setParentClass(Expression.class);
  XMLCompositeObjectMapping parameterMapping = new XMLCompositeObjectMapping();
  parameterMapping.setAttributeName("field");
  parameterMapping.setReferenceClass(DatabaseField.class);
  parameterMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  ((XMLField)parameterMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(parameterMapping);
  XMLCompositeObjectMapping baseMapping = new XMLCompositeObjectMapping();
  baseMapping.setAttributeName("baseExpression");
  baseMapping.setReferenceClass(Expression.class);
  baseMapping.setXPath(getPrimaryNamespaceXPath() + "base");
  descriptor.addMapping(baseMapping);
  return descriptor;
}

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

protected ClassDescriptor buildFieldTransformationDescriptor() {
  XMLDescriptor descriptor = new XMLDescriptor();
  descriptor.setJavaClass(FieldTransformation.class);
  descriptor.setDefaultRootElement("field-transformation");
  descriptor.getInheritancePolicy().setClassIndicatorField(new XMLField("@xsi:type"));
  descriptor.getInheritancePolicy().setShouldReadSubclasses(true);
  descriptor.getInheritancePolicy().addClassIndicator(FieldTransformation.class, getPrimaryNamespaceXPath() + "field-transformation");
  descriptor.getInheritancePolicy().addClassIndicator(MethodBasedFieldTransformation.class, getPrimaryNamespaceXPath() + "method-based-field-transformation");
  descriptor.getInheritancePolicy().addClassIndicator(TransformerBasedFieldTransformation.class, getPrimaryNamespaceXPath() + "transformer-based-field-transformation");
  XMLCompositeObjectMapping fieldMapping = new XMLCompositeObjectMapping();
  fieldMapping.setAttributeName("field");
  fieldMapping.setReferenceClass(DatabaseField.class);
  fieldMapping.setXPath(getPrimaryNamespaceXPath() + "field");
  fieldMapping.setGetMethodName("getField");
  fieldMapping.setSetMethodName("setField");
  ((XMLField)fieldMapping.getField()).setLeafElementType(fieldQname);
  descriptor.addMapping(fieldMapping);
  return descriptor;
}

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