- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.eclipse.persistence.internal.oxm.XPathFragment.isSelfFragment()
方法的一些代码示例,展示了XPathFragment.isSelfFragment()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XPathFragment.isSelfFragment()
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.oxm.XPathFragment
类名称:XPathFragment
方法名:isSelfFragment
[英]INTERNAL: Indicates if the xpath is "."
[中]内部:指示xpath是否为“”
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Indicates if the xpath for this field is "."
*
* @return true if the xpath is ".", false otherwise
*/
public boolean isSelfField() {
if (null == xPathFragment) {
return false;
}
return xPathFragment.isSelfFragment();
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Indicates if the xpath for this field is "."
*
* @return true if the xpath is ".", false otherwise
*/
public boolean isSelfField() {
if (null == xPathFragment) {
return false;
}
return xPathFragment.isSelfFragment();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Indicates if the xpath for this field is "."
*
* @return true if the xpath is ".", false otherwise
*/
public boolean isSelfField() {
if (null == xPathFragment) {
return false;
}
return xPathFragment.isSelfFragment();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
@Override
public void writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, WriteType writeType) {
Object attributeValue = getAttributeValueFromObject(object);
if (attributeValue == null) {
XMLField field = (XMLField) getField();
if(getNullPolicy() != null && !field.getXPathFragment().isSelfFragment()) {
getNullPolicy().directMarshal((Field) this.getField(), (XMLRecord) row, object);
}
return;
}
writeSingleValue(attributeValue, object, (XMLRecord) row, session);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
@Override
public void writeFromObjectIntoRow(Object object, AbstractRecord row, AbstractSession session, WriteType writeType) {
Object attributeValue = getAttributeValueFromObject(object);
if (attributeValue == null) {
XMLField field = (XMLField) getField();
if(getNullPolicy() != null && !field.getXPathFragment().isSelfFragment()) {
getNullPolicy().directMarshal((Field) this.getField(), (XMLRecord) row, object);
}
return;
}
writeSingleValue(attributeValue, object, (XMLRecord) row, session);
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
private Node getSingleNode(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver) {
if (xPathFragment.isAttribute()) {
return selectSingleAttribute(contextNode, xPathFragment, xmlNamespaceResolver);
} else if (xPathFragment.nameIsText()) {
return selectSingleText(contextNode);
} else if (xPathFragment.isSelfFragment()) {
return contextNode;
}
if (xPathFragment.containsIndex()) {
return selectSingleElement(contextNode, xPathFragment, xmlNamespaceResolver, xPathFragment.getIndexValue());
}
return selectSingleElement(contextNode, xPathFragment, xmlNamespaceResolver);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
private Node getSingleNode(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver) {
if (xPathFragment.isAttribute()) {
return selectSingleAttribute(contextNode, xPathFragment, xmlNamespaceResolver);
} else if (xPathFragment.nameIsText()) {
return selectSingleText(contextNode);
} else if (xPathFragment.isSelfFragment()) {
return contextNode;
}
if (xPathFragment.containsIndex()) {
return selectSingleElement(contextNode, xPathFragment, xmlNamespaceResolver, xPathFragment.getIndexValue());
}
return selectSingleElement(contextNode, xPathFragment, xmlNamespaceResolver);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
private Node getSingleNode(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver) {
if (xPathFragment.isAttribute()) {
return selectSingleAttribute(contextNode, xPathFragment, xmlNamespaceResolver);
} else if (xPathFragment.nameIsText()) {
return selectSingleText(contextNode);
} else if (xPathFragment.isSelfFragment()) {
return contextNode;
}
if (xPathFragment.containsIndex()) {
return selectSingleElement(contextNode, xPathFragment, xmlNamespaceResolver, xPathFragment.getIndexValue());
}
return selectSingleElement(contextNode, xPathFragment, xmlNamespaceResolver);
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
private NodeList getNodes(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver, AbstractNullPolicy nullPolicy) {
if (xPathFragment.isAttribute()) {
return selectAttributeNodes(contextNode, xPathFragment, xmlNamespaceResolver);
} else if (xPathFragment.nameIsText()) {
return selectTextNodes(contextNode, nullPolicy);
} else if (xPathFragment.isSelfFragment()) {
XMLNodeList xmlNodeList = new XMLNodeList(1);
xmlNodeList.add(contextNode);
return xmlNodeList;
}
if (xPathFragment.containsIndex()) {
return selectElementNodes(contextNode, xPathFragment, xmlNamespaceResolver, xPathFragment.getIndexValue());
}
return selectElementNodes(contextNode, xPathFragment, xmlNamespaceResolver);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Return the last fragment before text() in the XPath that a given XPathFragment
* is part of.
*
* @param frag
* @return
*/
protected XPathFragment getTargetXPathFragment(XPathFragment frag) {
if (frag.isAttribute() || frag.isSelfFragment()) {
return frag;
}
while (frag.getNextFragment() != null && !frag.getNextFragment().nameIsText()) {
frag = frag.getNextFragment();
if (frag.getNextFragment() == null || frag.getNextFragment().nameIsText()) {
break;
}
}
return frag;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Return the last fragment before text() in the XPath that a given XPathFragment
* is part of.
*
* @param frag
* @return
*/
protected XPathFragment getTargetXPathFragment(XPathFragment frag) {
if (frag.isAttribute() || frag.isSelfFragment()) {
return frag;
}
while (frag.getNextFragment() != null && !frag.getNextFragment().nameIsText()) {
frag = frag.getNextFragment();
if (frag.getNextFragment() == null || frag.getNextFragment().nameIsText()) {
break;
}
}
return frag;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* Return the last fragment before text() in the XPath that a given XPathFragment
* is part of.
*
* @param frag
* @return
*/
protected XPathFragment getTargetXPathFragment(XPathFragment frag) {
if (frag.isAttribute() || frag.isSelfFragment()) {
return frag;
}
while (frag.getNextFragment() != null && !frag.getNextFragment().nameIsText()) {
frag = frag.getNextFragment();
if (frag.getNextFragment() == null || frag.getNextFragment().nameIsText()) {
break;
}
}
return frag;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
private NodeList getNodes(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver, AbstractNullPolicy nullPolicy, boolean concatText) {
if (xPathFragment.isAttribute()) {
return selectAttributeNodes(contextNode, xPathFragment, xmlNamespaceResolver);
} else if (xPathFragment.nameIsText()) {
return selectTextNodes(contextNode, nullPolicy, concatText);
} else if (xPathFragment.isSelfFragment()) {
XMLNodeList xmlNodeList = new XMLNodeList(1);
xmlNodeList.add(contextNode);
return xmlNodeList;
}
if (xPathFragment.containsIndex()) {
return selectElementNodes(contextNode, xPathFragment, xmlNamespaceResolver, xPathFragment.getIndexValue());
}
return selectElementNodes(contextNode, xPathFragment, xmlNamespaceResolver);
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
private NodeList getNodes(Node contextNode, XPathFragment xPathFragment, XMLNamespaceResolver xmlNamespaceResolver, AbstractNullPolicy nullPolicy, boolean concatText) {
if (xPathFragment.isAttribute()) {
return selectAttributeNodes(contextNode, xPathFragment, xmlNamespaceResolver);
} else if (xPathFragment.nameIsText()) {
return selectTextNodes(contextNode, nullPolicy, concatText);
} else if (xPathFragment.isSelfFragment()) {
XMLNodeList xmlNodeList = new XMLNodeList(1);
xmlNodeList.add(contextNode);
return xmlNodeList;
}
if (xPathFragment.containsIndex()) {
return selectElementNodes(contextNode, xPathFragment, xmlNamespaceResolver, xPathFragment.getIndexValue());
}
return selectElementNodes(contextNode, xPathFragment, xmlNamespaceResolver);
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* Handle marshal of an empty collection.
* @param xPathFragment
* @param namespaceResolver
* @param openGrouping if grouping elements should be marshalled for empty collections
* @return
*/
public boolean emptyCollection(XPathFragment xPathFragment, NamespaceResolver namespaceResolver, boolean openGrouping) {
if(marshaller.isMarshalEmptyCollections()){
super.emptyCollection(xPathFragment, namespaceResolver, true);
if (null != xPathFragment) {
startCollection();
if (!xPathFragment.isSelfFragment()) {
openStartElement(xPathFragment, namespaceResolver);
if (null != level) {
level.setNeedToCloseComplex(false);
level.setNeedToOpenComplex(false);
}
endElement(xPathFragment, namespaceResolver);
}
endEmptyCollection();
}
return true;
}else{
return super.emptyCollection(xPathFragment, namespaceResolver, openGrouping);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* Handle marshal of an empty collection.
* @param xPathFragment
* @param namespaceResolver
* @param openGrouping if grouping elements should be marshalled for empty collections
* @return
*/
public boolean emptyCollection(XPathFragment xPathFragment, NamespaceResolver namespaceResolver, boolean openGrouping) {
if(marshaller.isMarshalEmptyCollections()){
super.emptyCollection(xPathFragment, namespaceResolver, true);
if (null != xPathFragment) {
startCollection();
if (!xPathFragment.isSelfFragment()) {
openStartElement(xPathFragment, namespaceResolver);
if (null != level) {
level.setNeedToCloseComplex(false);
level.setNeedToOpenComplex(false);
}
endElement(xPathFragment, namespaceResolver);
}
endEmptyCollection();
}
return true;
}else{
return super.emptyCollection(xPathFragment, namespaceResolver, openGrouping);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
if(xPathFragment.isSelfFragment() || xPathFragment.nameIsText()){
String keyName = position.getKeyName();
setComplex(position, false);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
if(xPathFragment.isSelfFragment() || xPathFragment.nameIsText()){
String keyName = position.getKeyName();
setComplex(position, false);
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
if (frag.isSelfFragment()) {
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
if (frag.isSelfFragment()) {
在 Spring-MVC 应用程序中,我尝试使用 validator 。我将注释 @NotEmpty 和 @Email 放在我的实体之一上,当我尝试验证它时,出现此错误: java.lang.NoSu
网络是我硕士学位的最后一门类(class)。我确实有一个关于如何计算非持久、持久和持久流水线的 http 往返时间的问题。 在花了无数小时阅读有关该问题、从其他大学下载笔记甚至搜索 youtube 视
让我们考虑典型的 订购 和 订单商品 例子。假设 订单商品 是 的一部分订购 聚合,只能通过订单添加。所以,添加一个新的 订单商品 到 订购,我们必须通过 Repository 加载整个 Aggreg
// lookup existing user & set a currently null child entity (ContactInfo) user.setContactInfo(contac
我正在尝试关注 this tutorial .我想我不是从使用可下载项目开始,而是从我之前做过的一个简单的“spring MVC - Maven - eclipse”项目开始。这个项目运行良好。 因此
我正在使用打开 Kubernetes 选项的 docker 应用程序运行 mac OSX Catalina。我使用以下 yaml 和命令创建了一个 PersistentVolume。 apiVersi
假设我有一个类 Employee和一个类Company其中包含 Employee 的 LinkedList对象,我想编写一个添加 Employee 的方法到特定的数据库Company 。我创建了一个新
我实际上正在将我们应用程序的所有组件更新到最新版本。因此,除其他外,我将从 eclipselink-2.5.0 升级到 eclipselink-2.7.3,并从 Tomcat 7 升级到 TomEE。
我试图遵循《用GlassFish 3开始Java EE 6平台》一书第2章中的示例。我正在Windows中使用cmd中的EclipseLink,Derby和Maven。我真的不知道这一点,将不胜感激!
我只是看看ClassGuard (虽然我知道一些 objection )。 但是我得到了 javax.persistence.PersistenceException: [PersistenceUni
我的印象是,如果我们使用持久字段,就不需要 getter 方法,因为实体管理器直接引用实例变量。但是,当我从实体中删除 getter 和 setter 方法以具有持久字段时,未从数据库中检索到相应实例
我正在 Eclipse 中使用 Servlet、JPA、EJB 和 JBoss 进行项目。正如您在我的主题标题中看到的,我的 persistence.xml 文件有错误,但我不知道是哪个:
我已经尝试了一个星期或更长时间来让我的状态在 react native Android 应用程序中持续存在,但在重新水化后状态始终具有初始值。如果我使用 Redux devtools 检查 ASync
什么时候应该坚持,什么时候应该补充水分?命名约定非常困惑,因为作者几乎没有提到它们在 redux-persist 的上下文中的含义。 . 最佳答案 在不真正了解图书馆的情况下: persist = 将
我正在尝试按照老师文档中提供的信息设置一个简单的 jpa 2.0 项目。我已经处理这个问题好几个小时了,但无论我做什么,当我尝试创建 EntityManagerFactory 时,我总是遇到这个异常:
我有一个 Maven 项目,我将其转换为现在可与 Maven 一起使用的 JPA 项目。我的persistence.xml如下: My Persistence Unit
我正在使用 Netbeans 6.8 并构建简单的 Maven Web 应用程序项目。 为持久实体创建实体和主文件 [也创建持久单元] 并使用 EclipsLink。 但是当我运行主文件时出现这个错误
我是 Kubernetes 的新手,我很难理解 Kubernetes 中持久存储背后的整个想法。 这就足够了吗,或者我必须创建持久卷,如果我只部署这两个对象而不创建 PV 会发生什么情况? 存储应该在
我正在尝试使用 JPA 为我目前参与的 Java-EE 项目设置持久性,并且我遇到了许多配置问题。目前,我已经在 persistence.xml 中定义了一个 RESOURCE_LOCAL 持久性单元
Akka 持久性查询通过提供一个通用的基于异步流的查询接口(interface)来补充 Persistence,各种日志插件可以实现该接口(interface)以公开它们的查询功能。 这是来自 akk
我是一名优秀的程序员,十分优秀!