- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping.setField()
方法的一些代码示例,展示了XMLCompositeDirectCollectionMapping.setField()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLCompositeDirectCollectionMapping.setField()
方法的具体详情如下:
包路径:org.eclipse.persistence.oxm.mappings.XMLCompositeDirectCollectionMapping
类名称:XMLCompositeDirectCollectionMapping
方法名:setField
暂无
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Set the Mapping field name attribute to the given XPath String
* @param xpathString String
*/
public void setXPath(String xpathString) {
if ((xpathString.indexOf(XMLConstants.ATTRIBUTE) == -1) && (!xpathString.endsWith(XMLConstants.TEXT))) {
xpathString += '/' + XMLConstants.TEXT;
}
setField(new XMLField(xpathString));
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Set the Mapping field name attribute to the given XPath String
* @param xpathString String
*/
public void setXPath(String xpathString) {
if ((xpathString.indexOf(XMLConstants.ATTRIBUTE) == -1) && (!xpathString.endsWith(XMLConstants.TEXT))) {
xpathString += '/' + XMLConstants.TEXT;
}
setField(new XMLField(xpathString));
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Set the Mapping field name attribute to the given XPath String
* @param xpathString String
*/
public void setXPath(String xpathString) {
if ((xpathString.indexOf(XMLConstants.ATTRIBUTE) == -1) && (!xpathString.endsWith(XMLConstants.TEXT))) {
xpathString += '/' + XMLConstants.TEXT;
}
setField(new XMLField(xpathString));
}
代码示例来源: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
XMLCompositeDirectCollectionMapping xmlMapping = new XMLCompositeDirectCollectionMapping();
xmlMapping.setAttributeElementClass(theClass);
xmlMapping.setField(xmlField);
xmlMapping.setAttributeAccessor(temporaryAccessor);
this.choiceElementMappings.put(xmlField, 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);
}
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.dbws
/**
* Build an XMLDescriptor for BatchQueryOperation.
*/
protected XMLDescriptor buildBatchQueryDescriptor() {
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(BatchQueryOperation.class);
descriptor.setDefaultRootElement("batch-sql-query");
XMLDirectMapping name = new XMLDirectMapping();
name.setAttributeName("name");
name.setXPath("name/text()");
descriptor.addMapping(name);
XMLCompositeDirectCollectionMapping statementsMapping = new XMLCompositeDirectCollectionMapping();
statementsMapping.setAttributeName("batchSql");
XMLField f1 = new XMLField("batch-statement/text()");
f1.setIsCDATA(true);
statementsMapping.setField(f1);
descriptor.addMapping(statementsMapping);
return descriptor;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Build an XMLDescriptor for BatchQueryOperation.
*/
protected XMLDescriptor buildBatchQueryDescriptor() {
XMLDescriptor descriptor = new XMLDescriptor();
descriptor.setJavaClass(BatchQueryOperation.class);
descriptor.setDefaultRootElement("batch-sql-query");
XMLDirectMapping name = new XMLDirectMapping();
name.setAttributeName("name");
name.setXPath("name/text()");
descriptor.addMapping(name);
XMLCompositeDirectCollectionMapping statementsMapping = new XMLCompositeDirectCollectionMapping();
statementsMapping.setAttributeName("batchSql");
XMLField f1 = new XMLField("batch-statement/text()");
f1.setIsCDATA(true);
statementsMapping.setField(f1);
descriptor.addMapping(statementsMapping);
return descriptor;
}
我有一个类,如果它被正确插入到一个集合中,我正试图为其设置一个值。这是那个类。 class flow { std::string source, dest, protocol, startTi
我有 a.b,一个三元素向量。我想改变前 2 个元素。第三行中的代码不包括第二行中的更改。例如,第二行响应为: [2 0 0] 第三行响应为: [0 3 0] 我的代码如下。 a.b = [0 0 0
我正在努力解决如何覆盖 .yml 文件内的属性文件 我们使用Spring框架并使用注释(例如@InjectMocks)。 我在配置项目 YML 文件中声明了一个名为“one-platform-prop
我正在尝试使用以下语法将 QString 定义为 QWizard 页面中的字段: registerField("MESSAGE", this); 我可以正确设置字段值并使用 QWizardPage::
我正在尝试使用 Mockito 测试 Spring Boot Controller 。我正在关注本教程:https://www.javacodegeeks.com/2013/07/getting-st
我需要使用 datalink(jQuery 插件)中的 setField() 方法设置单选按钮。 我已经在 gitHub 上阅读了有关此问题的问题,并看到了一个解决该问题的分支 ( https://g
我正在创建一个自定义注释,该注释设置特定间隔(最小值、最大值)中的随机整数。 @GenerateRandomInt(min=2, max=7) 我已经实现了接口(interface)BeanPost
我正在我的 JPA 层和数据库之间编写集成测试,以检查我编写的 SQL 是否正确。真正的数据库是 Oracle,不幸的是,由于我无法控制的原因,我的测试数据库必须是 Derby,所以自然会有一些差异。
我正在使用 C# mongo 驱动程序,我有如下用户集合, public class User { public string Name { get; set; } public D
本文整理了Java中quickfix.fix44.component.YieldData.setField()方法的一些代码示例,展示了YieldData.setField()的具体用法。这些代码示例
本文整理了Java中quickfix.fix50sp2.component.YieldData.setField()方法的一些代码示例,展示了YieldData.setField()的具体用法。这些代
本文整理了Java中quickfix.fix43.component.YieldData.setField()方法的一些代码示例,展示了YieldData.setField()的具体用法。这些代码示例
本文整理了Java中quickfix.fix50.component.YieldData.setField()方法的一些代码示例,展示了YieldData.setField()的具体用法。这些代码示例
本文整理了Java中quickfix.fix50sp1.component.YieldData.setField()方法的一些代码示例,展示了YieldData.setField()的具体用法。这些代
我正在更新一些旧代码,但现在出现错误:ERROR: setfield! immutable struct cannot be changed in Julia当我尝试更改不可变结构的值时。是否有一个常
我在这里有点惊讶 - 在我的类(class)中,我有一个 private String[] Permissions; 字段,我想在运行测试时从外部设置该字段。我想过使用 ReflectionTestU
这里有些困惑,下面的代码会导致 DataTable 发生变化,而我不希望它这样做。 DataTable内部没有实际的个体值变化管理吗?还是我遗漏了什么? var table = new DataTab
在 C++ 中,事情是这样的: l_newTable(L); //Stack: newtable l_getGlobal(L, "A"); //
我有一个继承自 QWizardPage 的类,它使用 registerField() 注册它的小部件。 QLineEdit* input = new QLineEdit; input->setText
我是 JUnittesting 的新手,所以我有一个问题。谁能告诉我为什么我们在 Junit 测试中使用 ReflectionTestUtils.setField() 示例。 最佳答案 正如评论中提到
我是一名优秀的程序员,十分优秀!