本文整理了Java中org.eclipse.persistence.internal.expressions.QueryKeyExpression.getContainingDescriptor
方法的一些代码示例,展示了QueryKeyExpression.getContainingDescriptor
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryKeyExpression.getContainingDescriptor
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.expressions.QueryKeyExpression
类名称:QueryKeyExpression
方法名:getContainingDescriptor
[英]INTERNAL: Return the descriptor which contains this query key.
[中]内部:返回包含此查询键的描述符。
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
@Override
public QueryKey getQueryKeyOrNull() {
if (!hasQueryKey) {
return null;
}
// Oct 19, 2000 JED
// Added try/catch. This was throwing a NPE in the following case
// expresssionBuilder.get("firstName").get("bob")
//moved by Gordon Yorke to cover validate and normalize
if (getContainingDescriptor() == null) {
throw QueryException.invalidQueryKeyInExpression(getName());
}
if (queryKey == null) {
queryKey = getContainingDescriptor().getQueryKeyNamed(getName());
if (queryKey == null) {
hasQueryKey = false;
}
}
return queryKey;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
public QueryKey getQueryKeyOrNull() {
if (!hasQueryKey) {
return null;
}
// Oct 19, 2000 JED
// Added try/catch. This was throwing a NPE in the following case
// expresssionBuilder.get("firstName").get("bob")
//moved by Gordon Yorke to cover validate and normalize
if (getContainingDescriptor() == null) {
throw QueryException.invalidQueryKeyInExpression(getName());
}
if (queryKey == null) {
queryKey = getContainingDescriptor().getQueryKeyNamed(getName());
if (queryKey == null) {
hasQueryKey = false;
}
}
return queryKey;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
@Override
public QueryKey getQueryKeyOrNull() {
if (!hasQueryKey) {
return null;
}
// Oct 19, 2000 JED
// Added try/catch. This was throwing a NPE in the following case
// expresssionBuilder.get("firstName").get("bob")
//moved by Gordon Yorke to cover validate and normalize
if (getContainingDescriptor() == null) {
throw QueryException.invalidQueryKeyInExpression(getName());
}
if (queryKey == null) {
queryKey = getContainingDescriptor().getQueryKeyNamed(getName());
if (queryKey == null) {
hasQueryKey = false;
}
}
return queryKey;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
*/
public DatabaseField getField() {
if (!isAttribute()) {
return null;
}
return getContainingDescriptor().getObjectBuilder().getFieldForQueryKeyName(getName());
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* If the alias is for a query key item, then return its descriptor.
* If it is for a function, then it has no descriptor.
*/
@Override
public ClassDescriptor getContainingDescriptor() {
AbstractSession session = getBuilder().getSession();
if (this.containingDescriptor == null) {
Expression expression = getItem().getAttributeExpression();
if (expression.isQueryKeyExpression()) {
// Need to ensure expression has a session before getting its descriptor.
if (expression.getBuilder().getSession() == null) {
expression.getBuilder().setSession(session);
}
this.containingDescriptor = ((QueryKeyExpression)expression).getContainingDescriptor();
return this.containingDescriptor;
}
return null;
}
return containingDescriptor;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* If the alias is for a query key item, then return its descriptor.
* If it is for a function, then it has no descriptor.
*/
@Override
public ClassDescriptor getContainingDescriptor() {
AbstractSession session = getBuilder().getSession();
if (this.containingDescriptor == null) {
Expression expression = getItem().getAttributeExpression();
if (expression.isQueryKeyExpression()) {
// Need to ensure expression has a session before getting its descriptor.
if (expression.getBuilder().getSession() == null) {
expression.getBuilder().setSession(session);
}
this.containingDescriptor = ((QueryKeyExpression)expression).getContainingDescriptor();
return this.containingDescriptor;
}
return null;
}
return containingDescriptor;
}
内容来源于网络,如有侵权,请联系作者删除!