- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping.setAttributeAccessor()
方法的一些代码示例,展示了XMLCompositeDirectCollectionMapping.setAttributeAccessor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLCompositeDirectCollectionMapping.setAttributeAccessor()
方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping
类名称:XMLCompositeDirectCollectionMapping
方法名:setAttributeAccessor
暂无
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* PUBLIC:
* Allows the user to indicate that this mapping should also allow for mixed content in addition to
* any of the elements in the choice. The grouping element parameter is used in the case that there is
* a common grouping element to all the other elements in this choice. If so, that grouping element can
* be specified here to allow the mixed content to be written/detected inside the wrapper element.
* @since EclipseLink 2.3.1
*/
public void setMixedContent(String groupingElement) {
isMixedContent = true;
String xpath = groupingElement;
if(groupingElement.length() == 0) {
xpath = "text()";
} else {
xpath += "/" + "text()";
}
XMLField field = new XMLField(xpath);
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
Class theClass = ClassConstants.STRING;
xmlMapping.setAttributeElementClass(theClass);
xmlMapping.setField(field);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.mixedContentMapping = xmlMapping;
this.choiceElementMappings.put(field, xmlMapping);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* PUBLIC:
* Allows the user to indicate that this mapping should also allow for mixed content in addition to
* any of the elements in the choice. The grouping element parameter is used in the case that there is
* a common grouping element to all the other elements in this choice. If so, that grouping element can
* be specified here to allow the mixed content to be written/detected inside the wrapper element.
* @since EclipseLink 2.3.1
*/
public void setMixedContent(String groupingElement) {
isMixedContent = true;
String xpath = groupingElement;
if(groupingElement.length() == 0) {
xpath = "text()";
} else {
xpath += "/" + "text()";
}
XMLField field = new XMLField(xpath);
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
Class theClass = ClassConstants.STRING;
xmlMapping.setAttributeElementClass(theClass);
xmlMapping.setField(field);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.mixedContentMapping = xmlMapping;
this.choiceElementMappings.put(field, xmlMapping);
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
private void addChoiceElementMapping(XMLField xmlField, Class theClass){
if (xmlField.getLastXPathFragment().nameIsText()) {
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
xmlMapping.setAttributeElementClass(theClass);
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
} else {
XMLCompositeCollectionMapping xmlMapping = new XMLCompositeCollectionMapping();
if(!theClass.equals(ClassConstants.OBJECT)){
xmlMapping.setReferenceClass(theClass);
}
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
xmlMapping.setAttributeElementClass(theClass);
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClass.put(theClass, xmlMapping);
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
private void addChoiceElementMapping(XMLField xmlField, String className){
if (xmlField.getLastXPathFragment().nameIsText()) {
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
Class theClass = XMLConversionManager.getDefaultXMLManager().convertClassNameToClass(className);
xmlMapping.setAttributeElementClass(theClass);
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
} else {
XMLCompositeCollectionMapping xmlMapping = new XMLCompositeCollectionMapping();
if(!className.equals("java.lang.Object")){
xmlMapping.setReferenceClassName(className);
}
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
private void addChoiceElementMapping(XMLField xmlField, Class theClass){
if (xmlField.getLastXPathFragment().nameIsText() || xmlField.getLastXPathFragment().isAttribute()) {
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
xmlMapping.setAttributeElementClass(theClass);
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClass.put(theClass, xmlMapping);
} else {
if(isBinaryType(theClass)) {
XMLBinaryDataCollectionMapping xmlMapping = new XMLBinaryDataCollectionMapping();
xmlMapping.setField(xmlField);
xmlMapping.setAttributeElementClass(theClass);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.fieldsToConverters.put(xmlField, xmlMapping.getValueConverter());
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClass.put(theClass, xmlMapping);
} else {
XMLCompositeCollectionMapping xmlMapping = new XMLCompositeCollectionMapping();
if(!theClass.equals(ClassConstants.OBJECT)){
xmlMapping.setReferenceClass(theClass);
}
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClass.put(theClass, xmlMapping);
}
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
private void addChoiceElementMapping(XMLField xmlField, String className){
if (xmlField.getLastXPathFragment().nameIsText() || xmlField.getLastXPathFragment().isAttribute()) {
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
xmlMapping.setAttributeElementClassName(className);
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClassName.put(className, xmlMapping);
} else {
if(isBinaryType(className)) {
XMLBinaryDataCollectionMapping xmlMapping = new XMLBinaryDataCollectionMapping();
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
Class theClass = XMLConversionManager.getDefaultXMLManager().convertClassNameToClass(className);
xmlMapping.setAttributeElementClass(theClass);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClassName.put(className, xmlMapping);
} else {
XMLCompositeCollectionMapping xmlMapping = new XMLCompositeCollectionMapping();
if(!className.equals("java.lang.Object")){
xmlMapping.setReferenceClassName(className);
}
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClassName.put(className, xmlMapping);
}
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
private void addChoiceElementMapping(XMLField xmlField, String className){
if (xmlField.getLastXPathFragment().nameIsText() || xmlField.getLastXPathFragment().isAttribute()) {
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
xmlMapping.setAttributeElementClassName(className);
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClassName.put(className, xmlMapping);
} else {
if(isBinaryType(className)) {
XMLBinaryDataCollectionMapping xmlMapping = new XMLBinaryDataCollectionMapping();
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
Class theClass = XMLConversionManager.getDefaultXMLManager().convertClassNameToClass(className);
xmlMapping.setAttributeElementClass(theClass);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClassName.put(className, xmlMapping);
} else {
XMLCompositeCollectionMapping xmlMapping = new XMLCompositeCollectionMapping();
if(!className.equals("java.lang.Object")){
xmlMapping.setReferenceClassName(className);
}
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, xmlMapping);
this.choiceElementMappingsByClassName.put(className, xmlMapping);
}
}
}
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping.setAttributeAcces
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLCompositeObjectMapping.setAttributeAccessor()方法的一些
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLInverseReferenceMapping.setAttributeAccessor()方法的一
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLObjectReferenceMapping.setAttributeAccessor()方法的一些
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLBinaryDataMapping.setAttributeAccessor()方法的一些代码示例,
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLAnyCollectionMapping.setAttributeAccessor()方法的一些代码
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLChoiceCollectionMapping.setAttributeAccessor()方法的一
我是一名优秀的程序员,十分优秀!