本文整理了Java中org.eclipse.persistence.internal.expressions.QueryKeyExpression.getNestedAttributeName
方法的一些代码示例,展示了QueryKeyExpression.getNestedAttributeName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryKeyExpression.getNestedAttributeName
方法的具体详情如下:
包路径:org.eclipse.persistence.internal.expressions.QueryKeyExpression
类名称:QueryKeyExpression
方法名:getNestedAttributeName
[英]INTERNAL: Returns nested attribute name or null
[中]内部:返回嵌套属性名称或null
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Returns nested attribute name or null
*/
public String getNestedAttributeName() {
if(getMapping() != null) {
String attributeName = getMapping().getAttributeName();
if(this.baseExpression.isExpressionBuilder()) {
return attributeName;
} else if (this.baseExpression.isQueryKeyExpression()) {
String nestedAttributeName = ((QueryKeyExpression)this.baseExpression).getNestedAttributeName();
if(nestedAttributeName == null) {
return null;
} else {
return nestedAttributeName + '.' + attributeName;
}
} else {
return null;
}
} else {
return null;
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Returns nested attribute name or null
*/
public String getNestedAttributeName() {
if(getMapping() != null) {
String attributeName = getMapping().getAttributeName();
if(this.baseExpression.isExpressionBuilder()) {
return attributeName;
} else if (this.baseExpression.isQueryKeyExpression()) {
String nestedAttributeName = ((QueryKeyExpression)this.baseExpression).getNestedAttributeName();
if(nestedAttributeName == null) {
return null;
} else {
return nestedAttributeName + '.' + attributeName;
}
} else {
return null;
}
} else {
return null;
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* The method adds to the passed input vector the
* fields or expressions corresponding to the joins.
*/
public void addJoinSelectionFields(Vector fields, boolean isCustomSQL) {
// executiveFetchGroup is used for warnings only - always null if no warnings logged
FetchGroup executionFetchGroup = null;
if(session.shouldLog(SessionLog.WARNING, SessionLog.QUERY)) {
executionFetchGroup = getExecutionFetchGroup();
}
for(Expression expression : getJoinedAttributeManager().getJoinedAttributeExpressions()) {
addSelectionFieldsForJoinedExpression(fields, isCustomSQL, expression);
// executiveFetchGroup is used for warnings only - always null if no warnings logged
if(executionFetchGroup != null) {
String nestedAttributeName = ((QueryKeyExpression)expression).getNestedAttributeName();
if(nestedAttributeName != null) {
if(!executionFetchGroup.containsAttributeInternal(nestedAttributeName)) {
getSession().log(SessionLog.WARNING, SessionLog.QUERY, "query_has_joined_attribute_outside_fetch_group", new Object[]{toString(), nestedAttributeName});
}
}
}
}
for(Expression expression : getJoinedAttributeManager().getJoinedMappingExpressions()) {
addSelectionFieldsForJoinedExpression(fields, isCustomSQL, expression);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* The method adds to the passed input vector the
* fields or expressions corresponding to the joins.
*/
public void addJoinSelectionFields(Vector fields, boolean isCustomSQL) {
// executiveFetchGroup is used for warnings only - always null if no warnings logged
FetchGroup executionFetchGroup = null;
if(session.shouldLog(SessionLog.WARNING, SessionLog.QUERY)) {
executionFetchGroup = getExecutionFetchGroup();
}
for(Expression expression : getJoinedAttributeManager().getJoinedAttributeExpressions()) {
addSelectionFieldsForJoinedExpression(fields, isCustomSQL, expression);
// executiveFetchGroup is used for warnings only - always null if no warnings logged
if(executionFetchGroup != null) {
String nestedAttributeName = ((QueryKeyExpression)expression).getNestedAttributeName();
if(nestedAttributeName != null) {
if(!executionFetchGroup.containsAttribute(nestedAttributeName)) { // cuba
getSession().log(SessionLog.WARNING, SessionLog.QUERY, "query_has_joined_attribute_outside_fetch_group", new Object[]{toString(), nestedAttributeName});
}
}
}
}
for(Expression expression : getJoinedAttributeManager().getJoinedMappingExpressions()) {
addSelectionFieldsForJoinedExpression(fields, isCustomSQL, expression);
}
}
内容来源于网络,如有侵权,请联系作者删除!